Modifier and Type | Field and Description |
---|---|
static long |
JOB_TIMEOUT_SECOND |
client, JOB_TRANSACTION_ERROR_CODE
Modifier and Type | Method and Description |
---|---|
void |
cancelJob()
Cancel RUNNING or LAUNCHING status job.
|
protected boolean |
checkJobFinish(long startTime,
JobResultInfo jobResultInfo) |
protected boolean |
checkJobFinish(long startTime,
JobResultInfo jobResultInfo,
Long waitTime) |
protected void |
checkJobRunningStatus(String jobId)
Check job running status by jobId after submit(),
when job status is FINISHED,FAILED,CANCELLED,mean job is over.
|
List<Map<String,Object>> |
getConf() |
String |
getJobId() |
long |
getJobTimeout() |
JobType |
getJobType() |
String |
getProjectId() |
Queue |
getQueue() |
JobStatus |
getStatus()
Get the latest job status
|
protected JobResultInfo |
getStatusResult(String jobId)
Get this job resultInfo: detail,statement,status...
|
Map<String,String> |
getTags() |
protected String |
getTransactionKeyName() |
void |
setConf(List<Map<String,Object>> conf) |
void |
setJobId(String jobId) |
void |
setJobTimeout(int jobTimeout)
Set job timeout, default 300s
|
protected void |
setJobType(JobType jobType) |
void |
setTags(Map<String,String> tags) |
abstract void |
submit() |
apiExceptionRetryManage, executeCall, executeWithRetry, getTransactionId, isServiceInsideError, setTransactionId
public static final long JOB_TIMEOUT_SECOND
public Job(Queue queue)
protected String getTransactionKeyName()
getTransactionKeyName
in class BaseJob
public String getJobId()
public Queue getQueue()
public void setJobId(String jobId)
public String getProjectId()
public JobType getJobType()
protected void setJobType(JobType jobType)
public void cancelJob() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic abstract void submit() throws DLIException
DLIException
public JobStatus getStatus() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyprotected JobResultInfo getStatusResult(String jobId) throws DLIException
jobId
- the job idDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic void setJobTimeout(int jobTimeout)
jobTimeout
- job time out in secondpublic long getJobTimeout()
protected void checkJobRunningStatus(String jobId) throws DLIException
jobId
- the job idDLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodyprotected boolean checkJobFinish(long startTime, JobResultInfo jobResultInfo) throws DLIException
DLIException
protected boolean checkJobFinish(long startTime, JobResultInfo jobResultInfo, Long waitTime) throws DLIException
DLIException
Copyright © 2023. All rights reserved.