Search in sources :

Example 1 with PollingResult

use of com.sequenceiq.cloudbreak.service.PollingResult in project cloudbreak by hortonworks.

the class AmbariClusterSecurityServiceTest method testPrepareSecurityWhenEverythingWorks.

@Test
public void testPrepareSecurityWhenEverythingWorks() throws CloudbreakException {
    Stack stack = TestUtil.stack();
    Cluster cluster = TestUtil.cluster();
    stack.setCluster(cluster);
    AmbariClient ambariClient = Mockito.mock(AmbariClient.class);
    when(clientFactory.getAmbariClient(stack, stack.getCluster())).thenReturn(ambariClient);
    when(ambariClient.startService(anyString())).thenReturn(1);
    when(ambariClient.stopService(anyString())).thenReturn(1);
    Map<String, Integer> operationRequests = new HashMap<>();
    operationRequests.put("ZOOKEEPER_SERVICE_STATE", 1);
    operationRequests.put("HDFS_SERVICE_STATE", 1);
    operationRequests.put("YARN_SERVICE_STATE", 1);
    operationRequests.put("MAPREDUCE2_SERVICE_STATE", 1);
    operationRequests.put("KERBEROS_SERVICE_STATE", 1);
    ImmutablePair<PollingResult, Exception> pair = new ImmutablePair<>(PollingResult.SUCCESS, null);
    String failed = "failed";
    when(ambariOperationService.waitForOperations(stack, ambariClient, operationRequests, PREPARE_DEKERBERIZING)).thenReturn(pair);
    when(cloudbreakMessagesService.getMessage(AMBARI_CLUSTER_PREPARE_DEKERBERIZING_FAILED.code())).thenReturn("failed");
    doNothing().when(ambariClusterConnectorPollingResultChecker).checkPollingResult(pair.getLeft(), failed);
    underTest.prepareSecurity(stack);
    verify(ambariOperationService, times(1)).waitForOperations(stack, ambariClient, operationRequests, PREPARE_DEKERBERIZING);
    verify(cloudbreakMessagesService, times(1)).getMessage(AMBARI_CLUSTER_PREPARE_DEKERBERIZING_FAILED.code());
    verify(ambariClusterConnectorPollingResultChecker, times(1)).checkPollingResult(pair.getLeft(), failed);
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) HashMap(java.util.HashMap) PollingResult(com.sequenceiq.cloudbreak.service.PollingResult) Cluster(com.sequenceiq.cloudbreak.domain.Cluster) Matchers.anyString(org.mockito.Matchers.anyString) CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) AmbariConnectionException(com.sequenceiq.ambari.client.AmbariConnectionException) ExpectedException(org.junit.rules.ExpectedException) CancellationException(com.sequenceiq.cloudbreak.cloud.scheduler.CancellationException) Stack(com.sequenceiq.cloudbreak.domain.Stack) AmbariClient(com.sequenceiq.ambari.client.AmbariClient) Test(org.junit.Test)

Example 2 with PollingResult

use of com.sequenceiq.cloudbreak.service.PollingResult in project cloudbreak by hortonworks.

the class AmbariClusterSecurityServiceTest method testDisableSecurityWhenExceptionOccursWhichNotCancellationThenShouldThrowAmbariOperationFailedException.

