List of usage examples for com.amazonaws.services.elasticmapreduce.model InstanceRoleType MASTER
InstanceRoleType MASTER
To view the source code for com.amazonaws.services.elasticmapreduce.model InstanceRoleType MASTER.
Click Source Link
From source file:org.finra.dm.dao.impl.EmrDaoImpl.java
License:Apache License
/** * Create the instance group configuration for MASTER/CORE/TASK nodes as per the input parameters. * * @param emrClusterDefinition the EMR cluster definition that contains all the EMR parameters. * * @return the instance group config list with all the instance group definitions. *///from w w w . j ava 2 s. c o m private ArrayList<InstanceGroupConfig> getInstanceGroupConfig(EmrClusterDefinition emrClusterDefinition) { // Create the instance groups ArrayList<InstanceGroupConfig> emrInstanceGroups = new ArrayList<>(); // Fill-in the MASTER node details. emrInstanceGroups.add(getInstanceGroupConfig(InstanceRoleType.MASTER, emrClusterDefinition.getInstanceDefinitions().getMasterInstances().getInstanceType(), emrClusterDefinition.getInstanceDefinitions().getMasterInstances().getInstanceCount(), emrClusterDefinition.getInstanceDefinitions().getMasterInstances().getInstanceSpotPrice())); // Fill-in the CORE node details emrInstanceGroups.add(getInstanceGroupConfig(InstanceRoleType.CORE, emrClusterDefinition.getInstanceDefinitions().getCoreInstances().getInstanceType(), emrClusterDefinition.getInstanceDefinitions().getCoreInstances().getInstanceCount(), emrClusterDefinition.getInstanceDefinitions().getCoreInstances().getInstanceSpotPrice())); // Fill-in the TASK node details, if the optional task instances are specified. if (emrClusterDefinition.getInstanceDefinitions().getTaskInstances() != null) { emrInstanceGroups.add(getInstanceGroupConfig(InstanceRoleType.TASK, emrClusterDefinition.getInstanceDefinitions().getTaskInstances().getInstanceType(), emrClusterDefinition.getInstanceDefinitions().getTaskInstances().getInstanceCount(), emrClusterDefinition.getInstanceDefinitions().getTaskInstances().getInstanceSpotPrice())); } return emrInstanceGroups; }
From source file:org.finra.herd.dao.impl.EmrDaoImpl.java
License:Apache License
/** * Create the instance group configuration for MASTER/CORE/TASK nodes as per the input parameters. * * @param instanceDefinitions the instance group definitions from the EMR cluster definition * * @return the instance group config list with all the instance group definitions *//*from ww w . j ava 2 s . c o m*/ protected List<InstanceGroupConfig> getInstanceGroupConfigs(InstanceDefinitions instanceDefinitions) { List<InstanceGroupConfig> instanceGroupConfigs = null; if (!emrHelper.isInstanceDefinitionsEmpty(instanceDefinitions)) { // Create the instance group configurations. instanceGroupConfigs = new ArrayList<>(); // Fill-in the MASTER node details. instanceGroupConfigs.add(getInstanceGroupConfig(InstanceRoleType.MASTER, instanceDefinitions.getMasterInstances().getInstanceType(), instanceDefinitions.getMasterInstances().getInstanceCount(), instanceDefinitions.getMasterInstances().getInstanceSpotPrice(), instanceDefinitions.getMasterInstances().getEbsConfiguration())); // if the optional core instances are specified, fill-in the CORE node details. if (instanceDefinitions.getCoreInstances() != null) { instanceGroupConfigs.add(getInstanceGroupConfig(InstanceRoleType.CORE, instanceDefinitions.getCoreInstances().getInstanceType(), instanceDefinitions.getCoreInstances().getInstanceCount(), instanceDefinitions.getCoreInstances().getInstanceSpotPrice(), instanceDefinitions.getCoreInstances().getEbsConfiguration())); } // If the optional task instances are specified, fill-in the TASK node details. if (instanceDefinitions.getTaskInstances() != null) { instanceGroupConfigs.add(getInstanceGroupConfig(InstanceRoleType.TASK, instanceDefinitions.getTaskInstances().getInstanceType(), instanceDefinitions.getTaskInstances().getInstanceCount(), instanceDefinitions.getTaskInstances().getInstanceSpotPrice(), instanceDefinitions.getTaskInstances().getEbsConfiguration())); } } return instanceGroupConfigs; }