List of usage examples for com.amazonaws.services.elasticmapreduce.model InstanceGroupConfig setBidPrice
public void setBidPrice(String bidPrice)
The bid price for each EC2 Spot instance type as defined by InstanceType
.
From source file:org.finra.dm.dao.impl.EmrDaoImpl.java
License:Apache License
/** * Create the instance group configuration. * * @param roleType role type for the instance group (MASTER/CORE/TASK). * @param instanceType EC2 instance type for the instance group. * @param instanceCount number of instances for the instance group. * @param bidPrice bid price in case of SPOT instance request. * * @return the instance group config object. *//*from w w w. j av a 2s. co m*/ private InstanceGroupConfig getInstanceGroupConfig(InstanceRoleType roleType, String instanceType, Integer instanceCount, BigDecimal bidPrice) { InstanceGroupConfig instanceGroup = new InstanceGroupConfig(roleType, instanceType, instanceCount); // Consider spot price, if specified if (bidPrice != null) { instanceGroup.setMarket(MarketType.SPOT); instanceGroup.setBidPrice(bidPrice.toString()); } return instanceGroup; }
From source file:org.finra.herd.dao.impl.EmrDaoImpl.java
License:Apache License
/** * Creates an instance group configuration. * * @param roleType role type for the instance group (MASTER/CORE/TASK) * @param instanceType EC2 instance type for the instance group * @param instanceCount number of instances for the instance group * @param bidPrice bid price in case of SPOT instance request * @param emrClusterDefinitionEbsConfiguration the instance of {@link EmrClusterDefinitionEbsConfiguration} that contains EBS configurations that will be * attached to each EC2 instance in this instance group * * @return the instance group config object *///from w ww . j a v a2 s . com protected InstanceGroupConfig getInstanceGroupConfig(InstanceRoleType roleType, String instanceType, Integer instanceCount, BigDecimal bidPrice, EmrClusterDefinitionEbsConfiguration emrClusterDefinitionEbsConfiguration) { // Create an instance group configuration with an optional EBS configuration. InstanceGroupConfig instanceGroup = new InstanceGroupConfig(roleType, instanceType, instanceCount) .withEbsConfiguration(getEbsConfiguration(emrClusterDefinitionEbsConfiguration)); // Consider spot price, if specified. if (bidPrice != null) { instanceGroup.setMarket(MarketType.SPOT); instanceGroup.setBidPrice(bidPrice.toString()); } return instanceGroup; }