@Test
public void testDisableSecurityWhenExceptionOccursWhichNotCancellationThenShouldThrowAmbariOperationFailedException() throws CloudbreakException {
    Stack stack = TestUtil.stack();
    Cluster cluster = TestUtil.cluster();
    stack.setCluster(cluster);
    AmbariClient ambariClient = Mockito.mock(AmbariClient.class);
    when(clientFactory.getAmbariClient(stack, stack.getCluster())).thenReturn(ambariClient);
    when(ambariClient.disableKerberos()).thenReturn(1);
    Map<String, Integer> operationRequests = singletonMap("DISABLE_KERBEROS_REQUEST", 1);
    ImmutablePair<PollingResult, Exception> pair = new ImmutablePair<>(PollingResult.EXIT, null);
    String failed = "failed";
    when(ambariOperationService.waitForOperations(stack, ambariClient, operationRequests, DISABLE_KERBEROS_STATE)).thenThrow(new AmbariConnectionException("failed"));
    when(cloudbreakMessagesService.getMessage(AMBARI_CLUSTER_DISABLE_KERBEROS_FAILED.code())).thenReturn("failed");
    doThrow(new AmbariOperationFailedException("cancel")).when(ambariClusterConnectorPollingResultChecker).checkPollingResult(pair.getLeft(), failed);
    thrown.expect(AmbariOperationFailedException.class);
    thrown.expectMessage("failed");
    underTest.disableSecurity(stack);
    verify(ambariOperationService, times(1)).waitForOperations(stack, ambariClient, operationRequests, DISABLE_KERBEROS_STATE);
    verify(cloudbreakMessagesService, times(1)).getMessage(AMBARI_CLUSTER_DISABLE_KERBEROS_FAILED.code());
    verify(ambariClusterConnectorPollingResultChecker, times(1)).checkPollingResult(pair.getLeft(), failed);
}
Also used : ImmutablePair(org.apache.commons.lang3.tuple.ImmutablePair) PollingResult(com.sequenceiq.cloudbreak.service.PollingResult) Cluster(com.sequenceiq.cloudbreak.domain.Cluster) Matchers.anyString(org.mockito.Matchers.anyString) AmbariConnectionException(com.sequenceiq.ambari.client.AmbariConnectionException) CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) AmbariConnectionException(com.sequenceiq.ambari.client.AmbariConnectionException) ExpectedException(org.junit.rules.ExpectedException) CancellationException(com.sequenceiq.cloudbreak.cloud.scheduler.CancellationException) Stack(com.sequenceiq.cloudbreak.domain.Stack) AmbariClient(com.sequenceiq.ambari.client.AmbariClient) Test(org.junit.Test)

Example 3 with PollingResult

use of com.sequenceiq.cloudbreak.service.PollingResult in project cloudbreak by hortonworks.

the class AmbariDecommissioner method removeHostsFromOrchestrator.

