File tree Expand file tree Collapse file tree
master/src/main/scala/org/apache/celeborn/service/deploy/master/tags Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -52,17 +52,18 @@ class TagsManager(configService: Option[ConfigService]) extends Logging {
5252 workers : util.List [WorkerInfo ]): util.List [WorkerInfo ] = {
5353
5454 val tags = resolveTagsExpr(userIdentifier, clientTagsExpr)
55- .split(" , " ).map(_.trim).filter(_.nonEmpty)
55+ .split(',' ).map(_.trim).filter(_.nonEmpty)
5656
5757 if (tags.isEmpty) {
5858 logDebug(" No tags provided, returning all workers" )
5959 return workers
6060 }
6161
62+ val store = tagStore
6263 val workerTagsPredicate = new Predicate [WorkerInfo ] {
6364 override def test (w : WorkerInfo ): Boolean = tags.forall { tag =>
6465 w.tags.contains(tag) ||
65- tagStore.exists(_.getOrDefault(tag, Collections .emptySet()) .contains(w.toUniqueId))
66+ store.flatMap(s => Option (s.get(tag))).exists(_ .contains(w.toUniqueId))
6667 }
6768 }
6869 workers.stream().filter(workerTagsPredicate).collect(Collectors .toList())
You can’t perform that action at this time.
0 commit comments