@Test public void testGetHosts() throws Exception { ClusterDefinition clusterDefinition = new ClusterDefinition(new TestStateProvider(), new TestClusterDefinitionProvider(), new TestHostInfoProvider()); Set<String> hosts = clusterDefinition.getHosts(); Assert.assertTrue(hosts.contains("NAMENODE_MASTER.acme.com")); Assert.assertTrue(hosts.contains("SECONDARY_NAMENODE_MASTER.acme.com")); Assert.assertTrue(hosts.contains("FLUME_SERVICE1.acme.com")); Assert.assertTrue(hosts.contains("FLUME_SERVICE2.acme.com")); Assert.assertTrue(hosts.contains("FLUME_SERVICE3.acme.com")); Assert.assertTrue(hosts.contains("HBASE_MASTER.acme.com")); Assert.assertTrue(hosts.contains("HIVE_SERVER_MASTER.acme.com")); Assert.assertTrue(hosts.contains("JOBTRACKER_MASTER.acme.com")); Assert.assertTrue(hosts.contains("OOZIE_SERVER_MASTER.acme.com")); Assert.assertTrue(hosts.contains("slave1.acme.com")); Assert.assertTrue(hosts.contains("slave2.acme.com")); Assert.assertTrue(hosts.contains("slave3.acme.com")); Assert.assertTrue(hosts.contains("WEBHCAT_MASTER.acme.com")); }
public Set<String> getHosts() { return hosts; }
ClusterDefinition { public Set<String> getHosts() { return hosts; } }
ClusterDefinition { public Set<String> getHosts() { return hosts; } ClusterDefinition(StateProvider stateProvider,
                           ClusterDefinitionProvider definitionProvider,
                           HostInfoProvider hostInfoProvider); }
ClusterDefinition { public Set<String> getHosts() { return hosts; } ClusterDefinition(StateProvider stateProvider,
                           ClusterDefinitionProvider definitionProvider,
                           HostInfoProvider hostInfoProvider); Integer getMajorStackVersion(); Integer getMinorStackVersion(); String getClusterName(); String getVersionId(); Set<String> getServices(); Set<String> getHosts(); HostInfoProvider getHostInfoProvider(); Set<String> getComponents(String service); Set<String> getHostComponents(String service, String host); String getHostState(String hostName); String getServiceState(String serviceName); int setServiceState(String serviceName, String state); String getComponentState(String serviceName, String componentName); int setComponentState(String serviceName, String componentName, String state); String getHostComponentState(String hostName, String componentName); int setHostComponentState(String hostName, String componentName, String state); StateProvider.Process getProcess(Integer id); Set<Resource> getRequestResources(); Set<Resource> getTaskResources(); }
ClusterDefinition { public Set<String> getHosts() { return hosts; } ClusterDefinition(StateProvider stateProvider,
                           ClusterDefinitionProvider definitionProvider,
                           HostInfoProvider hostInfoProvider); Integer getMajorStackVersion(); Integer getMinorStackVersion(); String getClusterName(); String getVersionId(); Set<String> getServices(); Set<String> getHosts(); HostInfoProvider getHostInfoProvider(); Set<String> getComponents(String service); Set<String> getHostComponents(String service, String host); String getHostState(String hostName); String getServiceState(String serviceName); int setServiceState(String serviceName, String state); String getComponentState(String serviceName, String componentName); int setComponentState(String serviceName, String componentName, String state); String getHostComponentState(String hostName, String componentName); int setHostComponentState(String hostName, String componentName, String state); StateProvider.Process getProcess(Integer id); Set<Resource> getRequestResources(); Set<Resource> getTaskResources();  }