Skip to content

Commit

Permalink
Add "spark.history.timeZone" to internal/config.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangyum committed Nov 8, 2017
1 parent 5291d16 commit d9994ea
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@ import org.apache.hadoop.security.token.delegation.AbstractDelegationTokenIdenti
import org.apache.spark.{SparkConf, SparkException}
import org.apache.spark.annotation.DeveloperApi
import org.apache.spark.internal.Logging
import org.apache.spark.internal.config._
import org.apache.spark.util.Utils

/**
Expand Down Expand Up @@ -426,7 +427,7 @@ class SparkHadoopUtil extends Logging {
ugi.getAuthenticationMethod() == UserGroupInformation.AuthenticationMethod.PROXY
}

def getHistoryServerTimeZone: String = sparkConf.get("spark.history.timeZone", "GMT")
def getHistoryServerTimeZone: String = sparkConf.get(HISTORY_TIMEZONE)

}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@

package org.apache.spark.internal

import java.util.TimeZone
import java.util.concurrent.TimeUnit

import org.apache.spark.launcher.SparkLauncher
Expand Down Expand Up @@ -226,6 +227,11 @@ package object config {
private[spark] val HISTORY_UI_MAX_APPS =
ConfigBuilder("spark.history.ui.maxApplications").intConf.createWithDefault(Integer.MAX_VALUE)

private[spark] val HISTORY_TIMEZONE = ConfigBuilder("spark.history.timeZone")
.doc("""The ID of history server timezone, e.g. "America/Los_Angeles", "Asia/Shanghai", etc.""")
.stringConf
.createWithDefault("GMT")

private[spark] val UI_SHOW_CONSOLE_PROGRESS = ConfigBuilder("spark.ui.showConsoleProgress")
.doc("When true, show the progress bar in the console.")
.booleanConf
Expand Down

0 comments on commit d9994ea

Please sign in to comment.