|
|
@ -20,6 +20,7 @@ package org.apache.dolphinscheduler.plugin.task.emr; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.TaskConstants; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.TaskException; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.TaskException; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext; |
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.TaskExecutionContext; |
|
|
|
|
|
|
|
import org.apache.dolphinscheduler.plugin.task.api.utils.ParameterUtils; |
|
|
|
|
|
|
|
|
|
|
|
import java.util.Collections; |
|
|
|
import java.util.Collections; |
|
|
|
import java.util.HashSet; |
|
|
|
import java.util.HashSet; |
|
|
@ -126,11 +127,15 @@ public class EmrAddStepsTask extends AbstractEmrTask { |
|
|
|
protected AddJobFlowStepsRequest createAddJobFlowStepsRequest() { |
|
|
|
protected AddJobFlowStepsRequest createAddJobFlowStepsRequest() { |
|
|
|
|
|
|
|
|
|
|
|
final AddJobFlowStepsRequest addJobFlowStepsRequest; |
|
|
|
final AddJobFlowStepsRequest addJobFlowStepsRequest; |
|
|
|
|
|
|
|
String jobStepDefineJson = null; |
|
|
|
try { |
|
|
|
try { |
|
|
|
|
|
|
|
jobStepDefineJson = ParameterUtils.convertParameterPlaceholders( |
|
|
|
|
|
|
|
emrParameters.getStepsDefineJson(), |
|
|
|
|
|
|
|
ParameterUtils.convert(taskExecutionContext.getPrepareParamsMap())); |
|
|
|
addJobFlowStepsRequest = |
|
|
|
addJobFlowStepsRequest = |
|
|
|
objectMapper.readValue(emrParameters.getStepsDefineJson(), AddJobFlowStepsRequest.class); |
|
|
|
objectMapper.readValue(jobStepDefineJson, AddJobFlowStepsRequest.class); |
|
|
|
} catch (JsonProcessingException e) { |
|
|
|
} catch (JsonProcessingException e) { |
|
|
|
throw new EmrTaskException("can not parse AddJobFlowStepsRequest from json", e); |
|
|
|
throw new EmrTaskException("can not parse AddJobFlowStepsRequest from json: " + jobStepDefineJson, e); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
// When a single task definition is associated with multiple steps, the state tracking will have high
|
|
|
|
// When a single task definition is associated with multiple steps, the state tracking will have high
|
|
|
|