Package com.cloudera.api.model

Examples of com.cloudera.api.model.ApiRoleList


public class FakeRolesResource implements RolesResourceV6 {

   public ApiRoleList roles;

   public FakeRolesResource(List<ApiRole> roleList) {
      roles = new ApiRoleList();
      for (ApiRole role : roleList) {
         roles.add(role);
      }
   }
View Full Code Here


               String action = "Configuring service " + apiService.getDisplayName();
               cluster.getCurrentReport().setNodesAction(action, addedNodeNames);
               reportQueue.addClusterReport(cluster.getCurrentReport().clone());

               logger.debug("Creating roles " + newRoles);
               ApiRoleList roleList =
                     apiResourceRootV6.getClustersResource()
                     .getServicesResource(cluster.getName())
                     .getRolesResource(apiService.getName())
                     .createRoles(new ApiRoleList(newRoles));
               result.get(apiService.getName()).addAll(roleList.getRoles());
            }
         }
         logger.info("Finished configure services");

         syncRolesId(cluster);
View Full Code Here

      hosts.get(2).setHealthSummary(ApiHealthSummary.GOOD);
      hosts.get(3).setHealthSummary(ApiHealthSummary.NOT_AVAILABLE);
      List<ApiRoleRef> roleRefs = new ArrayList<>();
      String hdfsServiceName = blueprint.getName() + "_HDFS";
      String yarnServiceName = blueprint.getName() + "_YARN";
      ApiRoleList roleList =
            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());
View Full Code Here

TOP

Related Classes of com.cloudera.api.model.ApiRoleList

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.