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
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(HCatURI hcatURI)
Check if we are already listening to the JMS topic for the table in the given hcatURI
|
void |
registerForNotification(HCatURI hcatURI,
String topic,
HCatMessageHandler msgHandler)
Register for notifications on a JMS topic for the specified hcatalog table.
|
void |
unregisterFromNotification(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
Invoked by the 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(HCatURI hcatURI)
hcatURI
- hcatalog partition URIpublic void registerForNotification(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(HCatURI hcatURI)
public void unregisterFromNotification(String server, String database, String table)
public void destroy()
Service
Invoked by the Service
singleton at shutdown time.
public Class<? extends Service> getInterface()
Service
Services are retrieved by its public interface. Specializations of services must return the public interface.
getInterface
in interface Service
Copyright © 2018 Apache Software Foundation. All rights reserved.