public interface JobService
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(JobSettingsDTO 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.
|
JobDTO |
getJob(long jobId)
Retrieves information about a single job.
|
JobDTO |
getJobByName(String jobName)
Will try and get a job by name.
|
JobDTO |
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<JobDTO> |
getJobsByName(String jobName)
Retrieves all jobs matching a name exactly.
|
List<JobDTO> |
getJobsByRegex(Pattern regex)
Retrieves all jobs with a name matching a given regex.
|
RunDTO |
getRun(long runId)
Retrieves the metadata of a run.
|
JobsDTO |
listAllJobs()
Returns a list of all jobs that are active.
|
RunsDTO |
listRuns(Long jobId,
Boolean activeOnly,
Integer offset,
Integer limit)
Lists runs from most recently started to least.
|
void |
reset(long jobId,
JobSettingsDTO 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,
RunParametersDTO params)
Runs the job now.
|
void |
upsertJob(JobSettingsDTO jobSettingsDTO,
boolean failOnDuplicateJobNames)
Given a job settings DTO object it will: - try to find the id by name.
|
long createJob(JobSettingsDTO jobSettingsDTO) throws IOException, DatabricksRestException
void deleteJob(long jobId) throws IOException, DatabricksRestException
jobId
- The canonical identifier of the job to deleteIOException
DatabricksRestException
void deleteJob(String jobName) throws IOException, DatabricksRestException
jobName
- - the job name to delete.IOException
DatabricksRestException
JobDTO getJob(long jobId) throws IOException, DatabricksRestException
jobId
- The canonical identifier of the job to retrieve information aboutIOException
DatabricksRestException
List<JobDTO> getJobsByName(String jobName) throws IOException, DatabricksRestException
jobName
- - the full name of the jobIOException
DatabricksRestException
JobDTO getJobByName(String jobName) throws IOException, DatabricksRestException
JobDTO getJobByName(String jobName, boolean failOnMultipleJobs) throws IOException, DatabricksRestException
List<JobDTO> getJobsByRegex(Pattern regex) throws IOException, DatabricksRestException
regex
- - the regex to earch forIOException
DatabricksRestException
JobsDTO listAllJobs() throws IOException, DatabricksRestException
IOException
DatabricksRestException
String getJobLink(long jobId)
jobId
- The canonical identifier of the job to retrieve information aboutRunNowDTO runJobNow(long jobId) throws DatabricksRestException, IOException
jobId
- The job to runDatabricksRestException
IOException
RunNowDTO 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 taskDatabricksRestException
IOException
RunNowDTO runJobNow(long jobId, RunParametersDTO 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
1000DatabricksRestException
IOException
RunDTO getRun(long runId) throws DatabricksRestException, IOException
runId
- The canonical identifier of the run for which to retrieve the metadataDatabricksRestException
IOException
void cancelRun(long runId) throws IOException, DatabricksRestException
runId
- The desired run to cancelIOException
DatabricksRestException
void reset(long jobId, JobSettingsDTO 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(JobSettingsDTO jobSettingsDTO, boolean failOnDuplicateJobNames) throws IOException, DatabricksRestException
IOException
DatabricksRestException
Copyright © 2018. All rights reserved.