Skip to content

Commit

Permalink
rdar://134595408 Support Scala 2.12 in StandaloneRestServer
Browse files Browse the repository at this point in the history
  • Loading branch information
dongjoon-hyun committed Aug 23, 2024
1 parent fb087f7 commit 32ad908
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,10 @@ private[rest] class StandaloneSubmitRequestServlet(
conf: SparkConf)
extends SubmitRequestServlet {

private val envVariablePattern = "\\{\\{([A-Z_]+)\\}\\}".r

private def replacePlaceHolder(variable: String) = variable match {
case s"{{$name}}" if System.getenv(name) != null => System.getenv(name)
case envVariablePattern(name) if System.getenv(name) != null => System.getenv(name)
case _ => variable
}

Expand Down

0 comments on commit 32ad908

Please sign in to comment.