private PollingResult removeHostsFromOrchestrator(Stack stack, AmbariClient ambariClient, List<String> hostNames) throws CloudbreakException {
    Orchestrator orchestrator = stack.getOrchestrator();
    Map<String, Object> map = new HashMap<>(orchestrator.getAttributes().getMap());
    OrchestratorType orchestratorType = orchestratorTypeResolver.resolveType(orchestrator.getType());
    try {
        if (orchestratorType.containerOrchestrator()) {
            OrchestrationCredential credential = new OrchestrationCredential(orchestrator.getApiEndpoint(), map);
            ContainerOrchestrator containerOrchestrator = containerOrchestratorResolver.get(orchestrator.getType());
            Set<Container> containers = containerRepository.findContainersInCluster(stack.getCluster().getId());
            List<ContainerInfo> containersToDelete = containers.stream().filter(input -> hostNames.contains(input.getHost()) && input.getImage().contains(AMBARI_AGENT.getName())).map(input -> new ContainerInfo(input.getContainerId(), input.getName(), input.getHost(), input.getImage())).collect(Collectors.toList());
            containerOrchestrator.deleteContainer(containersToDelete, credential);
            containerRepository.delete(containers);
            return waitForHostsToLeave(stack, ambariClient, hostNames);
        } else if (orchestratorType.hostOrchestrator()) {
            HostOrchestrator hostOrchestrator = hostOrchestratorResolver.get(stack.getOrchestrator().getType());
            Map<String, String> privateIpsByFQDN = new HashMap<>();
            stack.getInstanceMetaDataAsList().stream().filter(instanceMetaData -> hostNames.stream().anyMatch(hn -> hn.contains(instanceMetaData.getDiscoveryFQDN().split("\\.")[0]))).forEach(instanceMetaData -> privateIpsByFQDN.put(instanceMetaData.getDiscoveryFQDN(), instanceMetaData.getPrivateIp()));
            List<GatewayConfig> allGatewayConfigs = gatewayConfigService.getAllGatewayConfigs(stack);
            hostOrchestrator.tearDown(allGatewayConfigs, privateIpsByFQDN);
        }
    } catch (CloudbreakOrchestratorException e) {
        LOGGER.error("Failed to delete orchestrator components while decommissioning: ", e);
        throw new CloudbreakException("Failed to delete orchestrator components while decommissioning: ", e);
    }
    return SUCCESS;
}
Also used : CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) HttpResponseException(groovyx.net.http.HttpResponseException) LoggerFactory(org.slf4j.LoggerFactory) RSDecommissionStatusCheckerTask(com.sequenceiq.cloudbreak.service.cluster.flow.RSDecommissionStatusCheckerTask) DECOMMISSION_AMBARI_PROGRESS_STATE(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariOperationType.DECOMMISSION_AMBARI_PROGRESS_STATE) Msg(com.sequenceiq.cloudbreak.core.flow2.stack.Msg) Orchestrator(com.sequenceiq.cloudbreak.domain.Orchestrator) START_SERVICES_AMBARI_PROGRESS_STATE(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariOperationType.START_SERVICES_AMBARI_PROGRESS_STATE) Collections.singletonList(java.util.Collections.singletonList) PollingResult.isTimeout(com.sequenceiq.cloudbreak.service.PollingResult.isTimeout) BadRequestException(com.sequenceiq.cloudbreak.controller.BadRequestException) Map(java.util.Map) ContainerRepository(com.sequenceiq.cloudbreak.repository.ContainerRepository) HostMetadataState(com.sequenceiq.cloudbreak.common.type.HostMetadataState) HostOrchestrator(com.sequenceiq.cloudbreak.orchestrator.host.HostOrchestrator) HostMetadataRepository(com.sequenceiq.cloudbreak.repository.HostMetadataRepository) TlsSecurityService(com.sequenceiq.cloudbreak.service.TlsSecurityService) Collection(java.util.Collection) MAX_ATTEMPTS_FOR_HOSTS(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariOperationService.MAX_ATTEMPTS_FOR_HOSTS) Set(java.util.Set) HttpClientConfig(com.sequenceiq.cloudbreak.client.HttpClientConfig) FlowMessageService(com.sequenceiq.cloudbreak.core.flow2.stack.FlowMessageService) CloudbreakOrchestratorException(com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorException) NotEnoughNodeException(com.sequenceiq.cloudbreak.service.cluster.NotEnoughNodeException) Collectors(java.util.stream.Collectors) AMBARI_POLLING_INTERVAL(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariOperationService.AMBARI_POLLING_INTERVAL) Sets(com.google.common.collect.Sets) PollingResult.isSuccess(com.sequenceiq.cloudbreak.service.PollingResult.isSuccess) GatewayConfigService(com.sequenceiq.cloudbreak.service.GatewayConfigService) List(java.util.List) AmbariOperationService(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariOperationService) HostOrchestratorResolver(com.sequenceiq.cloudbreak.core.bootstrap.service.host.HostOrchestratorResolver) Entry(java.util.Map.Entry) PostConstruct(javax.annotation.PostConstruct) GatewayConfig(com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig) AmbariClientPollerObject(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariClientPollerObject) DataNodeUtils.sortByUsedSpace(com.sequenceiq.cloudbreak.service.cluster.ambari.DataNodeUtils.sortByUsedSpace) PollingService(com.sequenceiq.cloudbreak.service.PollingService) ContainerOrchestratorResolver(com.sequenceiq.cloudbreak.core.bootstrap.service.container.ContainerOrchestratorResolver) HashMap(java.util.HashMap) HostGroupService(com.sequenceiq.cloudbreak.service.hostgroup.HostGroupService) Function(java.util.function.Function) ArrayList(java.util.ArrayList) HashSet(java.util.HashSet) Inject(javax.inject.Inject) HostMetadata(com.sequenceiq.cloudbreak.domain.HostMetadata) ServiceAndHostService(com.sequenceiq.ambari.client.services.ServiceAndHostService) ConfigParam(com.sequenceiq.cloudbreak.service.cluster.filter.ConfigParam) OrchestratorTypeResolver(com.sequenceiq.cloudbreak.core.bootstrap.service.OrchestratorTypeResolver) OrchestrationCredential(com.sequenceiq.cloudbreak.orchestrator.model.OrchestrationCredential) Objects.requireNonNull(java.util.Objects.requireNonNull) Collections.singletonMap(java.util.Collections.singletonMap) PollingResult(com.sequenceiq.cloudbreak.service.PollingResult) Stack(com.sequenceiq.cloudbreak.domain.Stack) Nonnull(javax.annotation.Nonnull) ContainerInfo(com.sequenceiq.cloudbreak.orchestrator.model.ContainerInfo) AMBARI_AGENT(com.sequenceiq.cloudbreak.orchestrator.container.DockerContainer.AMBARI_AGENT) AmbariDFSSpaceRetrievalTask(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariDFSSpaceRetrievalTask) AmbariHostsLeaveStatusCheckerTask(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariHostsLeaveStatusCheckerTask) HostGroup(com.sequenceiq.cloudbreak.domain.HostGroup) Logger(org.slf4j.Logger) ContainerOrchestrator(com.sequenceiq.cloudbreak.orchestrator.container.ContainerOrchestrator) Iterator(java.util.Iterator) AVAILABLE(com.sequenceiq.cloudbreak.api.model.Status.AVAILABLE) DECOMMISSION_SERVICES_AMBARI_PROGRESS_STATE(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariOperationType.DECOMMISSION_SERVICES_AMBARI_PROGRESS_STATE) DNDecommissionStatusCheckerTask(com.sequenceiq.cloudbreak.service.cluster.flow.DNDecommissionStatusCheckerTask) AmbariClientExceptionUtil(com.sequenceiq.cloudbreak.util.AmbariClientExceptionUtil) SUCCESS(com.sequenceiq.cloudbreak.service.PollingResult.SUCCESS) Cluster(com.sequenceiq.cloudbreak.domain.Cluster) Container(com.sequenceiq.cloudbreak.domain.Container) Component(org.springframework.stereotype.Component) OrchestratorType(com.sequenceiq.cloudbreak.common.model.OrchestratorType) STOP_SERVICES_AMBARI_PROGRESS_STATE(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariOperationType.STOP_SERVICES_AMBARI_PROGRESS_STATE) HostFilterService(com.sequenceiq.cloudbreak.service.cluster.filter.HostFilterService) Collections(java.util.Collections) CloudbreakServiceException(com.sequenceiq.cloudbreak.service.CloudbreakServiceException) AmbariClient(com.sequenceiq.ambari.client.AmbariClient) AmbariClientProvider(com.sequenceiq.cloudbreak.service.cluster.AmbariClientProvider) HostOrchestrator(com.sequenceiq.cloudbreak.orchestrator.host.HostOrchestrator) HashMap(java.util.HashMap) OrchestrationCredential(com.sequenceiq.cloudbreak.orchestrator.model.OrchestrationCredential) OrchestratorType(com.sequenceiq.cloudbreak.common.model.OrchestratorType) Orchestrator(com.sequenceiq.cloudbreak.domain.Orchestrator) HostOrchestrator(com.sequenceiq.cloudbreak.orchestrator.host.HostOrchestrator) ContainerOrchestrator(com.sequenceiq.cloudbreak.orchestrator.container.ContainerOrchestrator) Container(com.sequenceiq.cloudbreak.domain.Container) CloudbreakOrchestratorException(com.sequenceiq.cloudbreak.orchestrator.exception.CloudbreakOrchestratorException) ContainerOrchestrator(com.sequenceiq.cloudbreak.orchestrator.container.ContainerOrchestrator) ContainerInfo(com.sequenceiq.cloudbreak.orchestrator.model.ContainerInfo) CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) AmbariClientPollerObject(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariClientPollerObject) Collections.singletonList(java.util.Collections.singletonList) List(java.util.List) ArrayList(java.util.ArrayList) Map(java.util.Map) HashMap(java.util.HashMap) Collections.singletonMap(java.util.Collections.singletonMap)

