Search in sources :

Example 6 with Configuration

use of com.amazonaws.services.elasticmapreduce.model.Configuration in project herd by FINRAOS.

the class EmrHelper method getConfigurations.

/**
 * Returns list of EmrClusterInstanceTypeConfiguration
 *
 * @param configurations AWS configuration object list
 *
 * @return list of EmrClusterInstanceTypeConfiguration
 */
protected List<EmrClusterInstanceTypeConfiguration> getConfigurations(List<Configuration> configurations) {
    List<EmrClusterInstanceTypeConfiguration> emrClusterInstanceTypeConfigurations = null;
    if (!CollectionUtils.isEmpty(configurations)) {
        emrClusterInstanceTypeConfigurations = new ArrayList<>();
        for (Configuration configuration : configurations) {
            if (configuration != null) {
                EmrClusterInstanceTypeConfiguration emrClusterInstanceTypeConfiguration = new EmrClusterInstanceTypeConfiguration();
                emrClusterInstanceTypeConfiguration.setClassification(configuration.getClassification());
                emrClusterInstanceTypeConfiguration.setConfigurations(getConfigurations(configuration.getConfigurations()));
                emrClusterInstanceTypeConfiguration.setProperties(getParameterList(configuration.getProperties()));
                emrClusterInstanceTypeConfigurations.add(emrClusterInstanceTypeConfiguration);
            }
        }
    }
    return emrClusterInstanceTypeConfigurations;
}
Also used : EmrClusterInstanceTypeConfiguration(org.finra.herd.model.api.xml.EmrClusterInstanceTypeConfiguration) Configuration(com.amazonaws.services.elasticmapreduce.model.Configuration) EmrClusterInstanceTypeConfiguration(org.finra.herd.model.api.xml.EmrClusterInstanceTypeConfiguration)

Aggregations

Configuration (com.amazonaws.services.elasticmapreduce.model.Configuration)6 EmrClusterDefinitionConfiguration (org.finra.herd.model.api.xml.EmrClusterDefinitionConfiguration)4 Test (org.junit.Test)4 EbsConfiguration (com.amazonaws.services.elasticmapreduce.model.EbsConfiguration)3 AbstractDaoTest (org.finra.herd.dao.AbstractDaoTest)3 EmrClusterDefinitionEbsConfiguration (org.finra.herd.model.api.xml.EmrClusterDefinitionEbsConfiguration)3 Parameter (org.finra.herd.model.api.xml.Parameter)3 EmrClusterInstanceTypeConfiguration (org.finra.herd.model.api.xml.EmrClusterInstanceTypeConfiguration)2 ClientConfiguration (com.amazonaws.ClientConfiguration)1 Application (com.amazonaws.services.elasticmapreduce.model.Application)1 BootstrapActionConfig (com.amazonaws.services.elasticmapreduce.model.BootstrapActionConfig)1 EbsBlockDevice (com.amazonaws.services.elasticmapreduce.model.EbsBlockDevice)1 InstanceFleet (com.amazonaws.services.elasticmapreduce.model.InstanceFleet)1 InstanceFleetProvisioningSpecifications (com.amazonaws.services.elasticmapreduce.model.InstanceFleetProvisioningSpecifications)1 InstanceFleetStateChangeReason (com.amazonaws.services.elasticmapreduce.model.InstanceFleetStateChangeReason)1 InstanceFleetStatus (com.amazonaws.services.elasticmapreduce.model.InstanceFleetStatus)1 InstanceFleetTimeline (com.amazonaws.services.elasticmapreduce.model.InstanceFleetTimeline)1 InstanceGroupConfig (com.amazonaws.services.elasticmapreduce.model.InstanceGroupConfig)1 InstanceTypeConfig (com.amazonaws.services.elasticmapreduce.model.InstanceTypeConfig)1 InstanceTypeSpecification (com.amazonaws.services.elasticmapreduce.model.InstanceTypeSpecification)1