Index: src/docs/src/documentation/content/xdocs/notification.xml
===================================================================
--- src/docs/src/documentation/content/xdocs/notification.xml (revision 1197252)
+++ src/docs/src/documentation/content/xdocs/notification.xml (working copy)
@@ -150,8 +150,79 @@
System.out.println("Message: "+msg);
-
Notification is enabled by default. To disable notification, you need to leave hive.metastore.event.listeners blank or remove it from hive-site.xml.
+
+
+
+ Server Configuration
+ To enable notification, you need to configure the server (see below).
+ To disable notification, you need to leave hive.metastore.event.listeners blank or remove it from hive-site.xml.
+
+ Enable JMS Notifications
+ You need to make (add/modify) the following changes to the hive-site.xml file of your HCatalog server to turn on notifications.
+
+
+<property>
+<name>hive.metastore.event.expiry.duration</name>
+<value>300L</value>
+<description>Duration after which events expire from events table (in seconds)</description>
+</property>
+
+<property>
+<name>hive.metastore.event.clean.freq</name>
+<value>360L</value>
+<description>Frequency at which timer task runs to purge expired events in metastore(in seconds).</description>
+</property>
+
+<property>
+<name>msgbus.brokerurl</name>
+<value>tcp://localhost:61616</value>
+<description></description>
+</property>
+
+<property>
+<name>msgbus.username</name>
+<value></value>
+<description></description>
+</property>
+
+<property>
+<name>msgbus.password</name>
+<value></value>
+<description></description>
+</property>
+
+
+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
+
+
+Then, follow these steps:
+
+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.
+jndi.properties file is located at $YOUR_HCAT_SERVER/etc/hcatalog/jndi.properties
+You need to uncomment and set the following properties in this file: -
+
+java.naming.factory.initial = org.apache.activemq.jndi.ActiveMQInitialContextFactory
+java.naming.provider.url = tcp://localhost:61616 (this is activemq url in your setup)
+
+
+
+
+
+Topic Names
+If tables are created while the server is configured for notifications, a default topic name is automatically set as table property. To use notifications with tables created previously (previous HCatalog installations or created prior to enabling notifications), you will have to manually set a topic name, an example will be:
+
+$YOUR_HCAT_CLIENT_HOME/bin/hcat -e "ALTER TABLE access SET hcat.msgbus.topic.name=$TOPIC_NAME"
+
+
+You then need to configure your activemq Consumer(s) to listen for messages on the topic you gave in $TOPIC_NAME. A good default policy for TOPIC_NAME = "$database.$table" (that is a literal dot)
+
+