val accum = sc.accumulator(0, "Records Accumulator")
hbaseRowsDF.repartition(repartition_num).map {
tuple => {
accum += 1
...
}
}
logger.info("记录数: " + accum.value)
val accum = sc.accumulator(0, "Records Accumulator")
hbaseRowsDF.repartition(repartition_num).map {
tuple => {
accum += 1
...
}
}
logger.info("记录数: " + accum.value)
本文标题:使用累积变量,记录处理条数
本文链接:https://www.haomeiwen.com/subject/ezugvxtx.html
网友评论