Package com.cloudera.api.model

Examples of com.cloudera.api.model.ApiClusterList


   public ParcelsResourceV5 parcelsResource;
   public ServicesResourceV6 servicesResource;
   public FakeRootResource rootResource;

   public FakeClustersResource(FakeRootResource root) {
      clusters = new ApiClusterList();
      parcelsResource = new FakeParcelsResource();
      servicesResource = new FakeServicesResource();
      rootResource = root;
   }
View Full Code Here


   }

   @Override
   public List<HadoopStack> getSupportedStacks() throws SoftwareManagementPluginException {
      String randomClusterName = UUID.randomUUID().toString();
      final ApiClusterList clusterList = new ApiClusterList();
      ApiCluster apiCluster = new ApiCluster();
      apiCluster.setName(randomClusterName);
      apiCluster.setVersion(ApiClusterVersion.CDH5);
      clusterList.add(apiCluster);
      try {
         List<HadoopStack> hadoopStacks = new ArrayList<HadoopStack>();
         apiResourceRootV6.getClustersResource().createClusters(clusterList);
         for (ApiParcel apiParcel : apiResourceRootV6.getClustersResource().getParcelsResource(randomClusterName)
               .readParcels(DataView.SUMMARY).getParcels()) {
View Full Code Here

      if (!isProvisioned(cluster.getName())) {
         executeAndReport("Inspecting Hosts", addedNodes, apiResourceRootV6.getClouderaManagerResource().inspectHostsCommand(),
               ProgressSplit.INSPECT_HOSTS.getProgress(), cluster.getCurrentReport(), reportQueue, false);

         final ApiClusterList clusterList = new ApiClusterList();
         ApiCluster apiCluster = new ApiCluster();
         apiCluster.setName(cluster.getName());
         apiCluster.setVersion(ApiClusterVersion.valueOf(cluster.getVersion()));
         apiCluster.setFullVersion(cluster.getFullVersion());
         clusterList.add(apiCluster);

         apiResourceRootV6.getClustersResource().createClusters(clusterList);
      } else {
         /*
         For cluster resume/resize, the cluster is already exist, we need to check if this cluster is created by BDE.
View Full Code Here

      roleList.add(role);
      RolesResourceV6 rolesResourceV6 = new FakeRolesResource(roleList);
      Mockito.when(servicesResourceV6.getRolesResource(hdfs.getName())).thenReturn(rolesResourceV6);
      Mockito.when(resourceV6.getServicesResource(blueprint.getName())).thenReturn(servicesResourceV6);

      ApiClusterList apiClusterList = new ApiClusterList();
      ApiCluster apiCluster = new ApiCluster();
      apiCluster.setName(blueprint.getName());
      apiClusterList.add(apiCluster);
      Mockito.when(resourceV6.readClusters((DataView) anyObject())).thenReturn(apiClusterList);

      RootResourceV6 fakeRootResourceV6 = Mockito.mock(FakeRootResource.class);
      Mockito.when(fakeRootResourceV6.getClustersResource()).thenReturn(resourceV6);
View Full Code Here

      roleList.add(role);
      RolesResourceV6 rolesResourceV6 = new FakeRolesResource(roleList);
      Mockito.when(servicesResourceV6.getRolesResource(hdfs.getName())).thenReturn(rolesResourceV6);
      Mockito.when(resourceV6.getServicesResource(blueprint.getName())).thenReturn(servicesResourceV6);

      ApiClusterList apiClusterList = new ApiClusterList();
      ApiCluster apiCluster = new ApiCluster();
      apiCluster.setName(blueprint.getName());
      apiClusterList.add(apiCluster);
      Mockito.when(resourceV6.readClusters((DataView) anyObject())).thenReturn(apiClusterList);

      RootResourceV6 fakeRootResourceV6 = Mockito.mock(FakeRootResource.class);
      Mockito.when(fakeRootResourceV6.getClustersResource()).thenReturn(resourceV6);
View Full Code Here

TOP

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

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.