What do the numbers on the progress bar mean in spark-shell? -
in spark-shell, entries below mean when execute function ?
[stage7:===========> (14174 + 5) / 62500]
what console progress bar
, [stage 7:
shows stage in now, , (14174 + 5) / 62500]
(numcompletedtasks + numactivetasks) / totalnumoftasksinthisstage]
. progress bar shows numcompletedtasks
/ totalnumoftasksinthisstage
.
it shown when both spark.ui.showconsoleprogress
true (by default) and log level in conf/log4j.properties
error
or warn
(!log.isinfoenabled
true).
let's see code in consoleprogressbar.scala shows out:
private def show(now: long, stages: seq[sparkstageinfo]) { val width = terminalwidth / stages.size val bar = stages.map { s => val total = s.numtasks() val header = s"[stage ${s.stageid()}:" val tailer = s"(${s.numcompletedtasks()} + ${s.numactivetasks()}) / $total]" val w = width - header.length - tailer.length val bar = if (w > 0) { val percent = w * s.numcompletedtasks() / total (0 until w).map { => if (i < percent) "=" else if (i == percent) ">" else " " }.mkstring("") } else { "" } header + bar + tailer }.mkstring("") // refresh if it's changed of after 1 minute (or ssh connection closed // after idle time) if (bar != lastprogressbar || - lastupdatetime > 60 * 1000l) { system.err.print(cr + bar) lastupdatetime = } lastprogressbar = bar }
Comments
Post a Comment