List of usage examples for com.amazonaws.services.elasticmapreduce.model AddJobFlowStepsRequest AddJobFlowStepsRequest
public AddJobFlowStepsRequest(String jobFlowId, java.util.List<StepConfig> steps)
From source file:org.finra.dm.dao.impl.EmrDaoImpl.java
License:Apache License
/** * Add an EMR Step. This method adds the step to EMR cluster based on the input. * * @param clusterName EMR cluster name./* w ww . j a v a 2 s. c o m*/ * @param emrStepConfig the EMR step config to be added. * @param awsParamsDto the proxy details. * <p/> * There are five serializable objects supported currently. They are 1: ShellStep - For shell scripts 2: OozieStep - For Oozie workflow xml files 3: * HiveStep - For hive scripts 4: HadoopJarStep - For Custom Map Reduce Jar files and 5: PigStep - For Pig scripts. * * @return the step id */ @Override public String addEmrStep(String clusterName, StepConfig emrStepConfig, AwsParamsDto awsParamsDto) throws Exception { List<StepConfig> steps = new ArrayList<>(); // Get the EMR cluster id String clusterId = getValidEmrClusterIdByName(clusterName, awsParamsDto); steps.add(emrStepConfig); // Add the job flow request AddJobFlowStepsRequest jobFlowStepRequest = new AddJobFlowStepsRequest(clusterId, steps); List<String> emrStepIds = emrOperations.addJobFlowStepsRequest(getEmrClient(awsParamsDto), jobFlowStepRequest); return emrStepIds.get(0); }
From source file:org.finra.herd.dao.impl.EmrDaoImpl.java
License:Apache License
@Override public String addEmrStep(String clusterId, StepConfig emrStepConfig, AwsParamsDto awsParamsDto) throws Exception { List<StepConfig> steps = new ArrayList<>(); steps.add(emrStepConfig);//from ww w . j av a 2 s .c o m // Add the job flow request AddJobFlowStepsRequest jobFlowStepRequest = new AddJobFlowStepsRequest(clusterId, steps); List<String> emrStepIds = emrOperations.addJobFlowStepsRequest(getEmrClient(awsParamsDto), jobFlowStepRequest); return emrStepIds.get(0); }