public class HCatAccessorService extends java.lang.Object implements Service
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
CONF_PREFIX |
static java.lang.String |
HCAT_CONFIGURATION |
static java.lang.String |
JMS_CONNECTIONS_PROPERTIES |
DEFAULT_LOCK_TIMEOUT, lockTimeout| Constructor and Description |
|---|
HCatAccessorService() |
| Modifier and Type | Method and Description |
|---|---|
void |
destroy()
Destroy the service.
|
org.apache.hadoop.conf.Configuration |
getHCatConf() |
java.lang.Class<? extends Service> |
getInterface()
Return the public interface of the service.
|
JMSConnectionInfo |
getJMSConnectionInfo(java.net.URI publisherURI)
Given a publisher host:port return the connection details of JMS server that the publisher
publishes to
|
void |
init(Services services)
Initialize the service.
|
boolean |
isKnownPublisher(java.net.URI sourceURI)
Determine whether a given source URI publishes JMS messages
|
boolean |
isRegisteredForNotification(org.apache.oozie.util.HCatURI hcatURI)
Check if we are already listening to the JMS topic for the table in the given hcatURI
|
void |
registerForNotification(org.apache.oozie.util.HCatURI hcatURI,
java.lang.String topic,
HCatMessageHandler msgHandler)
Register for notifications on a JMS topic for the specified hcatalog table.
|
void |
unregisterFromNotification(org.apache.oozie.util.HCatURI hcatURI) |
void |
unregisterFromNotification(java.lang.String server,
java.lang.String database,
java.lang.String table) |
public static final java.lang.String CONF_PREFIX
public static final java.lang.String JMS_CONNECTIONS_PROPERTIES
public static final java.lang.String HCAT_CONFIGURATION
public HCatAccessorService()
public void init(Services services) throws ServiceException
ServiceService singleton at start up time.init in interface Serviceservices - services singleton initializing the service.ServiceException - thrown if the service could not initialize.public org.apache.hadoop.conf.Configuration getHCatConf()
public boolean isKnownPublisher(java.net.URI sourceURI)
sourceURI - URI of the publisherpublic JMSConnectionInfo getJMSConnectionInfo(java.net.URI publisherURI)
publisherURI - URI of the publisherpublic boolean isRegisteredForNotification(org.apache.oozie.util.HCatURI hcatURI)
hcatURI - hcatalog partition URIpublic void registerForNotification(org.apache.oozie.util.HCatURI hcatURI, java.lang.String topic, HCatMessageHandler msgHandler)
hcatURI - hcatalog partition URItopic - JMS topic to register tomsgHandler - Handler which will process the messages received on the topicpublic void unregisterFromNotification(org.apache.oozie.util.HCatURI hcatURI)
public void unregisterFromNotification(java.lang.String server, java.lang.String database, java.lang.String table)
public void destroy()
ServiceService singleton at shutdown time.public java.lang.Class<? extends Service> getInterface()
ServicegetInterface in interface ServiceCopyright © 2018 Apache Software Foundation. All Rights Reserved.