Examples of DescribeSpotInstanceRequestsRequest


Examples of com.amazonaws.services.ec2.model.DescribeSpotInstanceRequestsRequest

        /* we timeout if requests have already been sent - the activity is being retried. */
        Optional<Object> alreadySent = Optional.fromNullable(
                execution.getVariable(ProcessVariables.SPOT_INSTANCE_REQUEST_IDS));

        if (alreadySent.isPresent()) {
            DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest()
                    .withFilters(new Filter()
                        .withName("launch-group").withValues(businessKey)
                        .withName("state").withValues("open", "active"));
            Stopwatch stopwatch = new Stopwatch().start();
            while (stopwatch.elapsedTime(TimeUnit.MINUTES) < 2) {
View Full Code Here

Examples of com.amazonaws.services.ec2.model.DescribeSpotInstanceRequestsRequest

        @SuppressWarnings("unchecked")
        List<String> requestIds =
                (List<String>) execution.getVariable(ProcessVariables.SPOT_INSTANCE_REQUEST_IDS);
        DescribeSpotInstanceRequestsResult result = client.describeSpotInstanceRequests(
                new DescribeSpotInstanceRequestsRequest().withSpotInstanceRequestIds(requestIds));
        List<String> instanceIds = new ArrayList<String>();
        for (SpotInstanceRequest spotRequest : result.getSpotInstanceRequests()) {
            if (spotRequest.getInstanceId() != null) {
                instanceIds.add(spotRequest.getInstanceId());
            }
View Full Code Here

Examples of com.amazonaws.services.ec2.model.DescribeSpotInstanceRequestsRequest

        activity.execute(execution);

        Uninterruptibles.sleepUninterruptibly(1, TimeUnit.MINUTES);

        DescribeSpotInstanceRequestsResult result = client.describeSpotInstanceRequests(
                new DescribeSpotInstanceRequestsRequest().withFilters(new Filter()
                    .withName("launch-group").withValues(BUSINESS_KEY)));

        assertThat(result.getSpotInstanceRequests()).hasSize(1);
        /* we also need to sleep before the teardown */
        Uninterruptibles.sleepUninterruptibly(1, TimeUnit.MINUTES);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.