rootResourceV6.getClustersResource()
.getServicesResource(blueprint.getName())
.getRolesResource(hdfsServiceName).readRoles();
for (ApiRole role : roleList.getRoles()) {
if (role.getHostRef().getHostId().equals(hosts.get(2).getHostId())) {
ApiRoleRef roleRef = new ApiRoleRef();
roleRef.setClusterName(blueprint.getName());
roleRef.setServiceName(hdfsServiceName);
roleRef.setRoleName(role.getName());
roleRefs.add(roleRef);
}
}
roleList =
rootResourceV6.getClustersResource()
.getServicesResource(blueprint.getName())
.getRolesResource(yarnServiceName).readRoles();
for (ApiRole role : roleList.getRoles()) {
if (role.getHostRef().getHostId().equals(hosts.get(2).getHostId())) {
ApiRoleRef roleRef = new ApiRoleRef();
roleRef.setClusterName(blueprint.getName());
roleRef.setServiceName(yarnServiceName);
roleRef.setRoleName(role.getName());
roleRefs.add(roleRef);
}
}
hosts.get(2).setRoleRefs(roleRefs);
ClusterReport report = provider.queryClusterStatus(blueprint);