From 3d847a194d970907c96b68c51a935e39c3d89aa2 Mon Sep 17 00:00:00 2001 From: Michael Gummelt Date: Tue, 6 Jun 2017 14:41:37 -0700 Subject: [PATCH] Support empty label string --- .../spark/scheduler/cluster/mesos/MesosProtoUtils.scala | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosProtoUtils.scala b/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosProtoUtils.scala index e08813928c34f..f816c61c53143 100644 --- a/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosProtoUtils.scala +++ b/resource-managers/mesos/src/main/scala/org/apache/spark/scheduler/cluster/mesos/MesosProtoUtils.scala @@ -85,7 +85,10 @@ object MesosProtoUtils extends Logging { i += 1 } - addLabel() + if (key.isDefined) { + addLabel() + } + labels } }