Github user andrewor14 commented on a diff in the pull request:
https://github.com/apache/spark/pull/50#discussion_r10238901
--- Diff:
core/src/main/scala/org/apache/spark/serializer/JavaSerializer.scala ---
@@ -23,9 +23,27 @@ import java.nio.ByteBuffer
import org.apache.spark.SparkConf
import org.apache.spark.util.ByteBufferInputStream
-private[spark] class JavaSerializationStream(out: OutputStream) extends
SerializationStream {
+private[spark] class JavaSerializationStream(out: OutputStream,
+ conf: SparkConf) extends
SerializationStream {
val objOut = new ObjectOutputStream(out)
- def writeObject[T](t: T): SerializationStream = { objOut.writeObject(t);
this }
+ var counter = 0
+ val counterReset = conf.getInt("spark.serializer.objectStreamReset",
10000)
+
+ /* Calling reset to avoid memory leak:
--- End diff --
nit: use java doc format ```/** comment */ ``` rather than scala doc
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---