Example 4 with PollingResult

use of com.sequenceiq.cloudbreak.service.PollingResult in project cloudbreak by hortonworks.

the class ClusterBootstrapper method bootstrapNewNodesOnHost.

private void bootstrapNewNodesOnHost(Stack stack, List<GatewayConfig> allGatewayConfigs, Set<Node> nodes, Set<Node> allNodes) throws CloudbreakException, CloudbreakOrchestratorException {
    HostOrchestrator hostOrchestrator = hostOrchestratorResolver.get(stack.getOrchestrator().getType());
    Cluster cluster = stack.getCluster();
    Boolean enableKnox = cluster.getGateway().getEnableGateway();
    for (InstanceMetaData gateway : stack.getGatewayInstanceMetadata()) {
        GatewayConfig gatewayConfig = gatewayConfigService.getGatewayConfig(stack, gateway, enableKnox);
        PollingResult bootstrapApiPolling = hostBootstrapApiPollingService.pollWithTimeoutSingleFailure(hostBootstrapApiCheckerTask, new HostBootstrapApiContext(stack, gatewayConfig, hostOrchestrator), POLL_INTERVAL, MAX_POLLING_ATTEMPTS);
        validatePollingResultForCancellation(bootstrapApiPolling, "Polling of bootstrap API was cancelled.");
    }
    byte[] stateZip = null;
    ClusterComponent stateComponent = clusterComponentProvider.getComponent(cluster.getId(), ComponentType.SALT_STATE);
    if (stateComponent != null) {
        String content = (String) stateComponent.getAttributes().getMap().getOrDefault(ComponentType.SALT_STATE.name(), "");
        if (!content.isEmpty()) {
            stateZip = Base64.decodeBase64(content);
        }
    }
    hostOrchestrator.bootstrapNewNodes(allGatewayConfigs, nodes, allNodes, stateZip, clusterDeletionBasedModel(stack.getId(), null));
    InstanceMetaData primaryGateway = stack.getPrimaryGatewayInstance();
    GatewayConfig gatewayConfig = gatewayConfigService.getGatewayConfig(stack, primaryGateway, enableKnox);
    PollingResult allNodesAvailabilityPolling = hostClusterAvailabilityPollingService.pollWithTimeoutSingleFailure(hostClusterAvailabilityCheckerTask, new HostOrchestratorClusterContext(stack, hostOrchestrator, gatewayConfig, nodes), POLL_INTERVAL, MAX_POLLING_ATTEMPTS);
    validatePollingResultForCancellation(allNodesAvailabilityPolling, "Polling of new nodes availability was cancelled.");
    if (TIMEOUT.equals(allNodesAvailabilityPolling)) {
        clusterBootstrapperErrorHandler.terminateFailedNodes(hostOrchestrator, null, stack, gatewayConfig, nodes);
    }
}
Also used : InstanceMetaData(com.sequenceiq.cloudbreak.domain.InstanceMetaData) HostOrchestratorClusterContext(com.sequenceiq.cloudbreak.core.bootstrap.service.host.context.HostOrchestratorClusterContext) HostOrchestrator(com.sequenceiq.cloudbreak.orchestrator.host.HostOrchestrator) ClusterComponent(com.sequenceiq.cloudbreak.domain.ClusterComponent) PollingResult(com.sequenceiq.cloudbreak.service.PollingResult) Cluster(com.sequenceiq.cloudbreak.domain.Cluster) HostBootstrapApiContext(com.sequenceiq.cloudbreak.core.bootstrap.service.host.context.HostBootstrapApiContext) GatewayConfig(com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig)

