client, JOB_TRANSACTION_ERROR_CODE
Constructor and Description |
---|
SparkJob(Cluster cluster) |
SparkJob(Cluster cluster,
String transactionId) |
Modifier and Type | Method and Description |
---|---|
abstract void |
asyncSubmit()
Submit a Spark job in async.
|
protected void |
checkJobRunningState() |
Cluster |
getCluster() |
abstract List<String> |
getDriverLog(int from,
int size,
int index)
Get a Spark job driver log when job is finished.
|
abstract List<String> |
getDriverLogByJobId(String jobId,
int from,
int size,
int index) |
String |
getJobId() |
long |
getJobTimeout() |
abstract List<String> |
getLog(int from,
int size)
Get a Spark job client log when job is finished.
|
abstract List<String> |
getLogByJobId(String jobId,
int from,
int size) |
String |
getProjectId() |
abstract SparkJobStatus |
getStatus()
Get a Spark job status, it may be starting, running, dead or success.
|
void |
setJobTimeout(int jobTimeout) |
abstract void |
submit()
Submit a Spark job.
|
apiExceptionRetryManage, executeCall, executeWithRetry, getTransactionId, getTransactionKeyName, isServiceInsideError, setTransactionId
public SparkJob(Cluster cluster)
public String getJobId()
public String getProjectId()
public Cluster getCluster()
public long getJobTimeout()
public void setJobTimeout(int jobTimeout)
public abstract void submit() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic abstract void asyncSubmit() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic abstract SparkJobStatus getStatus() throws DLIException
DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic abstract List<String> getLog(int from, int size) throws DLIException
from
- Start line of the log to be displayed. By default, the last 100 lines of the log
are displayed. If a log file contains fewer than 100 lines, line 0 is the start line.size
- Number of obtained logs.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic abstract List<String> getLogByJobId(String jobId, int from, int size) throws DLIException
DLIException
public abstract List<String> getDriverLog(int from, int size, int index) throws DLIException
from
- Start line of the log to be displayed. By default, the last 100 lines of the log
are displayed. If a log file contains fewer than 100 lines, line 0 is the start line.size
- Number of obtained logs.index
- When a submitted job is retried, multiple driver logs are generated.
This parameter specifies the index number of the specified driver log.DLIException
- If fail to call the API, e.g. server error or cannot deserialize the response bodypublic abstract List<String> getDriverLogByJobId(String jobId, int from, int size, int index) throws DLIException
DLIException
protected void checkJobRunningState() throws DLIException
DLIException
Copyright © 2023. All rights reserved.