Skip to content

Commit

Permalink
log the number of records has been written
Browse files Browse the repository at this point in the history
  • Loading branch information
jackylk committed Oct 14, 2014
1 parent c86c976 commit 3bf43c7
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1031,8 +1031,8 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])

writer.setup(context.getStageId, context.getPartitionId, attemptNumber)
writer.open()
var count = 0
try {
var count = 0
while (iter.hasNext) {
val record = iter.next()
count += 1
Expand All @@ -1041,6 +1041,7 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
} finally {
writer.close()
}
logInfo(s"$count records are written")
writer.commit()
}

Expand Down

0 comments on commit 3bf43c7

Please sign in to comment.