@Test public void reportsClusterStartedWhenAllRolesAreStarted() throws ApiException { cmIsReachable(); servicesAre( new ApiService().name("service1").serviceState(ApiServiceState.STARTED), new ApiService().name("service2").serviceState(ApiServiceState.STARTED) ); rolesAre("service1", new ApiRole().name("role 1.1").roleState(ApiRoleState.STARTED), new ApiRole().name("role 1.2").roleState(ApiRoleState.STARTED) ); rolesAre("service2", new ApiRole().name("role 2.1").roleState(ApiRoleState.STARTED), new ApiRole().name("role 2.2").roleState(ApiRoleState.STARTED) ); assertEquals(ClusterStatus.STARTED, subject.getStatus(true).getClusterStatus()); }
@Override public ClusterStatusResult getStatus(boolean blueprintPresent) { if (!isClusterManagerRunning()) { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_NOT_RUNNING); } else if (blueprintPresent) { return determineClusterStatus(stack); } else { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_RUNNING); } }
ClouderaManagerClusterStatusService implements ClusterStatusService { @Override public ClusterStatusResult getStatus(boolean blueprintPresent) { if (!isClusterManagerRunning()) { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_NOT_RUNNING); } else if (blueprintPresent) { return determineClusterStatus(stack); } else { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_RUNNING); } } }
ClouderaManagerClusterStatusService implements ClusterStatusService { @Override public ClusterStatusResult getStatus(boolean blueprintPresent) { if (!isClusterManagerRunning()) { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_NOT_RUNNING); } else if (blueprintPresent) { return determineClusterStatus(stack); } else { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_RUNNING); } } ClouderaManagerClusterStatusService(Stack stack, HttpClientConfig clientConfig); }
ClouderaManagerClusterStatusService implements ClusterStatusService { @Override public ClusterStatusResult getStatus(boolean blueprintPresent) { if (!isClusterManagerRunning()) { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_NOT_RUNNING); } else if (blueprintPresent) { return determineClusterStatus(stack); } else { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_RUNNING); } } ClouderaManagerClusterStatusService(Stack stack, HttpClientConfig clientConfig); @PostConstruct void initApiClient(); @Override ClusterStatusResult getStatus(boolean blueprintPresent); @Override ExtendedHostStatuses getExtendedHostStatuses(); @Override Map<HostName, ClusterManagerState.ClusterManagerStatus> getHostStatuses(); @Override Map<HostName, String> getHostStatusesRaw(); @Override boolean isClusterManagerRunning(); }
ClouderaManagerClusterStatusService implements ClusterStatusService { @Override public ClusterStatusResult getStatus(boolean blueprintPresent) { if (!isClusterManagerRunning()) { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_NOT_RUNNING); } else if (blueprintPresent) { return determineClusterStatus(stack); } else { return ClusterStatusResult.of(ClusterStatus.CLUSTERMANAGER_RUNNING); } } ClouderaManagerClusterStatusService(Stack stack, HttpClientConfig clientConfig); @PostConstruct void initApiClient(); @Override ClusterStatusResult getStatus(boolean blueprintPresent); @Override ExtendedHostStatuses getExtendedHostStatuses(); @Override Map<HostName, ClusterManagerState.ClusterManagerStatus> getHostStatuses(); @Override Map<HostName, String> getHostStatusesRaw(); @Override boolean isClusterManagerRunning();  }