use of com.dtstack.taier.pluginapi.enums.EJobType in project Taier by DTStack.
the class SparkYarnClient method processSubmitJobWithType.
@Override
protected JobResult processSubmitJobWithType(JobClient jobClient) {
try {
return KerberosUtils.login(sparkYarnConfig, () -> {
EJobType jobType = jobClient.getJobType();
JobResult jobResult = null;
if (EJobType.MR.equals(jobType)) {
jobResult = submitJobWithJar(jobClient);
} else if (EJobType.SQL.equals(jobType)) {
jobResult = submitSqlJob(jobClient);
} else if (EJobType.PYTHON.equals(jobType)) {
jobResult = submitPythonJob(jobClient);
}
return jobResult;
}, yarnConf, true);
} catch (Exception e) {
logger.info("", e);
return JobResult.createErrorResult("submit job get unknown error\n" + ExceptionUtil.getErrorMessage(e));
}
}
use of com.dtstack.taier.pluginapi.enums.EJobType in project Taier by DTStack.
the class AbstractRdbsClient method processSubmitJobWithType.
@Override
protected JobResult processSubmitJobWithType(JobClient jobClient) {
EJobType jobType = jobClient.getJobType();
JobResult jobResult = null;
if (EJobType.MR.equals(jobType)) {
jobResult = submitJobWithJar(jobClient);
} else if (EJobType.SQL.equals(jobType)) {
jobResult = submitSqlJob(jobClient);
}
return jobResult;
}
use of com.dtstack.taier.pluginapi.enums.EJobType in project Taier by DTStack.
the class FlinkClient method processSubmitJobWithType.
@Override
protected JobResult processSubmitJobWithType(JobClient jobClient) {
try {
return KerberosUtils.login(flinkConfig, () -> {
EJobType jobType = jobClient.getJobType();
JobResult jobResult = null;
if (EJobType.MR.equals(jobType)) {
jobResult = submitJobWithJar(jobClient);
} else if (EJobType.SQL.equals(jobType)) {
jobResult = submitSqlJob(jobClient);
} else if (EJobType.SYNC.equals(jobType)) {
jobResult = submitSyncJob(jobClient);
}
if (jobResult != null) {
logger.info("taskId: {}, job submit success, result: {}", jobClient.getJobId(), jobResult.toString());
}
return jobResult;
}, hadoopConf.getYarnConfiguration());
} catch (Exception e) {
logger.error("taskId: {}, can not submit a job process SubmitJobWithType error: ", jobClient.getJobId(), e);
return JobResult.createErrorResult(e);
}
}
Aggregations