use of com.dtstack.taier.scheduler.WorkerOperator in project Taier by DTStack.
the class UploadParamPipeline method pipeline.
@Override
public void pipeline(Map<String, Object> actionParam, Map<String, Object> pipelineParam) throws RdosDefineException {
if (pipelineParam.containsKey(pipelineKey)) {
return;
}
ScheduleTaskShade taskShade = (ScheduleTaskShade) pipelineParam.get(taskShadeKey);
if (null == taskShade) {
throw new RdosDefineException("upload param pipeline task shade can not be null");
}
ScheduleJob scheduleJob = (ScheduleJob) pipelineParam.get(scheduleJobKey);
if (null == scheduleJob) {
throw new RdosDefineException("upload param pipeline schedule job can not be null");
}
String fileUploadPath = (String) pipelineParam.get(fileUploadPathKey);
if (StringUtils.isBlank(fileUploadPath)) {
throw new RdosDefineException("upload param pipeline fileUploadPath can not be null");
}
WorkerOperator workerOperator = (WorkerOperator) pipelineParam.get(workOperatorKey);
if (null == workerOperator) {
throw new RdosDefineException("upload param pipeline workerOperator can not be null");
}
JSONObject pluginInfo = (JSONObject) pipelineParam.get(pluginInfoKey);
if (null == pluginInfo) {
throw new RdosDefineException("upload param pipeline pluginInfo can not be null");
}
@SuppressWarnings("unchecked") List<ScheduleTaskParamShade> taskParamShades = (List) pipelineParam.get(taskParamsToReplaceKey);
String uploadPath = this.uploadSqlTextToHdfs((String) actionParam.get("sqlText"), taskShade.getTaskType(), taskShade.getName(), taskShade.getTenantId(), 0L, taskParamShades, scheduleJob.getCycTime(), fileUploadPath, pluginInfo, workerOperator, scheduleJob.getJobId());
pipelineParam.put(pipelineKey, uploadPath);
}
Aggregations