Created
January 27, 2019 05:40
-
-
Save ashkrit/6fabd60e0e64ce8a7f47c48957877772 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class StageAccumulatorListener extends SparkListener { | |
val log = LoggerFactory.getLogger(this.getClass.getName) | |
override def onStageCompleted(event: SparkListenerStageCompleted): Unit = { | |
log.info(s"Stage accumulator values:${event.stageInfo.name}") | |
event.stageInfo.accumulables.foreach { case (id, accInfo) => | |
log.info(s"$id:${accInfo.name}:${accInfo.value}") | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment