Package com.cloudera.api.model

Examples of com.cloudera.api.model.ApiHostList


public class FakeHostsResource implements HostsResourceV2 {

   ApiHostList hosts;

   public FakeHostsResource() {
      hosts = new ApiHostList();
   }
View Full Code Here


   }

   @Override
   public ApiCommand hostInstallCommand(ApiHostInstallArguments apiHostInstallArguments) {
      System.out.println("calling " + this.getClass().getInterfaces()[0].getName() + "#" + Thread.currentThread().getStackTrace()[1].getMethodName());
      ApiHostList hosts = new ApiHostList();
      for (String ip : apiHostInstallArguments.getHostNames()) {
         ApiHost host = new ApiHost();
         host.setHostId(UUID.randomUUID().toString());
         host.setIpAddress(ip);
         host.setHostname(ip);
         hosts.add(host);
      }
      hostsResourceV2.createHosts(hosts);

      ApiCommand command = new ApiCommand();
      command.setName("installHosts");
View Full Code Here

   }

   @Test( groups = { "TestClouderaManagerImpl" }, dependsOnMethods = { "testCreateCluster" })
   public void testQueryClusterStatus() {
      blueprint.getHadoopStack().setDistro("CDH-5.0.1");
      ApiHostList hostList = rootResourceV6.getHostsResource().readHosts(DataView.SUMMARY);
      List<ApiHost> hosts = hostList.getHosts();
      hosts.get(0).setHealthSummary(ApiHealthSummary.BAD);
      hosts.get(1).setHealthSummary(ApiHealthSummary.CONCERNING);
      hosts.get(2).setHealthSummary(ApiHealthSummary.GOOD);
      hosts.get(3).setHealthSummary(ApiHealthSummary.NOT_AVAILABLE);
      List<ApiRoleRef> roleRefs = new ArrayList<>();
View Full Code Here

TOP

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

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.