org.apache.hadoop.yarn.api.ApplicationClientProtocol.getClusterNodeLabels()方法的使用及代码示例

x33g5p2x  于2022-01-16 转载在 其他  
字(4.5k)|赞(0)|评价(0)|浏览(133)

本文整理了Java中org.apache.hadoop.yarn.api.ApplicationClientProtocol.getClusterNodeLabels()方法的一些代码示例,展示了ApplicationClientProtocol.getClusterNodeLabels()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。ApplicationClientProtocol.getClusterNodeLabels()方法的具体详情如下:
包路径:org.apache.hadoop.yarn.api.ApplicationClientProtocol
类名称:ApplicationClientProtocol
方法名:getClusterNodeLabels

ApplicationClientProtocol.getClusterNodeLabels介绍

[英]The interface used by client to get node labels in the cluster
[中]客户端用于获取群集中节点标签的接口

代码示例

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-router

@Override
public GetClusterNodeLabelsResponse getClusterNodeLabels(
  GetClusterNodeLabelsRequest request) throws YarnException, IOException {
 return clientRMProxy.getClusterNodeLabels(request);
}

代码示例来源:origin: io.hops/hadoop-yarn-client

@Override
public List<NodeLabel> getClusterNodeLabels() throws YarnException, IOException {
 return rmClient.getClusterNodeLabels(
   GetClusterNodeLabelsRequest.newInstance()).getNodeLabelList();
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-client

@Override
 public Set<String> getClusterNodeLabels() throws YarnException, IOException {
  return rmClient.getClusterNodeLabels(
    GetClusterNodeLabelsRequest.newInstance()).getNodeLabels();
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-client

@Override
public List<NodeLabel> getClusterNodeLabels() throws YarnException, IOException {
 return rmClient.getClusterNodeLabels(
   GetClusterNodeLabelsRequest.newInstance()).getNodeLabelList();
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-client

@Override
 public Set<String> getClusterNodeLabels() throws YarnException, IOException {
  return rmClient.getClusterNodeLabels(
    GetClusterNodeLabelsRequest.newInstance()).getNodeLabels();
 }
}

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-common

@Override
public GetClusterNodeLabelsResponseProto getClusterNodeLabels(
  RpcController controller, GetClusterNodeLabelsRequestProto proto)
  throws ServiceException {
 GetClusterNodeLabelsRequestPBImpl request =
   new GetClusterNodeLabelsRequestPBImpl(proto);
 try {
  GetClusterNodeLabelsResponse response =
    real.getClusterNodeLabels(request);
  return ((GetClusterNodeLabelsResponsePBImpl) response).getProto();
 } catch (YarnException e) {
  throw new ServiceException(e);
 } catch (IOException e) {
  throw new ServiceException(e);
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-common

@Override
 public GetClusterNodeLabelsResponseProto getClusterNodeLabels(
   RpcController controller, GetClusterNodeLabelsRequestProto proto)
   throws ServiceException {
  GetClusterNodeLabelsRequestPBImpl request =
    new GetClusterNodeLabelsRequestPBImpl(proto);
  try {
   GetClusterNodeLabelsResponse response =
     real.getClusterNodeLabels(request);
   return ((GetClusterNodeLabelsResponsePBImpl) response).getProto();
  } catch (YarnException e) {
   throw new ServiceException(e);
  } catch (IOException e) {
   throw new ServiceException(e);
  }
 }
}

代码示例来源:origin: com.github.jiayuhan-it/hadoop-yarn-common

@Override
 public GetClusterNodeLabelsResponseProto getClusterNodeLabels(
   RpcController controller, GetClusterNodeLabelsRequestProto proto)
   throws ServiceException {
  GetClusterNodeLabelsRequestPBImpl request =
    new GetClusterNodeLabelsRequestPBImpl(proto);
  try {
   GetClusterNodeLabelsResponse response =
     real.getClusterNodeLabels(request);
   return ((GetClusterNodeLabelsResponsePBImpl) response).getProto();
  } catch (YarnException e) {
   throw new ServiceException(e);
  } catch (IOException e) {
   throw new ServiceException(e);
  }
 }
}

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

client.getClusterNodeLabels(GetClusterNodeLabelsRequest.newInstance());
Assert.assertTrue(response.getNodeLabels().containsAll(
  Arrays.asList("x", "y")));

代码示例来源:origin: ch.cern.hadoop/hadoop-yarn-server-resourcemanager

client.getClusterNodeLabels(GetClusterNodeLabelsRequest.newInstance());
Assert.assertTrue(response.getNodeLabels().containsAll(
  Arrays.asList("x", "y", "z")));

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

.getClusterNodeLabels(GetClusterNodeLabelsRequest.newInstance());
Assert.assertTrue(response.getNodeLabelList().containsAll(
  Arrays.asList(labelX, labelY)));

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

.getClusterNodeLabels(GetClusterNodeLabelsRequest.newInstance());
Assert.assertTrue(response.getNodeLabelList().containsAll(
  Arrays.asList(labelX, labelY, labelZ)));

代码示例来源:origin: org.apache.hadoop/hadoop-yarn-server-resourcemanager

.getClusterNodeLabels(GetClusterNodeLabelsRequest.newInstance());
NodeLabel labelX = NodeLabel.newInstance("a");
NodeLabel labelY = NodeLabel.newInstance("b");

相关文章

微信公众号

最新文章

更多

ApplicationClientProtocol类方法