void printClusterNodeLabels() throws YarnException, IOException { List<NodeLabel> nodeLabels = null; if (accessLocal) { nodeLabels = new ArrayList<>(getNodeLabelManagerInstance(getConf()).getClusterNodeLabels()); } else { nodeLabels = new ArrayList<>(client.getClusterNodeLabels()); } sysout.println(String.format("Node Labels: %s", StringUtils.join(nodeLabels.iterator(), ","))); }
void printClusterNodeLabels() throws YarnException, IOException { List<NodeLabel> nodeLabels = null; if (accessLocal) { nodeLabels = new ArrayList<>(getNodeLabelManagerInstance(getConf()).getClusterNodeLabels()); } else { nodeLabels = new ArrayList<>(client.getClusterNodeLabels()); } sysout.println(String.format("Node Labels: %s", StringUtils.join(nodeLabels.iterator(), ","))); }
void printClusterNodeLabels() throws YarnException, IOException { Set<String> nodeLabels = null; if (accessLocal) { nodeLabels = getNodeLabelManagerInstance(getConf()).getClusterNodeLabels(); } else { nodeLabels = client.getClusterNodeLabels(); } sysout.println(String.format("Node Labels: %s", StringUtils.join(sortStrSet(nodeLabels).iterator(), ","))); }
void printClusterNodeLabels() throws YarnException, IOException { Set<String> nodeLabels = null; if (accessLocal) { nodeLabels = getNodeLabelManagerInstance(getConf()).getClusterNodeLabels(); } else { nodeLabels = client.getClusterNodeLabels(); } sysout.println(String.format("Node Labels: %s", StringUtils.join(sortStrSet(nodeLabels).iterator(), ","))); }
FSDataOutputStream os = fs.create(writingMirrorPath, true); ((AddToClusterNodeLabelsRequestPBImpl) AddToClusterNodeLabelsRequestPBImpl .newInstance(mgr.getClusterNodeLabels())).getProto().writeDelimitedTo(os); ((ReplaceLabelsOnNodeRequestPBImpl) ReplaceLabelsOnNodeRequest .newInstance(mgr.getNodeLabels())).getProto().writeDelimitedTo(os);
FSDataOutputStream os = fs.create(writingMirrorPath, true); ((AddToClusterNodeLabelsRequestPBImpl) AddToClusterNodeLabelsRequestPBImpl .newInstance(mgr.getClusterNodeLabels())).getProto().writeDelimitedTo(os); ((ReplaceLabelsOnNodeRequestPBImpl) ReplaceLabelsOnNodeRequest .newInstance(mgr.getNodeLabels())).getProto().writeDelimitedTo(os);
@Override public void write(OutputStream os, CommonNodeLabelsManager mgr) throws IOException { ((AddToClusterNodeLabelsRequestPBImpl) AddToClusterNodeLabelsRequestPBImpl .newInstance(mgr.getClusterNodeLabels())).getProto() .writeDelimitedTo(os); if (mgr.isCentralizedConfiguration()) { ((ReplaceLabelsOnNodeRequestPBImpl) ReplaceLabelsOnNodeRequest .newInstance(mgr.getNodeLabels())).getProto().writeDelimitedTo(os); } }