use of com.cloudera.api.swagger.model.ApiServiceState in project cloudbreak by hortonworks.
the class ClouderaManagerMgmtLaunchService method startManagementServices.
void startManagementServices(Stack stack, ApiClient apiClient) throws ApiException {
MgmtServiceResourceApi mgmtServiceResourceApi = getMgmtServiceResourceApi(apiClient);
ApiService mgmtService = getMgmtService(mgmtServiceResourceApi);
Optional<ApiCommand> startCommand = Optional.empty();
ApiServiceState serviceState = mgmtService.getServiceState();
if (serviceState != ApiServiceState.STARTED && serviceState != ApiServiceState.STARTING) {
startCommand = Optional.of(mgmtServiceResourceApi.startCommand());
}
startCommand.ifPresent(command -> startPolling(stack, apiClient, command));
}
Aggregations