Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
S
spark
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cs525-sp18-g07
spark
Commits
d47c16f7
Commit
d47c16f7
authored
11 years ago
by
Matei Zaharia
Browse files
Options
Downloads
Patches
Plain Diff
Add an option to disable reference tracking in Kryo
parent
238d0e68
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
core/src/main/scala/spark/KryoSerializer.scala
+4
-0
4 additions, 0 deletions
core/src/main/scala/spark/KryoSerializer.scala
docs/configuration.md
+11
-1
11 additions, 1 deletion
docs/configuration.md
with
15 additions
and
1 deletion
core/src/main/scala/spark/KryoSerializer.scala
+
4
−
0
View file @
d47c16f7
...
@@ -210,6 +210,10 @@ class KryoSerializer extends spark.serializer.Serializer with Logging {
...
@@ -210,6 +210,10 @@ class KryoSerializer extends spark.serializer.Serializer with Logging {
val
reg
=
Class
.
forName
(
regCls
,
true
,
classLoader
).
newInstance
().
asInstanceOf
[
KryoRegistrator
]
val
reg
=
Class
.
forName
(
regCls
,
true
,
classLoader
).
newInstance
().
asInstanceOf
[
KryoRegistrator
]
reg
.
registerClasses
(
kryo
)
reg
.
registerClasses
(
kryo
)
}
}
// Allow disabling Kryo reference tracking if user knows their object graphs don't have loops
kryo
.
setReferences
(
System
.
getProperty
(
"spark.kryo.referenceTracking"
,
"true"
).
toBoolean
)
kryo
kryo
}
}
...
...
This diff is collapsed.
Click to expand it.
docs/configuration.md
+
11
−
1
View file @
d47c16f7
...
@@ -197,9 +197,19 @@ Apart from these, the following properties are also available, and may be useful
...
@@ -197,9 +197,19 @@ Apart from these, the following properties are also available, and may be useful
(e.g. map functions) reference large objects in the driver program.
(e.g. map functions) reference large objects in the driver program.
</td>
</td>
</tr>
</tr>
<tr>
<td>
spark.kryo.referenceTracking
</td>
<td>
true
</td>
<td>
Whether to track references to the same object when serializing data with Kryo, which is
necessary if your object graphs have loops and useful for efficiency if they contain multiple
copies of the same object. Can be disabled to improve performance if you know this is not the
case.
</td>
</tr>
<tr>
<tr>
<td>
spark.kryoserializer.buffer.mb
</td>
<td>
spark.kryoserializer.buffer.mb
</td>
<td>
3
2
</td>
<td>
2
</td>
<td>
<td>
Maximum object size to allow within Kryo (the library needs to create a buffer at least as
Maximum object size to allow within Kryo (the library needs to create a buffer at least as
large as the largest single object you'll serialize). Increase this if you get a "buffer limit
large as the largest single object you'll serialize). Increase this if you get a "buffer limit
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment