Example usage for com.amazonaws.services.elasticmapreduce.model InstanceFleet getProvisionedSpotCapacity

List of usage examples for com.amazonaws.services.elasticmapreduce.model InstanceFleet getProvisionedSpotCapacity

Introduction

In this page you can find the example usage for com.amazonaws.services.elasticmapreduce.model InstanceFleet getProvisionedSpotCapacity.

Prototype


public Integer getProvisionedSpotCapacity() 

Source Link

Document

The number of Spot units that have been provisioned for this instance fleet to fulfill TargetSpotCapacity.

Usage

From source file:org.finra.herd.dao.helper.EmrHelper.java

License:Apache License

/**
 * Returns  EmrClusterInstanceFleet list from AWS call
 *
 * @param awsInstanceFleetsResult AWS Instance Fleets result
 *
 * @return list of  EmrClusterInstanceFleet
 *//*from w w  w .  j a  va 2s .  c om*/
public List<EmrClusterInstanceFleet> buildEmrClusterInstanceFleetFromAwsResult(
        ListInstanceFleetsResult awsInstanceFleetsResult) {
    List<EmrClusterInstanceFleet> emrInstanceFleets = null;

    if (awsInstanceFleetsResult != null
            && !CollectionUtils.isEmpty(awsInstanceFleetsResult.getInstanceFleets())) {
        emrInstanceFleets = new ArrayList<>();

        for (InstanceFleet awsInstanceFleet : awsInstanceFleetsResult.getInstanceFleets()) {
            if (awsInstanceFleet != null) {
                EmrClusterInstanceFleet emrInstanceFleet = new EmrClusterInstanceFleet();
                emrInstanceFleet.setId(awsInstanceFleet.getId());
                emrInstanceFleet.setName(awsInstanceFleet.getName());
                emrInstanceFleet.setInstanceFleetType(awsInstanceFleet.getInstanceFleetType());
                emrInstanceFleet.setTargetOnDemandCapacity(awsInstanceFleet.getTargetOnDemandCapacity());
                emrInstanceFleet.setTargetSpotCapacity(awsInstanceFleet.getTargetSpotCapacity());
                emrInstanceFleet
                        .setProvisionedOnDemandCapacity(awsInstanceFleet.getProvisionedOnDemandCapacity());
                emrInstanceFleet.setProvisionedSpotCapacity(awsInstanceFleet.getProvisionedSpotCapacity());
                emrInstanceFleet.setInstanceTypeSpecifications(
                        getInstanceTypeSpecifications(awsInstanceFleet.getInstanceTypeSpecifications()));
                emrInstanceFleet.setLaunchSpecifications(
                        getLaunchSpecifications(awsInstanceFleet.getLaunchSpecifications()));
                emrInstanceFleet
                        .setInstanceFleetStatus(getEmrClusterInstanceFleetStatus(awsInstanceFleet.getStatus()));
                emrInstanceFleets.add(emrInstanceFleet);
            }
        }
    }

    return emrInstanceFleets;
}