Skip to content

Commit 3bf43c7

Browse files
author
likun
committed
log the number of records has been written
1 parent c86c976 commit 3bf43c7

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

core/src/main/scala/org/apache/spark/rdd/PairRDDFunctions.scala

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1031,8 +1031,8 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
10311031

10321032
writer.setup(context.getStageId, context.getPartitionId, attemptNumber)
10331033
writer.open()
1034+
var count = 0
10341035
try {
1035-
var count = 0
10361036
while (iter.hasNext) {
10371037
val record = iter.next()
10381038
count += 1
@@ -1041,6 +1041,7 @@ class PairRDDFunctions[K, V](self: RDD[(K, V)])
10411041
} finally {
10421042
writer.close()
10431043
}
1044+
logInfo(s"$count records are written")
10441045
writer.commit()
10451046
}
10461047

0 commit comments

Comments
 (0)