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
e47c95ffbf
commit
4fb72699ff
|
@ -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