Example 5 with PollingResult

use of com.sequenceiq.cloudbreak.service.PollingResult in project cloudbreak by hortonworks.

the class AmbariClusterModificationService method upscaleCluster.

@Override
public void upscaleCluster(Stack stack, HostGroup hostGroup, Collection<HostMetadata> hostMetadata) throws CloudbreakException {
    AmbariClient ambariClient = clientFactory.getAmbariClient(stack, stack.getCluster());
    List<String> upscaleHostNames = hostMetadata.stream().map(HostMetadata::getHostName).collect(Collectors.toList()).stream().filter(hostName -> !ambariClient.getClusterHosts().contains(hostName)).collect(Collectors.toList());
    if (!upscaleHostNames.isEmpty()) {
        recipeEngine.executePostAmbariStartRecipes(stack, Sets.newHashSet(hostGroup));
        Pair<PollingResult, Exception> pollingResult = ambariOperationService.waitForOperations(stack, ambariClient, installServices(upscaleHostNames, stack, ambariClient, hostGroup.getName()), UPSCALE_AMBARI_PROGRESS_STATE);
        String message = pollingResult.getRight() == null ? cloudbreakMessagesService.getMessage(AMBARI_CLUSTER_UPSCALE_FAILED.code()) : pollingResult.getRight().getMessage();
        ambariClusterConnectorPollingResultChecker.checkPollingResult(pollingResult.getLeft(), message);
    }
}
Also used : CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) AmbariConnectionException(com.sequenceiq.ambari.client.AmbariConnectionException) HttpResponseException(groovyx.net.http.HttpResponseException) LoggerFactory(org.slf4j.LoggerFactory) UPDATE_IN_PROGRESS(com.sequenceiq.cloudbreak.api.model.Status.UPDATE_IN_PROGRESS) UPSCALE_AMBARI_PROGRESS_STATE(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariOperationType.UPSCALE_AMBARI_PROGRESS_STATE) CloudbreakMessagesService(com.sequenceiq.cloudbreak.service.messages.CloudbreakMessagesService) Inject(javax.inject.Inject) HostMetadata(com.sequenceiq.cloudbreak.domain.HostMetadata) Pair(org.apache.commons.lang3.tuple.Pair) PollingResult.isTimeout(com.sequenceiq.cloudbreak.service.PollingResult.isTimeout) BadRequestException(com.sequenceiq.cloudbreak.controller.BadRequestException) RecipeEngine(com.sequenceiq.cloudbreak.service.cluster.flow.RecipeEngine) Service(org.springframework.stereotype.Service) Map(java.util.Map) Collections.singletonMap(java.util.Collections.singletonMap) PollingResult(com.sequenceiq.cloudbreak.service.PollingResult) ClusterModificationService(com.sequenceiq.cloudbreak.service.cluster.api.ClusterModificationService) Stack(com.sequenceiq.cloudbreak.domain.Stack) HostMetadataRepository(com.sequenceiq.cloudbreak.repository.HostMetadataRepository) AMBARI_CLUSTER_UPSCALE_FAILED(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariMessages.AMBARI_CLUSTER_UPSCALE_FAILED) HostGroup(com.sequenceiq.cloudbreak.domain.HostGroup) AMBARI_CLUSTER_SERVICES_STOPPED(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariMessages.AMBARI_CLUSTER_SERVICES_STOPPED) Logger(org.slf4j.Logger) AMBARI_CLUSTER_SERVICES_STARTING(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariMessages.AMBARI_CLUSTER_SERVICES_STARTING) Collection(java.util.Collection) Set(java.util.Set) AmbariClientExceptionUtil(com.sequenceiq.cloudbreak.util.AmbariClientExceptionUtil) Collectors(java.util.stream.Collectors) PollingResult.isExited(com.sequenceiq.cloudbreak.service.PollingResult.isExited) Sets(com.google.common.collect.Sets) AMBARI_CLUSTER_SERVICES_STOPPING(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariMessages.AMBARI_CLUSTER_SERVICES_STOPPING) List(java.util.List) AmbariOperationService(com.sequenceiq.cloudbreak.service.cluster.flow.AmbariOperationService) STOP_AMBARI_PROGRESS_STATE(com.sequenceiq.cloudbreak.service.cluster.ambari.AmbariOperationType.STOP_AMBARI_PROGRESS_STATE) CancellationException(com.sequenceiq.cloudbreak.cloud.scheduler.CancellationException) CloudbreakServiceException(com.sequenceiq.cloudbreak.service.CloudbreakServiceException) CloudbreakEventService(com.sequenceiq.cloudbreak.service.events.CloudbreakEventService) AmbariClient(com.sequenceiq.ambari.client.AmbariClient) PollingResult(com.sequenceiq.cloudbreak.service.PollingResult) CloudbreakException(com.sequenceiq.cloudbreak.service.CloudbreakException) AmbariConnectionException(com.sequenceiq.ambari.client.AmbariConnectionException) HttpResponseException(groovyx.net.http.HttpResponseException) BadRequestException(com.sequenceiq.cloudbreak.controller.BadRequestException) CancellationException(com.sequenceiq.cloudbreak.cloud.scheduler.CancellationException) CloudbreakServiceException(com.sequenceiq.cloudbreak.service.CloudbreakServiceException) AmbariClient(com.sequenceiq.ambari.client.AmbariClient) HostMetadata(com.sequenceiq.cloudbreak.domain.HostMetadata)

