...
For the server to start with support for notifications, the following must be in the classpath:
..... (a) activemq
jar
..... (b) jndi.properties
file with properties suitably configured for notifications
...
- The HCatalog server start script is $YOUR_HCAT_SERVER
/share/hcatalog/scripts/hcat_server_start.sh
. - This script expects classpath to be set by the AUX_CLASSPATH environment variable.
- Therefore set AUX_CLASSPATH to satisfy (a) and (b) above.
- The
jndi.properties
file is located at $YOUR_HCAT_SERVER/etc/hcatalog/jndi.properties
. - You need to uncomment and set the following properties in the
jndi.properties
file:java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
java.naming.provider.url = tcp://localhost:61616
.. (This is the ActiveMQ URL in your setup.)
...
If tables are created while the server is configured for notifications, a default topic name is automatically set as a table property. To use notifications with tables created previously (either in other HCatalog installations or prior to enabling notifications in the current installation) you will have to manually set a topic name. For example:
..... $YOUR_HCAT_CLIENT_HOME/bin/hcat -e "ALTER TABLE access SET hcat.msgbus.topic.name=$TOPIC_NAME"
...