Search in sources :

Example 1 with ResourceNotifier

use of com.sequenceiq.cloudbreak.cloud.notification.ResourceNotifier in project cloudbreak by hortonworks.

the class AzureUpscaleService method upscale.

public List<CloudResourceStatus> upscale(AuthenticatedContext ac, CloudStack stack, List<CloudResource> resources, AzureStackView azureStackView, AzureClient client, AdjustmentTypeWithThreshold adjustmentTypeWithThreshold) throws QuotaExceededException {
    CloudContext cloudContext = ac.getCloudContext();
    String stackName = azureUtils.getStackName(cloudContext);
    String resourceGroupName = azureResourceGroupMetadataProvider.getResourceGroupName(cloudContext, stack);
    List<CloudResource> newInstances = new ArrayList<>();
    List<CloudResource> templateResources = new ArrayList<>();
    List<CloudResource> osDiskResources = new ArrayList<>();
    DateTime preDeploymentTime = DateTime.now();
    filterExistingInstances(azureStackView);
    try {
        List<Group> scaledGroups = cloudResourceHelper.getScaledGroups(stack);
        CloudResource armTemplate = getArmTemplate(resources, stackName);
        Deployment templateDeployment = azureTemplateDeploymentService.getTemplateDeployment(client, stack, ac, azureStackView, AzureInstanceTemplateOperation.UPSCALE);
        LOGGER.info("Created template deployment for upscale: {}", templateDeployment.exportTemplate().template());
        templateResources.addAll(azureCloudResourceService.getDeploymentCloudResources(templateDeployment));
        newInstances.addAll(azureCloudResourceService.getInstanceCloudResources(stackName, templateResources, scaledGroups, resourceGroupName));
        if (!newInstances.isEmpty()) {
            osDiskResources.addAll(azureCloudResourceService.getAttachedOsDiskResources(newInstances, resourceGroupName, client));
        } else {
            LOGGER.warn("Skipping OS disk collection as there was no VM instance found amongst cloud resources for {}!", stackName);
        }
        azureCloudResourceService.saveCloudResources(resourceNotifier, cloudContext, ListUtils.union(templateResources, osDiskResources));
        List<CloudResource> reattachableVolumeSets = getReattachableVolumeSets(resources, newInstances);
        List<CloudResource> networkResources = azureCloudResourceService.getNetworkResources(resources);
        azureComputeResourceService.buildComputeResourcesForUpscale(ac, stack, scaledGroups, newInstances, reattachableVolumeSets, networkResources, adjustmentTypeWithThreshold);
        List<CloudResourceStatus> successfulInstances = newInstances.stream().map(cloudResource -> new CloudResourceStatus(cloudResource, ResourceStatus.CREATED, cloudResource.getParameter(CloudResource.PRIVATE_ID, Long.class))).collect(Collectors.toList());
        return ListUtils.union(Collections.singletonList(new CloudResourceStatus(armTemplate, ResourceStatus.IN_PROGRESS)), successfulInstances);
    } catch (Retry.ActionFailedException e) {
        LOGGER.error("Retry.ActionFailedException happened", e);
        rollbackResources(ac, client, stack, cloudContext, resources, preDeploymentTime);
        throw azureUtils.convertToCloudConnectorException(e.getCause(), "Stack upscale");
    } catch (CloudException e) {
        LOGGER.error("CloudException happened", e);
        rollbackResources(ac, client, stack, cloudContext, resources, preDeploymentTime);
        checkIfQuotaLimitIssued(e);
        throw azureUtils.convertToCloudConnectorException(e, "Stack upscale");
    } catch (RolledbackResourcesException e) {
        LOGGER.error("RolledbackResourcesException happened", e);
        rollbackResources(ac, client, stack, cloudContext, resources, preDeploymentTime);
        throw new CloudConnectorException(String.format("Could not upscale Azure infrastructure, infrastructure was rolled back with resources: %s, %s", stackName, e.getMessage()), e);
    } catch (Exception e) {
        LOGGER.error("Exception happened", e);
        rollbackResources(ac, client, stack, cloudContext, resources, preDeploymentTime);
        throw new CloudConnectorException(String.format("Could not upscale Azure infrastructure, infrastructure was rolled back: %s, %s", stackName, e.getMessage()), e);
    }
}
Also used : AzureClient(com.sequenceiq.cloudbreak.cloud.azure.client.AzureClient) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) CloudError(com.microsoft.azure.CloudError) RolledbackResourcesException(com.sequenceiq.cloudbreak.cloud.exception.RolledbackResourcesException) LoggerFactory(org.slf4j.LoggerFactory) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) AzureComputeResourceService(com.sequenceiq.cloudbreak.cloud.azure.connector.resource.AzureComputeResourceService) ArrayList(java.util.ArrayList) ResourceNotifier(com.sequenceiq.cloudbreak.cloud.notification.ResourceNotifier) Inject(javax.inject.Inject) CloudConnectorException(com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException) Matcher(java.util.regex.Matcher) AzureStackView(com.sequenceiq.cloudbreak.cloud.azure.view.AzureStackView) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) ListUtils(org.apache.commons.collections4.ListUtils) AzureInstanceView(com.sequenceiq.cloudbreak.cloud.azure.view.AzureInstanceView) AzureUtils(com.sequenceiq.cloudbreak.cloud.azure.AzureUtils) CommonStatus(com.sequenceiq.common.api.type.CommonStatus) ResourceStatus(com.sequenceiq.cloudbreak.cloud.model.ResourceStatus) CloudResourceHelper(com.sequenceiq.cloudbreak.cloud.transform.CloudResourceHelper) ResourceType(com.sequenceiq.common.api.type.ResourceType) Deployment(com.microsoft.azure.management.resources.Deployment) Logger(org.slf4j.Logger) AzureResourceGroupMetadataProvider(com.sequenceiq.cloudbreak.cloud.azure.AzureResourceGroupMetadataProvider) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) AdjustmentTypeWithThreshold(com.sequenceiq.common.api.adjustment.AdjustmentTypeWithThreshold) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) DateTime(org.joda.time.DateTime) Retry(com.sequenceiq.cloudbreak.service.Retry) Collectors(java.util.stream.Collectors) QuotaExceededException(com.sequenceiq.cloudbreak.cloud.exception.QuotaExceededException) AzureCloudResourceService(com.sequenceiq.cloudbreak.cloud.azure.AzureCloudResourceService) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) AzureTerminationHelperService(com.sequenceiq.cloudbreak.cloud.azure.AzureTerminationHelperService) List(java.util.List) Component(org.springframework.stereotype.Component) AzureTemplateDeploymentService(com.sequenceiq.cloudbreak.cloud.azure.template.AzureTemplateDeploymentService) Group(com.sequenceiq.cloudbreak.cloud.model.Group) CloudException(com.microsoft.azure.CloudException) Pattern(java.util.regex.Pattern) AzureInstanceTemplateOperation(com.sequenceiq.cloudbreak.cloud.azure.AzureInstanceTemplateOperation) Collections(java.util.Collections) Group(com.sequenceiq.cloudbreak.cloud.model.Group) CloudConnectorException(com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException) CloudContext(com.sequenceiq.cloudbreak.cloud.context.CloudContext) ArrayList(java.util.ArrayList) Deployment(com.microsoft.azure.management.resources.Deployment) CloudException(com.microsoft.azure.CloudException) RolledbackResourcesException(com.sequenceiq.cloudbreak.cloud.exception.RolledbackResourcesException) DateTime(org.joda.time.DateTime) RolledbackResourcesException(com.sequenceiq.cloudbreak.cloud.exception.RolledbackResourcesException) CloudConnectorException(com.sequenceiq.cloudbreak.cloud.exception.CloudConnectorException) QuotaExceededException(com.sequenceiq.cloudbreak.cloud.exception.QuotaExceededException) CloudException(com.microsoft.azure.CloudException) CloudResourceStatus(com.sequenceiq.cloudbreak.cloud.model.CloudResourceStatus) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) Retry(com.sequenceiq.cloudbreak.service.Retry)

