diff options
author | Matei Zaharia <matei.zaharia@gmail.com> | 2013-08-09 13:17:08 -0700 |
---|---|---|
committer | Matei Zaharia <matei.zaharia@gmail.com> | 2013-08-09 13:17:08 -0700 |
commit | b09d4b79e83330c96c161ea4eb9af284f0a835e6 (patch) | |
tree | b73472c2adaf61694e9cfb5e0e6f2255b4cb9b08 /core | |
parent | cc6b92e80ec42cc21719331e7cb8ef06aed33074 (diff) | |
parent | 9dfc280f74daf24334aa73bb57f07e7e71213b63 (diff) | |
download | spark-b09d4b79e83330c96c161ea4eb9af284f0a835e6.tar.gz spark-b09d4b79e83330c96c161ea4eb9af284f0a835e6.tar.bz2 spark-b09d4b79e83330c96c161ea4eb9af284f0a835e6.zip |
Merge pull request #799 from woggle/sync-fix
Remove extra synchronization in ResultTask
Diffstat (limited to 'core')
-rw-r--r-- | core/src/main/scala/spark/scheduler/ResultTask.scala | 16 |
1 files changed, 7 insertions, 9 deletions
diff --git a/core/src/main/scala/spark/scheduler/ResultTask.scala b/core/src/main/scala/spark/scheduler/ResultTask.scala index 1ced6f9524..832ca18b8c 100644 --- a/core/src/main/scala/spark/scheduler/ResultTask.scala +++ b/core/src/main/scala/spark/scheduler/ResultTask.scala @@ -51,15 +51,13 @@ private[spark] object ResultTask { } def deserializeInfo(stageId: Int, bytes: Array[Byte]): (RDD[_], (TaskContext, Iterator[_]) => _) = { - synchronized { - val loader = Thread.currentThread.getContextClassLoader - val in = new GZIPInputStream(new ByteArrayInputStream(bytes)) - val ser = SparkEnv.get.closureSerializer.newInstance - val objIn = ser.deserializeStream(in) - val rdd = objIn.readObject().asInstanceOf[RDD[_]] - val func = objIn.readObject().asInstanceOf[(TaskContext, Iterator[_]) => _] - return (rdd, func) - } + val loader = Thread.currentThread.getContextClassLoader + val in = new GZIPInputStream(new ByteArrayInputStream(bytes)) + val ser = SparkEnv.get.closureSerializer.newInstance + val objIn = ser.deserializeStream(in) + val rdd = objIn.readObject().asInstanceOf[RDD[_]] + val func = objIn.readObject().asInstanceOf[(TaskContext, Iterator[_]) => _] + return (rdd, func) } def clearCache() { |