Skip to content

Commit

Permalink
remove duplicate serialize
Browse files Browse the repository at this point in the history
  • Loading branch information
witgo committed May 12, 2014
1 parent 743a7ad commit 3ea1ca1
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,7 @@ class CoarseGrainedSchedulerBackend(scheduler: TaskSchedulerImpl, actorSystem: A
for (task <- tasks.flatten) {
freeCores(task.executorId) -= scheduler.CPUS_PER_TASK
val ser = SparkEnv.get.closureSerializer.newInstance()
val taskBytes = ser.serialize(task).array()
val serializedTask = ser.serialize(taskBytes)
val serializedTask = ser.serialize(task)
if (serializedTask.limit >= akkaFrameSize - 1024) {
var msg = "Serialized task %s:%d were %d bytes which " +
"exceeds spark.akka.frameSize (%d bytes)."
Expand Down

0 comments on commit 3ea1ca1

Please sign in to comment.