Search in sources :

Example 1 with CommonNodeLabelsManager

use of org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager in project hadoop by apache.

the class RMAdminCLI method getNodeLabelManagerInstance.

// Make it protected to make unit test can change it.
protected static synchronized CommonNodeLabelsManager getNodeLabelManagerInstance(Configuration conf) {
    if (localNodeLabelsManager == null) {
        localNodeLabelsManager = new CommonNodeLabelsManager();
        localNodeLabelsManager.init(conf);
        localNodeLabelsManager.start();
    }
    return localNodeLabelsManager;
}
Also used : CommonNodeLabelsManager(org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager)

Example 2 with CommonNodeLabelsManager

use of org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager in project hadoop by apache.

the class ClusterCLI method getNodeLabelManagerInstance.

@VisibleForTesting
static synchronized CommonNodeLabelsManager getNodeLabelManagerInstance(Configuration conf) {
    if (localNodeLabelsManager == null) {
        localNodeLabelsManager = new CommonNodeLabelsManager();
        localNodeLabelsManager.init(conf);
        localNodeLabelsManager.start();
    }
    return localNodeLabelsManager;
}
Also used : CommonNodeLabelsManager(org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager) VisibleForTesting(com.google.common.annotations.VisibleForTesting)

Aggregations

CommonNodeLabelsManager (org.apache.hadoop.yarn.nodelabels.CommonNodeLabelsManager)2 VisibleForTesting (com.google.common.annotations.VisibleForTesting)1