diff options
author | Matei Zaharia <matei.zaharia@gmail.com> | 2013-07-15 01:55:54 +0000 |
---|---|---|
committer | Matei Zaharia <matei.zaharia@gmail.com> | 2013-07-15 01:55:54 +0000 |
commit | d47c16f78d5cb935bd4022c9bed8376691371682 (patch) | |
tree | 6bfc4c3c47b8c39bc4fe99a69f355e45091d745b /core/src/main | |
parent | 238d0e6893b758a541aa782c559215b836ec2db6 (diff) | |
download | spark-d47c16f78d5cb935bd4022c9bed8376691371682.tar.gz spark-d47c16f78d5cb935bd4022c9bed8376691371682.tar.bz2 spark-d47c16f78d5cb935bd4022c9bed8376691371682.zip |
Add an option to disable reference tracking in Kryo
Diffstat (limited to 'core/src/main')
-rw-r--r-- | core/src/main/scala/spark/KryoSerializer.scala | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/core/src/main/scala/spark/KryoSerializer.scala b/core/src/main/scala/spark/KryoSerializer.scala index d723ab7b1e..c7dbcc6fbc 100644 --- a/core/src/main/scala/spark/KryoSerializer.scala +++ b/core/src/main/scala/spark/KryoSerializer.scala @@ -210,6 +210,10 @@ class KryoSerializer extends spark.serializer.Serializer with Logging { val reg = Class.forName(regCls, true, classLoader).newInstance().asInstanceOf[KryoRegistrator] 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 } |