Examples of ApiClusterList


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

Examples of com.cloudera.api.model.ApiClusterList

   }

   @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

Examples of com.cloudera.api.model.ApiClusterList

      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

Examples of com.cloudera.api.model.ApiClusterList

      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

Examples of com.cloudera.api.model.ApiClusterList

      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

Examples of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiClusterList

      Assert.assertEquals("DATANODE", apiManager.getStackComponent("HDP", "2.1", "YARN", "DATANODE").getApiComponent().getComponentName());
   }

   @Test
   public void testGetClusterList() throws Exception {
      ApiClusterList apiClusterList = apiManager.getClusterList();
      Assert.assertTrue(apiClusterList.getClusters().size() == 0);
   }
View Full Code Here

Examples of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiClusterList

      return null;
   }

   @Override
   public ApiClusterList getClusterList() {
      return new ApiClusterList();
   }
View Full Code Here

Examples of com.vmware.bdd.plugin.ambari.api.model.cluster.ApiClusterList

         throw AmbariApiException.CANNOT_CONNECT_AMBARI_SERVER(e);
      }
      String clustersJson = handleAmbariResponse(response);
      logger.debug("Response of cluster list from ambari server:");
      logger.debug(clustersJson);
      ApiClusterList apiClusterList =
            ApiUtils.jsonToObject(ApiClusterList.class, clustersJson);
      return apiClusterList;
   }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.