Examples of DescribeSpotInstanceRequestsRequest


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

        // Initialize variables.
        ArrayList<String> instanceIds = new ArrayList<String>();

        do {
            // Create the describeRequest with tall of the request id to monitor (e.g. that we started).
            DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest();
            describeRequest.setSpotInstanceRequestIds(spotInstanceRequestIds);

            // Initialize the anyOpen variable to false ??? which assumes there are no requests open unless
            // we find one that is still open.
            anyOpen=false;
View Full Code Here

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

        //==========================================================================//
        //============== Describe Spot Instance Requests to determine =============//
        //==========================================================================//

        // Create the describeRequest with tall of the request id to monitor (e.g. that we started).
        DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest();
        describeRequest.setSpotInstanceRequestIds(spotInstanceRequestIds);

        System.out.println("Checking to determine if Spot Bids have reached the active state...");

        // Initialize variables.
        instanceIds = new ArrayList<String>();
View Full Code Here

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

        // Initialize variables.
        ArrayList<String> instanceIds = new ArrayList<String>();

        do {
            // Create the describeRequest with tall of the request id to monitor (e.g. that we started).
            DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest();
            describeRequest.setSpotInstanceRequestIds(spotInstanceRequestIds);

            // Initialize the anyOpen variable to false ??? which assumes there are no requests open unless
            // we find one that is still open.
            anyOpen=false;
View Full Code Here

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

        // Initialize variables.
        ArrayList<String> instanceIds = new ArrayList<String>();

        do {
            // Create the describeRequest with tall of the request id to monitor (e.g. that we started).
            DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest();
            describeRequest.setSpotInstanceRequestIds(spotInstanceRequestIds);

            // Initialize the anyOpen variable to false ??? which assumes there are no requests open unless
            // we find one that is still open.
            anyOpen=false;
View Full Code Here

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

        //==========================================================================//
        //============== Describe Spot Instance Requests to determine =============//
        //==========================================================================//

        // Create the describeRequest with tall of the request id to monitor (e.g. that we started).
        DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest();
        describeRequest.setSpotInstanceRequestIds(spotInstanceRequestIds);

        System.out.println("Checking to determine if Spot Bids have reached the active state...");

        // Initialize variables.
        instanceIds = new ArrayList<String>();
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

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

        @SuppressWarnings("unchecked")
        List<String> requestIds = (List<String>) execution.getVariable(ProcessVariables.SPOT_INSTANCE_REQUEST_IDS);
        checkNotNull(requestIds, "process variable '{}' not found", ProcessVariables.SPOT_INSTANCE_REQUEST_IDS);

        DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest();
        describeRequest.setSpotInstanceRequestIds(requestIds);

        // Retrieve all of the requests we want to monitor.
        DescribeSpotInstanceRequestsResult describeResult = client.describeSpotInstanceRequests(describeRequest);
        List<SpotInstanceRequest> requests = describeResult.getSpotInstanceRequests();
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

        /* 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);
        checkNotNull(requestIds, "process variable '{}' not found", ProcessVariables.SPOT_INSTANCE_REQUEST_IDS);

        DescribeSpotInstanceRequestsRequest describeRequest = new DescribeSpotInstanceRequestsRequest();
        describeRequest.setSpotInstanceRequestIds(requestIds);

        // Retrieve all of the requests we want to monitor.
        DescribeSpotInstanceRequestsResult describeResult = client.describeSpotInstanceRequests(describeRequest);
        List<SpotInstanceRequest> requests = describeResult.getSpotInstanceRequests();
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.