public class JobsConcurrencyService extends java.lang.Object implements Service, Instrumentable
ZKJobsConcurrencyService provides a more meaningful implementation.CONF_PREFIX, DEFAULT_LOCK_TIMEOUT, lockTimeout| Constructor and Description |
|---|
JobsConcurrencyService() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the jobs concurrency service.
|
java.lang.Class<? extends Service> |
getInterface()
Return the public interface for the jobs concurrency services
|
java.util.List<java.lang.String> |
getJobIdsForThisServer(java.util.List<java.lang.String> ids)
Filter out any job ids that should not be processed by this server.
|
java.util.Map<java.lang.String,java.lang.String> |
getOtherServerUrls()
Return a map of instance id to other Oozie servers URL in HA.
|
java.util.Map<java.lang.String,java.lang.String> |
getServerUrls()
Return a map of instance id to Oozie server URL.
|
void |
init(Services services)
Initialize the jobs concurrency service
|
void |
instrument(Instrumentation instr)
Instruments the jobs concurrency service.
|
boolean |
isAllServerRequest(java.util.Map<java.lang.String,java.lang.String[]> params)
Checks if rest request is for all server.
|
boolean |
isHighlyAvailableMode()
Check if it is running in HA mode
|
boolean |
isJobIdForThisServer(java.lang.String jobId)
Check to see if jobId should be processed by this server.
|
boolean |
isLeader()
Check to see if this server is the first server.
|
public JobsConcurrencyService()
public void init(Services services) throws ServiceException
init in interface Serviceservices - services instance.ServiceException - thrown if the service could not initialize.public void destroy()
public java.lang.Class<? extends Service> getInterface()
getInterface in interface ServiceJobsConcurrencyService.public void instrument(Instrumentation instr)
instrument in interface Instrumentableinstr - instance to instrument the jobs concurrency service to.public boolean isLeader()
public boolean isJobIdForThisServer(java.lang.String jobId)
jobId - The jobId to checkpublic java.util.List<java.lang.String> getJobIdsForThisServer(java.util.List<java.lang.String> ids)
ids - The list of job ids to checkpublic java.util.Map<java.lang.String,java.lang.String> getServerUrls()
java.lang.Exceptionpublic java.util.Map<java.lang.String,java.lang.String> getOtherServerUrls()
java.lang.Exceptionpublic boolean isAllServerRequest(java.util.Map<java.lang.String,java.lang.String[]> params)
params - the HttpRequest parampublic boolean isHighlyAvailableMode()
Copyright © 2019 Apache Software Foundation. All Rights Reserved.