Example 2 with ResourceNotifier

use of com.sequenceiq.cloudbreak.cloud.notification.ResourceNotifier in project cloudbreak by hortonworks.

the class AwsRepairTest method upscaleStack.

private void upscaleStack() throws Exception {
    AuthenticatedContext authenticatedContext = componentTestUtil.getAuthenticatedContext();
    CloudStack stack = componentTestUtil.getStack(InstanceStatus.CREATE_REQUESTED, InstanceStatus.STARTED);
    List<CloudResource> cloudResources = List.of(CloudResource.builder().name(AWS_SUBNET_ID).type(ResourceType.AWS_SUBNET).build(), createVolumeResource(VOLUME_ID_1, INSTANCE_ID_1, SIZE_DISK_1, FSTAB_1, CommonStatus.DETACHED), createVolumeResource(VOLUME_ID_2, INSTANCE_ID_2, SIZE_DISK_2, FSTAB_2, CommonStatus.DETACHED), createVolumeResource(VOLUME_ID_3, INSTANCE_ID_3, SIZE_DISK_2, FSTAB_2, CommonStatus.CREATED));
    InMemoryStateStore.putStack(1L, PollGroup.POLLABLE);
    when(amazonCloudFormationClient.describeStackResource(any())).thenReturn(new DescribeStackResourceResult().withStackResourceDetail(new StackResourceDetail().withPhysicalResourceId(AUTOSCALING_GROUP_NAME)));
    when(amazonAutoScalingClient.describeAutoScalingGroups(any())).thenReturn(new DescribeAutoScalingGroupsResult().withAutoScalingGroups(new AutoScalingGroup().withAutoScalingGroupName(AUTOSCALING_GROUP_NAME).withInstances(List.of(new Instance().withInstanceId(INSTANCE_ID_1).withLifecycleState(LifecycleState.InService), new Instance().withInstanceId(INSTANCE_ID_2).withLifecycleState(LifecycleState.InService)))));
    when(amazonEC2Client.describeVolumes(any())).thenReturn(new DescribeVolumesResult().withVolumes(new com.amazonaws.services.ec2.model.Volume().withVolumeId(VOLUME_ID_1).withState(VolumeState.Available), new com.amazonaws.services.ec2.model.Volume().withVolumeId(VOLUME_ID_2).withState(VolumeState.Available), new com.amazonaws.services.ec2.model.Volume().withVolumeId(VOLUME_ID_3).withState(VolumeState.InUse)));
    when(amazonEC2Client.describeInstances(any())).thenReturn(new DescribeInstancesResult().withReservations(new Reservation().withInstances(new com.amazonaws.services.ec2.model.Instance().withInstanceId("i-instance"))));
    DescribeScalingActivitiesResult result = new DescribeScalingActivitiesResult();
    result.setActivities(List.of());
    when(amazonAutoScalingClient.describeScalingActivities(any(DescribeScalingActivitiesRequest.class))).thenReturn(result);
    AmazonEC2Waiters waiters = mock(AmazonEC2Waiters.class);
    when(amazonEC2Client.waiters()).thenReturn(waiters);
    Waiter<DescribeInstancesRequest> instanceWaiter = mock(Waiter.class);
    when(waiters.instanceRunning()).thenReturn(instanceWaiter);
    when(amazonAutoScalingClient.waiters()).thenReturn(asWaiters);
    when(asWaiters.groupInService()).thenReturn(describeAutoScalingGroupsRequestWaiter);
    underTest.upscale(authenticatedContext, stack, cloudResources, new AdjustmentTypeWithThreshold(AdjustmentType.EXACT, 0L));
    verify(amazonAutoScalingClient).resumeProcesses(argThat(argument -> AUTOSCALING_GROUP_NAME.equals(argument.getAutoScalingGroupName()) && argument.getScalingProcesses().contains("Launch")));
    verify(amazonAutoScalingClient).updateAutoScalingGroup(argThat(argument -> {
        Group workerGroup = stack.getGroups().get(1);
        return AUTOSCALING_GROUP_NAME.equals(argument.getAutoScalingGroupName()) && workerGroup.getInstancesSize().equals(argument.getMaxSize()) && workerGroup.getInstancesSize().equals(argument.getDesiredCapacity());
    }));
    verify(amazonAutoScalingClient, times(stack.getGroups().size())).suspendProcesses(argThat(argument -> AUTOSCALING_GROUP_NAME.equals(argument.getAutoScalingGroupName()) && SUSPENDED_PROCESSES.equals(argument.getScalingProcesses())));
    ArgumentCaptor<CloudResource> updatedCloudResourceArgumentCaptor = ArgumentCaptor.forClass(CloudResource.class);
    verify(resourceNotifier, times(2)).notifyUpdate(updatedCloudResourceArgumentCaptor.capture(), any());
    assertVolumeResource(updatedCloudResourceArgumentCaptor.getAllValues(), INSTANCE_ID_1, SIZE_DISK_1, FSTAB_1);
    assertVolumeResource(updatedCloudResourceArgumentCaptor.getAllValues(), INSTANCE_ID_2, SIZE_DISK_2, FSTAB_2);
}
Also used : Arrays(java.util.Arrays) ArgumentMatchers.eq(org.mockito.ArgumentMatchers.eq) AmazonCloudWatchClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonCloudWatchClient) AmazonEC2Waiters(com.amazonaws.services.ec2.waiters.AmazonEC2Waiters) Arrays.asList(java.util.Arrays.asList) DescribeInstancesRequest(com.amazonaws.services.ec2.model.DescribeInstancesRequest) Map(java.util.Map) MockBean(org.springframework.boot.test.mock.mockito.MockBean) CommonStatus(com.sequenceiq.common.api.type.CommonStatus) LifeCycleState(com.amazonaws.services.elasticfilesystem.model.LifeCycleState) CloudVolumeUsageType(com.sequenceiq.cloudbreak.cloud.model.CloudVolumeUsageType) DescribeFileSystemsResult(com.amazonaws.services.elasticfilesystem.model.DescribeFileSystemsResult) AutoScalingGroup(com.amazonaws.services.autoscaling.model.AutoScalingGroup) TestPropertySource(org.springframework.test.context.TestPropertySource) VolumeSetAttributes(com.sequenceiq.cloudbreak.cloud.model.VolumeSetAttributes) Retry(com.sequenceiq.cloudbreak.service.Retry) AwsResourceConnector(com.sequenceiq.cloudbreak.cloud.aws.connector.resource.AwsResourceConnector) CreateFileSystemResult(com.amazonaws.services.elasticfilesystem.model.CreateFileSystemResult) AdjustmentType(com.sequenceiq.common.api.type.AdjustmentType) AmazonAutoScalingClient(com.sequenceiq.cloudbreak.cloud.aws.client.AmazonAutoScalingClient) VolumeState(com.amazonaws.services.ec2.model.VolumeState) SIZE_DISK_1(com.sequenceiq.cloudbreak.cloud.aws.component.ComponentTestUtil.SIZE_DISK_1) SIZE_DISK_2(com.sequenceiq.cloudbreak.cloud.aws.component.ComponentTestUtil.SIZE_DISK_2) Mockito.mock(org.mockito.Mockito.mock) LocationHelper(com.sequenceiq.cloudbreak.cloud.storage.LocationHelper) Mock(org.mockito.Mock) DescribeStacksRequest(com.amazonaws.services.cloudformation.model.DescribeStacksRequest) AVAILABILITY_ZONE(com.sequenceiq.cloudbreak.cloud.aws.component.ComponentTestUtil.AVAILABILITY_ZONE) RunWith(org.junit.runner.RunWith) AmazonEfsClient(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEfsClient) Supplier(java.util.function.Supplier) StackResourceDetail(com.amazonaws.services.cloudformation.model.StackResourceDetail) ResourceNotifier(com.sequenceiq.cloudbreak.cloud.notification.ResourceNotifier) AmazonEc2Client(com.sequenceiq.cloudbreak.cloud.aws.common.client.AmazonEc2Client) DeleteMountTargetResult(com.amazonaws.services.elasticfilesystem.model.DeleteMountTargetResult) InstanceTemplate(com.sequenceiq.cloudbreak.cloud.model.InstanceTemplate) DescribeScalingActivitiesResult(com.amazonaws.services.autoscaling.model.DescribeScalingActivitiesResult) AwsCloudFormationClient(com.sequenceiq.cloudbreak.cloud.aws.AwsCloudFormationClient) InMemoryStateStore(com.sequenceiq.cloudbreak.cloud.store.InMemoryStateStore) Assert.assertTrue(org.junit.Assert.assertTrue) Import(org.springframework.context.annotation.Import) Mockito.times(org.mockito.Mockito.times) IOException(java.io.IOException) Test(org.junit.Test) PersistenceNotifier(com.sequenceiq.cloudbreak.cloud.notification.PersistenceNotifier) LifecycleState(com.amazonaws.services.autoscaling.model.LifecycleState) INSTANCE_ID_1(com.sequenceiq.cloudbreak.cloud.aws.component.ComponentTestUtil.INSTANCE_ID_1) InstanceStatus(com.sequenceiq.cloudbreak.cloud.model.InstanceStatus) INSTANCE_ID_2(com.sequenceiq.cloudbreak.cloud.aws.component.ComponentTestUtil.INSTANCE_ID_2) INSTANCE_ID_3(com.sequenceiq.cloudbreak.cloud.aws.component.ComponentTestUtil.INSTANCE_ID_3) InstanceAuthentication(com.sequenceiq.cloudbreak.cloud.model.InstanceAuthentication) DescribeStackResourceResult(com.amazonaws.services.cloudformation.model.DescribeStackResourceResult) PollGroup(com.sequenceiq.cloudbreak.cloud.scheduler.PollGroup) Assert.assertEquals(org.junit.Assert.assertEquals) ArgumentMatchers.anyString(org.mockito.ArgumentMatchers.anyString) DescribeMountTargetsResult(com.amazonaws.services.elasticfilesystem.model.DescribeMountTargetsResult) EntitlementService(com.sequenceiq.cloudbreak.auth.altus.EntitlementService) ArgumentMatchers.argThat(org.mockito.ArgumentMatchers.argThat) ActiveProfiles(org.springframework.test.context.ActiveProfiles) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) AmazonCloudFormationClient(com.sequenceiq.cloudbreak.cloud.aws.client.AmazonCloudFormationClient) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) DescribeScalingActivitiesRequest(com.amazonaws.services.autoscaling.model.DescribeScalingActivitiesRequest) Assert.fail(org.junit.Assert.fail) SpringRunner(org.springframework.test.context.junit4.SpringRunner) AmazonAutoScalingWaiters(com.amazonaws.services.autoscaling.waiters.AmazonAutoScalingWaiters) Waiter(com.amazonaws.waiters.Waiter) Reservation(com.amazonaws.services.ec2.model.Reservation) DescribeVolumesResult(com.amazonaws.services.ec2.model.DescribeVolumesResult) DescribeInstancesResult(com.amazonaws.services.ec2.model.DescribeInstancesResult) AmazonCloudFormationWaiters(com.amazonaws.services.cloudformation.waiters.AmazonCloudFormationWaiters) Collectors(java.util.stream.Collectors) TemporaryStorage(com.sequenceiq.cloudbreak.common.type.TemporaryStorage) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) List(java.util.List) Group(com.sequenceiq.cloudbreak.cloud.model.Group) DeleteFileSystemResult(com.amazonaws.services.elasticfilesystem.model.DeleteFileSystemResult) ArgumentMatchers.any(org.mockito.ArgumentMatchers.any) HashMap(java.util.HashMap) AwsMetadataCollector(com.sequenceiq.cloudbreak.cloud.aws.AwsMetadataCollector) ResourceRetriever(com.sequenceiq.cloudbreak.cloud.service.ResourceRetriever) Inject(javax.inject.Inject) ArgumentCaptor(org.mockito.ArgumentCaptor) DescribeAutoScalingGroupsResult(com.amazonaws.services.autoscaling.model.DescribeAutoScalingGroupsResult) ResourceType(com.sequenceiq.common.api.type.ResourceType) FileSystemDescription(com.amazonaws.services.elasticfilesystem.model.FileSystemDescription) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) AdjustmentTypeWithThreshold(com.sequenceiq.common.api.adjustment.AdjustmentTypeWithThreshold) Mockito.when(org.mockito.Mockito.when) Mockito.verify(org.mockito.Mockito.verify) DescribeAutoScalingGroupsRequest(com.amazonaws.services.autoscaling.model.DescribeAutoScalingGroupsRequest) Mockito(org.mockito.Mockito) MountTargetDescription(com.amazonaws.services.elasticfilesystem.model.MountTargetDescription) CustomAmazonWaiterProvider(com.sequenceiq.cloudbreak.cloud.aws.scheduler.CustomAmazonWaiterProvider) DescribeAlarmsResult(com.amazonaws.services.cloudwatch.model.DescribeAlarmsResult) Instance(com.amazonaws.services.autoscaling.model.Instance) Volume(com.sequenceiq.cloudbreak.cloud.model.Volume) CommonAwsClient(com.sequenceiq.cloudbreak.cloud.aws.common.CommonAwsClient) Collections(java.util.Collections) AutoScalingGroup(com.amazonaws.services.autoscaling.model.AutoScalingGroup) AutoScalingGroup(com.amazonaws.services.autoscaling.model.AutoScalingGroup) PollGroup(com.sequenceiq.cloudbreak.cloud.scheduler.PollGroup) Group(com.sequenceiq.cloudbreak.cloud.model.Group) CloudInstance(com.sequenceiq.cloudbreak.cloud.model.CloudInstance) Instance(com.amazonaws.services.autoscaling.model.Instance) AdjustmentTypeWithThreshold(com.sequenceiq.common.api.adjustment.AdjustmentTypeWithThreshold) AuthenticatedContext(com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext) CloudStack(com.sequenceiq.cloudbreak.cloud.model.CloudStack) AmazonEC2Waiters(com.amazonaws.services.ec2.waiters.AmazonEC2Waiters) DescribeInstancesRequest(com.amazonaws.services.ec2.model.DescribeInstancesRequest) StackResourceDetail(com.amazonaws.services.cloudformation.model.StackResourceDetail) DescribeInstancesResult(com.amazonaws.services.ec2.model.DescribeInstancesResult) Reservation(com.amazonaws.services.ec2.model.Reservation) DescribeScalingActivitiesResult(com.amazonaws.services.autoscaling.model.DescribeScalingActivitiesResult) Volume(com.sequenceiq.cloudbreak.cloud.model.Volume) DescribeScalingActivitiesRequest(com.amazonaws.services.autoscaling.model.DescribeScalingActivitiesRequest) DescribeAutoScalingGroupsResult(com.amazonaws.services.autoscaling.model.DescribeAutoScalingGroupsResult) CloudResource(com.sequenceiq.cloudbreak.cloud.model.CloudResource) DescribeVolumesResult(com.amazonaws.services.ec2.model.DescribeVolumesResult) DescribeStackResourceResult(com.amazonaws.services.cloudformation.model.DescribeStackResourceResult)

