Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion core/src/main/scala/org/apache/spark/SparkContext.scala
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,7 @@ class SparkContext(config: SparkConf) extends Logging {
_statusTracker = new SparkStatusTracker(this, _statusStore)

_progressBar =
if (_conf.get(UI_SHOW_CONSOLE_PROGRESS) && !log.isInfoEnabled) {
if (_conf.get(UI_SHOW_CONSOLE_PROGRESS)) {
Some(new ConsoleProgressBar(this))
} else {
None
Expand Down
18 changes: 18 additions & 0 deletions core/src/test/scala/org/apache/spark/deploy/SparkSubmitSuite.scala
Original file line number Diff line number Diff line change
Expand Up @@ -479,11 +479,29 @@ class SparkSubmitSuite
val appArgs1 = new SparkSubmitArguments(clArgs1)
val (_, _, conf1, _) = submit.prepareSubmitEnvironment(appArgs1)
conf1.get(UI_SHOW_CONSOLE_PROGRESS) should be (true)
var sc1: SparkContext = null
try {
sc1 = new SparkContext(conf1)
assert(sc1.progressBar.isDefined)
} finally {
if (sc1 != null) {
sc1.stop()
}
}

val clArgs2 = Seq("--class", "org.SomeClass", "thejar.jar")
val appArgs2 = new SparkSubmitArguments(clArgs2)
val (_, _, conf2, _) = submit.prepareSubmitEnvironment(appArgs2)
assert(!conf2.contains(UI_SHOW_CONSOLE_PROGRESS))
var sc2: SparkContext = null
try {
sc2 = new SparkContext(conf2)
assert(!sc2.progressBar.isDefined)
} finally {
if (sc2 != null) {
sc2.stop()
}
}
}

test("launch simple application with spark-submit") {
Expand Down