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

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

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

ApplicationClientProtocol.getAttributesToNodes介绍

[英]The interface used by client to get attributes to nodes mappings available in ResourceManager.
[中]客户端用于获取ResourceManager中可用的节点映射属性的接口。

代码示例

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

@Override
public GetAttributesToNodesResponse getAttributesToNodes(
  GetAttributesToNodesRequest request) throws YarnException, IOException {
 return clientRMProxy.getAttributesToNodes(request);
}

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

@Override
public Map<NodeAttributeKey, List<NodeToAttributeValue>> getAttributesToNodes(
  Set<NodeAttributeKey> attributes) throws YarnException, IOException {
 GetAttributesToNodesRequest request =
   GetAttributesToNodesRequest.newInstance(attributes);
 return rmClient.getAttributesToNodes(request).getAttributesToNodes();
}

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

GetAttributesToNodesRequest.newInstance(set);
GetAttributesToNodesResponse response =
  protocol.getAttributesToNodes(request);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
PrintWriter writer = new PrintWriter(

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

@Override
public GetAttributesToNodesResponseProto getAttributesToNodes(
  RpcController controller,
  YarnServiceProtos.GetAttributesToNodesRequestProto proto)
  throws ServiceException {
 GetAttributesToNodesRequestPBImpl req =
   new GetAttributesToNodesRequestPBImpl(proto);
 try {
  GetAttributesToNodesResponse resp = real.getAttributesToNodes(req);
  return ((GetAttributesToNodesResponsePBImpl) resp).getProto();
 } catch (YarnException ye) {
  throw new ServiceException(ye);
 } catch (IOException ie) {
  throw new ServiceException(ie);
 }
}

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

GetAttributesToNodesRequest.newInstance();
GetAttributesToNodesResponse response =
  client.getAttributesToNodes(request);
Map<NodeAttributeKey, List<NodeToAttributeValue>> attrs =
  response.getAttributesToNodes();
  .newInstance(ImmutableSet.of(docker.getAttributeKey()));
GetAttributesToNodesResponse response2 =
  client.getAttributesToNodes(request2);
Map<NodeAttributeKey, List<NodeToAttributeValue>> attrs2 =
  response2.getAttributesToNodes();
    ImmutableSet.of(docker.getAttributeKey(), os.getAttributeKey()));
GetAttributesToNodesResponse response3 =
  client.getAttributesToNodes(request3);
Map<NodeAttributeKey, List<NodeToAttributeValue>> attrs3 =
  response3.getAttributesToNodes();

相关文章

微信公众号

最新文章

更多

ApplicationClientProtocol类方法