public class SchedulerDAO extends Object
Modifier and Type | Class and Description |
---|---|
static class |
SchedulerDAO.SchedulerDBStore |
static class |
SchedulerDAO.SchedulerHsqlDBStore
HSQL Based DB store.
|
static class |
SchedulerDAO.SchedulerMySQLDBStore
MySQL based DB Store.
|
Constructor and Description |
---|
SchedulerDAO(org.apache.hadoop.conf.Configuration conf) |
Modifier and Type | Method and Description |
---|---|
XJob |
getJob(SchedulerJobHandle id)
Gets the job definition from the store
|
List<SchedulerJobHandle> |
getJob(String jobName)
Get the handle given the job name.
|
List<SchedulerJobInstanceInfo> |
getJobInstances(SchedulerJobHandle id)
Gets all the instance handle id for a job.
|
List<SchedulerJobHandle> |
getJobs(String username,
SchedulerJobState jobState,
Long startTime,
Long endTime)
Gets all jobs which match the filter requirements.
|
SchedulerJobState |
getJobState(SchedulerJobHandle id)
Gets the Job status
|
SchedulerJobInfo |
getSchedulerJobInfo(SchedulerJobHandle id)
Fetches the SchedulerJobInfo object corresponding to handle id.
|
SchedulerJobInstanceInfo |
getSchedulerJobInstanceInfo(SchedulerJobInstanceHandle id)
Gets the SchedulerJobInstanceInfo corresponding instance handle id.
|
String |
getUser(SchedulerJobHandle id)
Get the user of the job who submitted the job.
|
int |
storeJob(SchedulerJobInfo jobInfo)
Saves the SchedulerJobInfo object into the store.
|
int |
storeJobInstance(SchedulerJobInstanceInfo instanceInfo) |
int |
storeJobInstanceRun(SchedulerJobInstanceRun instanceRun) |
int |
updateJob(SchedulerJobInfo info)
Updates the job definition from the new SchedulerJobInfo
|
int |
updateJobInstanceRun(SchedulerJobInstanceRun instanceRun)
Updates the instance status
|
int |
updateJobStatus(SchedulerJobInfo info)
Updates the job status form the new SchedulerJobInfo
|
public SchedulerDAO(org.apache.hadoop.conf.Configuration conf) throws LensException
LensException
public int storeJob(SchedulerJobInfo jobInfo)
jobInfo
- objectpublic SchedulerJobInfo getSchedulerJobInfo(SchedulerJobHandle id)
id:
- Job handle id.public XJob getJob(SchedulerJobHandle id)
id
- : Job handle id.public String getUser(SchedulerJobHandle id)
id
- public SchedulerJobState getJobState(SchedulerJobHandle id)
id
- : Job handle id.public int updateJob(SchedulerJobInfo info)
info:
- Updated info object.public int updateJobStatus(SchedulerJobInfo info)
info:
- Updated info objectspublic int storeJobInstance(SchedulerJobInstanceInfo instanceInfo)
public int storeJobInstanceRun(SchedulerJobInstanceRun instanceRun)
public SchedulerJobInstanceInfo getSchedulerJobInstanceInfo(SchedulerJobInstanceHandle id)
id
- : Job instance idpublic int updateJobInstanceRun(SchedulerJobInstanceRun instanceRun)
instanceRun
- : instance Run objectpublic List<SchedulerJobInstanceInfo> getJobInstances(SchedulerJobHandle id)
id:
- Job handle id.public List<SchedulerJobHandle> getJobs(String username, SchedulerJobState jobState, Long startTime, Long endTime)
username
- : User name of the jobjobState
- : state of the jobstartTime
- : Created on should be greater than this start time.endTime
- : Created on should be less than the end time.public List<SchedulerJobHandle> getJob(String jobName)
jobName
- Copyright © 2014–2016 Apache Software Foundation. All rights reserved.