Example usage for com.amazonaws.services.elasticmapreduce.model InstanceTypeSpecification getBidPriceAsPercentageOfOnDemandPrice

List of usage examples for com.amazonaws.services.elasticmapreduce.model InstanceTypeSpecification getBidPriceAsPercentageOfOnDemandPrice

Introduction

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

Prototype


public Double getBidPriceAsPercentageOfOnDemandPrice() 

Source Link

Document

The bid price, as a percentage of On-Demand price, for each EC2 Spot instance as defined by InstanceType.

Usage

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

License:Apache License

/**
 * Returns list of  EmrClusterInstanceTypeSpecification
 *
 * @param awsInstanceTypeConfigs AWS object
 *
 * @return list of  EmrClusterInstanceTypeSpecification
 *///w w w . j  a  va2s . co  m
protected List<EmrClusterInstanceTypeSpecification> getInstanceTypeSpecifications(
        List<InstanceTypeSpecification> awsInstanceTypeConfigs) {
    List<EmrClusterInstanceTypeSpecification> emrClusterInstanceTypeSpecifications = null;

    if (!CollectionUtils.isEmpty(awsInstanceTypeConfigs)) {
        emrClusterInstanceTypeSpecifications = new ArrayList<>();

        for (InstanceTypeSpecification awsInstanceTypeConfig : awsInstanceTypeConfigs) {
            if (awsInstanceTypeConfig != null) {
                EmrClusterInstanceTypeSpecification emrClusterInstanceTypeSpecification = new EmrClusterInstanceTypeSpecification();
                emrClusterInstanceTypeSpecification.setInstanceType(awsInstanceTypeConfig.getInstanceType());
                emrClusterInstanceTypeSpecification
                        .setWeightedCapacity(awsInstanceTypeConfig.getWeightedCapacity());
                emrClusterInstanceTypeSpecification.setBidPrice(awsInstanceTypeConfig.getBidPrice());
                emrClusterInstanceTypeSpecification.setBidPriceAsPercentageOfOnDemandPrice(
                        awsInstanceTypeConfig.getBidPriceAsPercentageOfOnDemandPrice());
                emrClusterInstanceTypeSpecification
                        .setEbsBlockDevices(getEbsBlockDevices(awsInstanceTypeConfig.getEbsBlockDevices()));
                emrClusterInstanceTypeSpecification.setEbsOptimized(awsInstanceTypeConfig.getEbsOptimized());
                emrClusterInstanceTypeSpecification
                        .setConfigurations(getConfigurations(awsInstanceTypeConfig.getConfigurations()));

                emrClusterInstanceTypeSpecifications.add(emrClusterInstanceTypeSpecification);
            }
        }
    }

    return emrClusterInstanceTypeSpecifications;
}