List of usage examples for com.amazonaws.services.elasticmapreduce.model Step getName
public String getName()
The name of the cluster step.
From source file:org.finra.dm.service.impl.EmrServiceImpl.java
License:Apache License
/** * Builds EmrStep object from the EMR step. Fills in details if verbose=true. *//*from w w w. j av a2s. c o m*/ private EmrStep buildEmrStepFromAwsStep(Step step, boolean verbose) { EmrStep emrStep = new EmrStep(); emrStep.setId(step.getId()); emrStep.setStepName(step.getName()); emrStep.setStatus(step.getStatus().getState()); if (verbose) { emrStep.setJarLocation(step.getConfig().getJar()); emrStep.setMainClass(step.getConfig().getMainClass()); emrStep.setScriptArguments(step.getConfig().getArgs()); emrStep.setContinueOnError(step.getActionOnFailure()); } return emrStep; }
From source file:org.finra.herd.dao.impl.MockEmrOperationsImpl.java
License:Apache License
@Override public DescribeStepResult describeStepRequest(AmazonElasticMapReduceClient emrClient, DescribeStepRequest describeStepRequest) { MockEmrJobFlow cluster = getClusterById(describeStepRequest.getClusterId()); if (cluster == null) { throw new AmazonServiceException( "No cluster found with jobFlowId: " + describeStepRequest.getClusterId()); }// w ww . j av a 2 s . c o m Step stepResult = null; // Add steps that are in these states for (MockEmrJobFlow step : cluster.getSteps()) { if (describeStepRequest.getStepId().equalsIgnoreCase(step.getJobFlowId())) { HadoopStepConfig hadoopStepConfig = new HadoopStepConfig().withJar(step.getJarLocation()); stepResult = new Step().withId(step.getJobFlowId()).withName(step.getJobFlowName()) .withStatus(new StepStatus().withState(step.getStatus())).withConfig(hadoopStepConfig); if (stepResult.getName().equalsIgnoreCase(MOCK_STEP_WITHOUT_ID_NAME)) { stepResult.setId(null); } break; } } return new DescribeStepResult().withStep(stepResult); }