Skip to content

Commit 2f3f8b2

Browse files
Ji YanJi Yan
authored andcommitted
guard against having equality sign inside the parameter value
1 parent cbb784a commit 2f3f8b2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosSchedulerBackendUtil.scala

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,9 @@ private[mesos] object MesosSchedulerBackendUtil extends Logging {
104104
* takes the form key=value
105105
*/
106106
private def parseParamsSpec(params: String): List[Parameter] = {
107-
params.split(",").map(_.split("=")).flatMap { spec: Array[String] =>
107+
// split with limit of 2 to avoid parsing error when '='
108+
// exists in the parameter value
109+
params.split(",").map(_.split("=", 2)).flatMap { spec: Array[String] =>
108110
val param: Parameter.Builder = Parameter.newBuilder()
109111
spec match {
110112
case Array(key, value) =>

0 commit comments

Comments
 (0)