Example usage for com.amazonaws.services.elasticmapreduce.model EbsBlockDeviceConfig setVolumeSpecification

List of usage examples for com.amazonaws.services.elasticmapreduce.model EbsBlockDeviceConfig setVolumeSpecification

Introduction

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

Prototype


public void setVolumeSpecification(VolumeSpecification volumeSpecification) 

Source Link

Document

EBS volume specifications such as volume type, IOPS, and size (GiB) that will be requested for the EBS volume attached to an EC2 instance in the cluster.

Usage

From source file:org.finra.herd.dao.impl.EmrDaoImpl.java

License:Apache License

/**
 * Creates a list of {@link EbsBlockDeviceConfig} from a given list of {@link EmrClusterDefinitionEbsBlockDeviceConfig}.
 *
 * @param emrClusterDefinitionEbsBlockDeviceConfigs the list of {@link EmrClusterDefinitionEbsBlockDeviceConfig}
 *
 * @return the list of {@link EbsBlockDeviceConfig}
 *///w w w.  jav a 2  s . com
protected List<EbsBlockDeviceConfig> getEbsBlockDeviceConfigs(
        List<EmrClusterDefinitionEbsBlockDeviceConfig> emrClusterDefinitionEbsBlockDeviceConfigs) {
    List<EbsBlockDeviceConfig> ebsBlockDeviceConfigs = null;

    if (!CollectionUtils.isEmpty(emrClusterDefinitionEbsBlockDeviceConfigs)) {
        ebsBlockDeviceConfigs = new ArrayList<>();

        for (EmrClusterDefinitionEbsBlockDeviceConfig emrClusterDefinitionEbsBlockDeviceConfig : emrClusterDefinitionEbsBlockDeviceConfigs) {
            if (emrClusterDefinitionEbsBlockDeviceConfig != null) {
                EbsBlockDeviceConfig ebsBlockDeviceConfig = new EbsBlockDeviceConfig();
                ebsBlockDeviceConfig.setVolumeSpecification(getVolumeSpecification(
                        emrClusterDefinitionEbsBlockDeviceConfig.getVolumeSpecification()));
                ebsBlockDeviceConfig.setVolumesPerInstance(
                        emrClusterDefinitionEbsBlockDeviceConfig.getVolumesPerInstance());

                ebsBlockDeviceConfigs.add(ebsBlockDeviceConfig);
            }
        }
    }

    return ebsBlockDeviceConfigs;
}