incubator-hcatalog-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tra...@apache.org
Subject svn commit: r1438628 - in /incubator/hcatalog/branches/branch-0.5: CHANGES.txt server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java
Date Fri, 25 Jan 2013 18:15:19 GMT
Author: travis
Date: Fri Jan 25 18:15:19 2013
New Revision: 1438628

URL: http://svn.apache.org/viewvc?rev=1438628&view=rev
Log:
HCATALOG-599 NotificationListener doesn't use getTopic() for sending messages.

Modified:
    incubator/hcatalog/branches/branch-0.5/CHANGES.txt
    incubator/hcatalog/branches/branch-0.5/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java

Modified: incubator/hcatalog/branches/branch-0.5/CHANGES.txt
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.5/CHANGES.txt?rev=1438628&r1=1438627&r2=1438628&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.5/CHANGES.txt (original)
+++ incubator/hcatalog/branches/branch-0.5/CHANGES.txt Fri Jan 25 18:15:19 2013
@@ -164,6 +164,8 @@ Release 0.5.0 - Unreleased
   OPTIMIZATIONS
 
   BUG FIXES
+  HCAT-599 NotificationListener doesn't use getTopic() for sending messages. (mithun via
traviscrawford)
+
   HCAT-605 HCatalog release script does not update version in build.properties (traviscrawford)
 
   HCAT-603 releaseaudit should run before generating artifacts (traviscrawford)

Modified: incubator/hcatalog/branches/branch-0.5/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java
URL: http://svn.apache.org/viewvc/incubator/hcatalog/branches/branch-0.5/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java?rev=1438628&r1=1438627&r2=1438628&view=diff
==============================================================================
--- incubator/hcatalog/branches/branch-0.5/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java
(original)
+++ incubator/hcatalog/branches/branch-0.5/server-extensions/src/main/java/org/apache/hcatalog/listener/NotificationListener.java
Fri Jan 25 18:15:19 2013
@@ -254,7 +254,6 @@ public class NotificationListener extend
      */
     protected void send(HCatEventMessage hCatEventMessage, String topicName) {
         try {
-            Destination topic = null;
             if(null == session){
                 // this will happen, if we never able to establish a connection.
                 createConnection();
@@ -265,17 +264,9 @@ public class NotificationListener extend
                     return;
                 }
             }
-            try{
-                // Topics are created on demand. If it doesn't exist on broker it will
-                // be created when broker receives this message.
-                topic = session.createTopic(topicName);
-            } catch (IllegalStateException ise){
-                // this will happen if we were able to establish connection once, but its
no longer valid,
-                // ise is thrown, catch it and retry.
-                LOG.error("Seems like connection is lost. Retrying", ise);
-                createConnection();
-                topic = session.createTopic(topicName);
-            }
+
+            Destination topic = getTopic(topicName);
+
             if (null == topic){
                 // Still not successful, return from here.
                 LOG.error("Invalid session. Failed to send message on topic: " +



Mime
View raw message