Aggregations

AuthenticatedContext (com.sequenceiq.cloudbreak.cloud.context.AuthenticatedContext)2 CloudInstance (com.sequenceiq.cloudbreak.cloud.model.CloudInstance)2 CloudResource (com.sequenceiq.cloudbreak.cloud.model.CloudResource)2 CloudStack (com.sequenceiq.cloudbreak.cloud.model.CloudStack)2 Group (com.sequenceiq.cloudbreak.cloud.model.Group)2 ResourceNotifier (com.sequenceiq.cloudbreak.cloud.notification.ResourceNotifier)2 Retry (com.sequenceiq.cloudbreak.service.Retry)2 AdjustmentTypeWithThreshold (com.sequenceiq.common.api.adjustment.AdjustmentTypeWithThreshold)2 CommonStatus (com.sequenceiq.common.api.type.CommonStatus)2 ResourceType (com.sequenceiq.common.api.type.ResourceType)2 Collections (java.util.Collections)2 List (java.util.List)2 Collectors (java.util.stream.Collectors)2 Inject (javax.inject.Inject)2 AutoScalingGroup (com.amazonaws.services.autoscaling.model.AutoScalingGroup)1 DescribeAutoScalingGroupsRequest (com.amazonaws.services.autoscaling.model.DescribeAutoScalingGroupsRequest)1 DescribeAutoScalingGroupsResult (com.amazonaws.services.autoscaling.model.DescribeAutoScalingGroupsResult)1 DescribeScalingActivitiesRequest (com.amazonaws.services.autoscaling.model.DescribeScalingActivitiesRequest)1 DescribeScalingActivitiesResult (com.amazonaws.services.autoscaling.model.DescribeScalingActivitiesResult)1 Instance (com.amazonaws.services.autoscaling.model.Instance)1