public class HCatAccessorService extends Object implements Service
Modifier and Type | Field and Description |
---|---|
static String |
CONF_PREFIX |
static String |
HCAT_CONFIGURATION |
static String |
JMS_CONNECTIONS_PROPERTIES |
DEFAULT_LOCK_TIMEOUT, lockTimeout, USE_XCOMMAND
Constructor and Description |
---|
HCatAccessorService() |
Modifier and Type | Method and Description |
---|---|
void |
destroy()
Destroy the service.
|
org.apache.hadoop.conf.Configuration |
getHCatConf() |
Class<? extends Service> |
getInterface()
Return the public interface of the service.
|
JMSConnectionInfo |
getJMSConnectionInfo(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(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,
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(String server,
String database,
String table) |
public static final String CONF_PREFIX
public static final String JMS_CONNECTIONS_PROPERTIES
public static final String HCAT_CONFIGURATION
public HCatAccessorService()
public void init(Services services) throws ServiceException
Service
Service
singleton at start up time.init
in interface Service
services
- services singleton initializing the service.ServiceException
- thrown if the service could not initialize.public org.apache.hadoop.conf.Configuration getHCatConf()
public boolean isKnownPublisher(URI sourceURI)
sourceURI
- URI of the publisherpublic JMSConnectionInfo getJMSConnectionInfo(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, 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(String server, String database, String table)
public void destroy()
Service
Service
singleton at shutdown time.public Class<? extends Service> getInterface()
Service
getInterface
in interface Service
Copyright © 2014 Apache Software Foundation. All Rights Reserved.