public class AlarmService extends org.apache.hive.service.AbstractService implements LensService
As a schedule this service accepts start time, frequency, end time and timeZone. It also requires the
SchedulerJobHandle
which it sends as part of the
SchedulerAlarmEvent
to inform the scheduler about the job for which
job the notification has been generated.
Modifier and Type | Class and Description |
---|---|
static class |
AlarmService.LensJob |
Modifier and Type | Field and Description |
---|---|
static String |
ALARM_SERVICE |
static String |
LENS_JOBS |
static String |
NAME |
Constructor and Description |
---|
AlarmService()
Creates a new instance of AlarmService.
|
Modifier and Type | Method and Description |
---|---|
boolean |
checkExists(SchedulerJobHandle handle) |
List<org.quartz.JobExecutionContext> |
getCurrentlyExecutingJobs() |
HealthStatus |
getHealthStatus()
Returns the health status of the service.
|
void |
init(org.apache.hadoop.hive.conf.HiveConf hiveConf) |
boolean |
isShouldWaitForScheduleEventProcessing() |
void |
pauseJob(SchedulerJobHandle jobHandle) |
void |
resumeJob(SchedulerJobHandle jobHandle) |
void |
schedule(org.joda.time.DateTime start,
org.joda.time.DateTime end,
XFrequency frequency,
String jobHandle)
This method can be used by any consumer who wants to receive notifications during a time range at a given
frequency.
|
void |
setShouldWaitForScheduleEventProcessing(boolean shouldWaitForScheduleEventProcessing) |
void |
start() |
void |
stop() |
boolean |
unSchedule(SchedulerJobHandle jobHandle) |
public static final String NAME
public static final String LENS_JOBS
public static final String ALARM_SERVICE
public HealthStatus getHealthStatus()
HealthCheckable
getHealthStatus
in interface HealthCheckable
public void init(org.apache.hadoop.hive.conf.HiveConf hiveConf)
init
in interface org.apache.hive.service.Service
init
in class org.apache.hive.service.AbstractService
public void start()
start
in interface org.apache.hive.service.Service
start
in class org.apache.hive.service.AbstractService
public void stop()
stop
in interface org.apache.hive.service.Service
stop
in class org.apache.hive.service.AbstractService
public List<org.quartz.JobExecutionContext> getCurrentlyExecutingJobs()
public void schedule(org.joda.time.DateTime start, org.joda.time.DateTime end, XFrequency frequency, String jobHandle) throws LensException
This method is intended to be used by LensScheduler to subscribe for time based notifications to schedule queries. On receiving a job to be scheduled LensScheduler will subscribe to all triggers required for the job, including AlarmService for time based triggers.
start
- start time for notificationsend
- end time for notificationsfrequency
- Frequency to determine the frequency at which notification should be sent.jobHandle
- Must be a unique jobHanlde across all consumersLensException
public boolean unSchedule(SchedulerJobHandle jobHandle) throws LensException
LensException
public boolean checkExists(SchedulerJobHandle handle) throws LensException
LensException
public void pauseJob(SchedulerJobHandle jobHandle) throws LensException
LensException
public void resumeJob(SchedulerJobHandle jobHandle) throws LensException
LensException
@Generated(value="lombok") public boolean isShouldWaitForScheduleEventProcessing()
@Generated(value="lombok") public void setShouldWaitForScheduleEventProcessing(boolean shouldWaitForScheduleEventProcessing)
Copyright © 2014–2018 Apache Software Foundation. All rights reserved.