Skip to content

Commit

Permalink
Merge pull request #52 from davidnavas/csd-1.2
Browse files Browse the repository at this point in the history
SPY-509: Fix commitJob so that it executes only once
  • Loading branch information
markhamstra committed Apr 21, 2015
2 parents 01f048e + d17d89c commit a34b875
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1235,13 +1235,13 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
writer.commit()
}


lazy val result = writer.commitJob()
self.context.submitJobWithTaskContext(
self,
writeToFile,
0 until self.partitions.size,
(_, _: Unit) => {},
{ writer.commitJob() }
{ result }
)
}

Expand Down Expand Up @@ -1330,12 +1330,13 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
val jobCommitter = jobFormat.getOutputCommitter(jobTaskContext)
jobCommitter.setupJob(jobTaskContext)

lazy val result = jobCommitter.commitJob(jobTaskContext)
self.context.submitJobWithTaskContext(
self,
writeShard,
0 until self.partitions.size,
(_, _:Int) => {},
{ jobCommitter.commitJob(jobTaskContext) }
{ result }
)
}

Expand Down

0 comments on commit a34b875

Please sign in to comment.