YARN-6420. RM startup failure due to wrong order in nodelabel editlog (Bibin A Chundatt via Varun Saxena)
(cherry picked from commit 19b89c4c7b
)
This commit is contained in:
parent
88e1799034
commit
05c008256a
|
@ -34,6 +34,7 @@ import java.util.concurrent.ConcurrentMap;
|
|||
import org.apache.hadoop.conf.Configuration;
|
||||
import org.apache.hadoop.security.UserGroupInformation;
|
||||
import org.apache.hadoop.yarn.api.records.NodeId;
|
||||
import org.apache.hadoop.yarn.api.records.NodeLabel;
|
||||
import org.apache.hadoop.yarn.api.records.Resource;
|
||||
import org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager;
|
||||
import org.apache.hadoop.yarn.nodelabels.RMNodeLabel;
|
||||
|
@ -133,6 +134,17 @@ public class RMNodeLabelsManager extends CommonNodeLabelsManager {
|
|||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addToCluserNodeLabels(Collection<NodeLabel> labels)
|
||||
throws IOException {
|
||||
try {
|
||||
writeLock.lock();
|
||||
super.addToCluserNodeLabels(labels);
|
||||
} finally {
|
||||
writeLock.unlock();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void
|
||||
removeLabelsFromNode(Map<NodeId, Set<String>> removeLabelsFromNode)
|
||||
|
|
Loading…
Reference in New Issue