YARN-6420. RM startup failure due to wrong order in nodelabel editlog (Bibin A Chundatt via Varun Saxena)

This commit is contained in:
Varun Saxena 2017-04-05 09:16:35 +05:30
parent 8cb7325527
commit 19b89c4c7b

View File

@ -34,6 +34,7 @@
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 void removeFromClusterNodeLabels(Collection<String> labelsToRemove)
}
}
@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)