Search in sources :

Example 1 with OrchestratorView

use of com.sequenceiq.cloudbreak.domain.view.OrchestratorView in project cloudbreak by hortonworks.

the class ClusterCreationService method startingAmbariServices.

public void startingAmbariServices(StackView stack) throws CloudbreakException {
    OrchestratorView orchestrator = stack.getOrchestrator();
    OrchestratorType orchestratorType = orchestratorTypeResolver.resolveType(orchestrator.getType());
    stackUpdater.updateStackStatus(stack.getId(), DetailedStackStatus.STARTING_AMBARI_SERVICES, "Running cluster services.");
    if (orchestratorType.containerOrchestrator()) {
        flowMessageService.fireEventAndLog(stack.getId(), Msg.AMBARI_CLUSTER_RUN_CONTAINERS, UPDATE_IN_PROGRESS.name());
    } else if (orchestratorType.hostOrchestrator()) {
        flowMessageService.fireEventAndLog(stack.getId(), Msg.AMBARI_CLUSTER_RUN_SERVICES, UPDATE_IN_PROGRESS.name());
    } else {
        LOGGER.info(String.format("Please implement %s orchestrator because it is not on classpath.", orchestrator.getType()));
        throw new CloudbreakException(String.format("Please implement %s orchestrator because it is not on classpath.", orchestrator.getType()));
    }
}
Also used : OrchestratorView(com.sequenceiq.cloudbreak.domain.view.OrchestratorView) CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) OrchestratorType(com.sequenceiq.cloudbreak.common.model.OrchestratorType)

Aggregations

OrchestratorType (com.sequenceiq.cloudbreak.common.model.OrchestratorType)1 OrchestratorView (com.sequenceiq.cloudbreak.domain.view.OrchestratorView)1 CloudbreakException (com.sequenceiq.cloudbreak.service.CloudbreakException)1