public interface JobServiceV21
| Modifier and Type | Method and Description |
|---|---|
String |
buildRunJobRestUrl(long jobId,
long numberInJob)
Formatting databricks job rest url.
|
void |
cancelRun(long runId)
Cancels a run.
|
long |
createJob(JobSettingsDTOv21 jobSettingsDTO)
Creates job from settings DTO.
|
void |
deleteJob(long jobId)
Deletes the job and sends an email to the addresses specified in email_notifications.
|
void |
deleteJob(String jobName)
Deletes a job with a given name.
|
JobDTOv21 |
getJob(long jobId)
Retrieves information about a single job.
|
JobDTOv21 |
getJobByName(String jobName)
Will try and get a job by name.
|
JobDTOv21 |
getJobByName(String jobName,
boolean failOnMultipleJobs)
Will try and get a job by name.
|
String |
getJobLink(long jobId)
Produces the URL of a job given job id.
|
List<JobDTOv21> |
getJobsByName(String jobName)
Retrieves all jobs matching a name exactly.
|
List<JobDTOv21> |
getJobsByRegex(Pattern regex)
Retrieves all jobs with a name matching a given regex.
|
String |
getOutput(long runId)
Retrieve the output of a run.
|
RunDTO |
getRun(long runId)
Retrieves the metadata of a run.
|
List<JobDTOv21> |
listAllJobs()
Returns a list of all jobs that are active.
|
JobsDTOv21 |
listJobs(int limit,
int offset,
boolean expandTasks)
Retrieves a list of jobs.
|
RunsDTO |
listRuns(Long jobId,
Boolean activeOnly,
Integer offset,
Integer limit)
Lists runs from most recently started to least.
|
void |
reset(long jobId,
JobSettingsDTOv21 jobSettings)
"resets" or "edits" a job definition.
|
RunNowDTO |
runJobNow(long jobId)
Runs the job now.
|
RunNowDTO |
runJobNow(long jobId,
Map<String,String> notebookParams)
Runs the job now.
|
RunNowDTO |
runJobNow(long jobId,
RunParametersDTOv21 params)
Runs the job now.
|
RunNowDTO |
runSubmit(RunSubmitDTO runSettings)
Submit a one-time run.
|
void |
upsertJob(JobSettingsDTOv21 jobSettingsDTO,
boolean failOnDuplicateJobNames)
Given a job settings DTO object it will: - try to find the id by name.
|
long createJob(JobSettingsDTOv21 jobSettingsDTO) throws IOException, DatabricksRestException
void deleteJob(long jobId)
throws IOException,
DatabricksRestException
jobId - The canonical identifier of the job to deleteIOExceptionDatabricksRestExceptionvoid deleteJob(String jobName) throws IOException, DatabricksRestException
jobName - - the job name to delete.IOExceptionDatabricksRestExceptionJobDTOv21 getJob(long jobId) throws IOException, DatabricksRestException
jobId - The canonical identifier of the job to retrieve information aboutIOExceptionDatabricksRestExceptionList<JobDTOv21> getJobsByName(String jobName) throws IOException, DatabricksRestException
jobName - - the full name of the jobIOExceptionDatabricksRestExceptionJobDTOv21 getJobByName(String jobName) throws IOException, DatabricksRestException
JobDTOv21 getJobByName(String jobName, boolean failOnMultipleJobs) throws IOException, DatabricksRestException
List<JobDTOv21> getJobsByRegex(Pattern regex) throws IOException, DatabricksRestException
regex - - the regex to earch forIOExceptionDatabricksRestExceptionList<JobDTOv21> listAllJobs() throws DatabricksRestException, IOException
DatabricksRestExceptionIOExceptionJobsDTOv21 listJobs(int limit, int offset, boolean expandTasks) throws IOException, DatabricksRestException
offset - The offset of the first job to return, relative to the most recently created job.limit - The number of jobs to return. This value should be greater than 0 and less than 25.expandTasks - Whether to include task and cluster details in the response.
1000 * @see https://docs.databricks.com/api/latest/jobs.html#listIOExceptionDatabricksRestExceptionString getJobLink(long jobId)
jobId - The canonical identifier of the job to retrieve information aboutRunNowDTO runJobNow(long jobId) throws DatabricksRestException, IOException
jobId - The job to runDatabricksRestExceptionIOExceptionRunNowDTO runJobNow(long jobId, Map<String,String> notebookParams) throws DatabricksRestException, IOException
jobId - The job to runnotebookParams - A map from keys to values for jobs with notebook taskDatabricksRestExceptionIOExceptionRunNowDTO runJobNow(long jobId, RunParametersDTOv21 params) throws DatabricksRestException, IOException
jobId - the job id to runparams - the run parametersDatabricksRestException - any db specific exceptionsIOException - any other exceptionsRunsDTO listRuns(Long jobId, Boolean activeOnly, Integer offset, Integer limit) throws DatabricksRestException, IOException
jobId - The job for which to list runs. If omitted,
the Jobs service will list runs from all jobsactiveOnly - If true, lists active runs only; otherwise, lists both active and inactive
runsoffset - The offset of the first run to return, relative to the most recent run. The
default value is 20limit - The number of runs to return. This value should be greater than 0 and less than
1000DatabricksRestExceptionIOExceptionRunDTO getRun(long runId) throws DatabricksRestException, IOException
runId - The canonical identifier of the run for which to retrieve the metadataDatabricksRestExceptionIOExceptionvoid cancelRun(long runId)
throws IOException,
DatabricksRestException
runId - The desired run to cancelIOExceptionDatabricksRestExceptionvoid reset(long jobId,
JobSettingsDTOv21 jobSettings)
throws IOException,
DatabricksRestException
jobId - the job to editjobSettings - the settings to change the job toIOException - any other errorsDatabricksRestException - any specific db errorsString buildRunJobRestUrl(long jobId, long numberInJob)
void upsertJob(JobSettingsDTOv21 jobSettingsDTO, boolean failOnDuplicateJobNames) throws IOException, DatabricksRestException
IOExceptionDatabricksRestExceptionRunNowDTO runSubmit(RunSubmitDTO runSettings) throws IOException, DatabricksRestException
runSettings - the settings to change the job toIOExceptionDatabricksRestExceptionString getOutput(long runId) throws IOException, DatabricksRestException
runId - The desired run idIOExceptionDatabricksRestExceptionCopyright © 2023. All rights reserved.