Skip to content

Commit

Permalink
YARN-10823. Fix default node label if no label is defined
Browse files Browse the repository at this point in the history
  • Loading branch information
9uapaw committed Sep 21, 2021
1 parent f509d98 commit ef560cd
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,13 @@ public void setLabelsByQueue(
* @return all node labels
*/
public Set<String> getAllConfiguredLabels() {
return configuredNodeLabelsByQueue.values().stream()
Set<String> nodeLabels = configuredNodeLabelsByQueue.values().stream()
.flatMap(Set::stream).collect(Collectors.toSet());

if (nodeLabels.size() == 0) {
nodeLabels = NO_LABEL;
}

return nodeLabels;
}
}

0 comments on commit ef560cd

Please sign in to comment.