本文整理了Java中org.springframework.yarn.boot.actuate.endpoint.mvc.domain.YarnContainerClusterEndpointResource
类的一些代码示例,展示了YarnContainerClusterEndpointResource
类的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。YarnContainerClusterEndpointResource
类的具体详情如下:
包路径:org.springframework.yarn.boot.actuate.endpoint.mvc.domain.YarnContainerClusterEndpointResource
类名称:YarnContainerClusterEndpointResource
[英]Response domain mapping for YarnContainerClusterMvcEndpoint#invoke().
[中]YarnContainerClusterMvcEndpoint#invoke()的响应域映射。
代码示例来源:origin: org.springframework.cloud/spring-cloud-deployer-yarn
public Collection<String> getClustersInfo(ApplicationId applicationId) {
YarnContainerClusterOperations operations = buildClusterOperations(restTemplate, yarnClient, applicationId);
YarnContainerClusterEndpointResource response = operations.getClusters();
return response.getClusters();
}
代码示例来源:origin: org.springframework.data/spring-yarn-boot
/**
* Main {@link EndpointMvcAdapter#invoke()} which returns information
* about existing container clusters.
*/
@RequestMapping(method = RequestMethod.GET)
@ResponseBody
public Object invoke() {
Collection<ContainerCluster> clusters = delegate.getClusters().values();
YarnContainerClusterEndpointResource response = new YarnContainerClusterEndpointResource();
Collection<String> clusterIds = new ArrayList<String>();
for (ContainerCluster cluster : clusters) {
clusterIds.add(cluster.getId());
}
response.setClusters(clusterIds);
return response;
}
代码示例来源:origin: org.springframework.data/spring-yarn-boot
private String doClustersInfo(RestTemplate restTemplate, YarnClient client, ApplicationId applicationId) {
YarnContainerClusterOperations operations = buildClusterOperations(restTemplate, client, applicationId);
YarnContainerClusterEndpointResource response = operations.getClusters();
return ContainerClusterReport.clustersInfoReportBuilder()
.add(ClustersInfoField.ID)
.from(new ArrayList<String>(response.getClusters()))
.build().toString();
}
内容来源于网络,如有侵权,请联系作者删除!