Skip to content

Commit

Permalink
[SPARK-3935][Core] log the number of records that has been written
Browse files Browse the repository at this point in the history
There is a unused variable(count) in saveAsHadoopDataset in PairRDDFunctions.scala. The initial idea of this variable seems to count the number of records, so I am adding a log statement to log the number of records that has been written to the writer.

Author: likun <[email protected]>
Author: jackylk <[email protected]>

Closes apache#2791 from jackylk/SPARK-3935 and squashes the following commits:

a874047 [jackylk] removing the unused variable in PairRddFunctions.scala
3bf43c7 [likun] log the number of records has been written
  • Loading branch information
jackylk authored and andrewor14 committed Oct 17, 2014
1 parent e678b9f commit c351862
Showing 1 changed file with 0 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1032,10 +1032,8 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
writer.setup(context.stageId, context.partitionId, attemptNumber)
writer.open()
try {
var count = 0
while (iter.hasNext) {
val record = iter.next()
count += 1
writer.write(record._1.asInstanceOf[AnyRef], record._2.asInstanceOf[AnyRef])
}
} finally {
Expand Down

0 comments on commit c351862

Please sign in to comment.