Aggregations

PollingResult (com.sequenceiq.cloudbreak.service.PollingResult)19 CloudbreakException (com.sequenceiq.cloudbreak.service.CloudbreakException)16 AmbariClient (com.sequenceiq.ambari.client.AmbariClient)15 CancellationException (com.sequenceiq.cloudbreak.cloud.scheduler.CancellationException)15 Cluster (com.sequenceiq.cloudbreak.domain.Cluster)9 AmbariConnectionException (com.sequenceiq.ambari.client.AmbariConnectionException)8 Stack (com.sequenceiq.cloudbreak.domain.Stack)8 ImmutablePair (org.apache.commons.lang3.tuple.ImmutablePair)6 Test (org.junit.Test)6 ExpectedException (org.junit.rules.ExpectedException)6 Matchers.anyString (org.mockito.Matchers.anyString)6 HashMap (java.util.HashMap)5 HostMetadata (com.sequenceiq.cloudbreak.domain.HostMetadata)4 CloudbreakServiceException (com.sequenceiq.cloudbreak.service.CloudbreakServiceException)4 HostGroup (com.sequenceiq.cloudbreak.domain.HostGroup)3 HostOrchestrator (com.sequenceiq.cloudbreak.orchestrator.host.HostOrchestrator)3 GatewayConfig (com.sequenceiq.cloudbreak.orchestrator.model.GatewayConfig)3 HttpResponseException (groovyx.net.http.HttpResponseException)3 Collections.singletonMap (java.util.Collections.singletonMap)3 List (java.util.List)3