Skip to content

Commit

Permalink
Use more general key
Browse files Browse the repository at this point in the history
  • Loading branch information
zeotuan committed May 14, 2024
1 parent 1449b1f commit eaf09c9
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,7 @@ object LogKeys {
case object CLASS_LOADER extends LogKey
case object CLASS_NAME extends LogKey
case object CLASS_PATH extends LogKey
case object CLASS_PATHS extends LogKey
case object CLAUSES extends LogKey
case object CLUSTER_CENTROIDS extends LogKey
case object CLUSTER_ID extends LogKey
Expand Down Expand Up @@ -474,7 +475,6 @@ object LogKeys {
case object PROCESS extends LogKey
case object PROCESSING_TIME extends LogKey
case object PRODUCER_ID extends LogKey
case object PROPERTY_FILE extends LogKey
case object PROPERTY_NAME extends LogKey
case object PROVIDER extends LogKey
case object PUSHED_FILTERS extends LogKey
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ private[spark] class SparkSubmit extends Logging {
// sysProps may contain sensitive information, so redact before printing
logInfo(log"Spark config:\n" +
log"${MDC(LogKeys.CONFIG, Utils.redact(sparkConf.getAll.toMap).sorted.mkString("\n"))}")
logInfo(log"Classpath elements:\n${MDC(LogKeys.CLASS_PATH, childClasspath.mkString("\n"))}")
logInfo(log"Classpath elements:\n${MDC(LogKeys.CLASS_PATHS, childClasspath.mkString("\n"))}")
logInfo("\n")
}
assert(!(args.deployMode == "cluster" && args.proxyUser != null && childClasspath.nonEmpty) ||
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ private[deploy] class SparkSubmitArguments(args: Seq[String], env: Map[String, S
lazy val defaultSparkProperties: HashMap[String, String] = {
val defaultProperties = new HashMap[String, String]()
if (verbose) {
logInfo(log"Using properties file: ${MDC(PROPERTY_FILE, propertiesFile)}")
logInfo(log"Using properties file: ${MDC(PATH, propertiesFile)}")
}
Option(propertiesFile).foreach { filename =>
val properties = Utils.getPropertiesFromFile(filename)
Expand All @@ -99,7 +99,7 @@ private[deploy] class SparkSubmitArguments(args: Seq[String], env: Map[String, S
// Property files may contain sensitive information, so redact before printing
if (verbose) {
Utils.redact(properties).foreach { case (k, v) =>
logInfo(log"Adding default property: ${MDC(PROPERTY_NAME, k)}=${MDC(VALUE, v)}")
logInfo(log"Adding default property: ${MDC(KEY, k)}=${MDC(VALUE, v)}")
}
}
}
Expand Down

0 comments on commit eaf09c9

Please sign in to comment.