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

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

Introduction

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

Prototype


public InstanceFleetProvisioningSpecifications getLaunchSpecifications() 

Source Link

Document

Describes the launch specification for an instance fleet.

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
 */// w ww . j av a2s . co  m
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;
}