Repository: atlas
Updated Branches:
  refs/heads/branch-0.8 9e33e5b0a -> 356160505


ATLAS-2192: notification consumer updates to handle stale split messages (#2)

(cherry picked from commit 6a18b5c65257a7905b4a50612e9e2c8978bfaa6d)


Project: http://git-wip-us.apache.org/repos/asf/atlas/repo
Commit: http://git-wip-us.apache.org/repos/asf/atlas/commit/35616050
Tree: http://git-wip-us.apache.org/repos/asf/atlas/tree/35616050
Diff: http://git-wip-us.apache.org/repos/asf/atlas/diff/35616050

Branch: refs/heads/branch-0.8
Commit: 356160505a73fed726611ee8285128cefff6fe6b
Parents: 9e33e5b
Author: Madhan Neethiraj <[email protected]>
Authored: Sat Oct 7 09:28:51 2017 -0700
Committer: Madhan Neethiraj <[email protected]>
Committed: Sat Oct 7 09:34:09 2017 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/atlas/hook/AtlasHook.java   | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/atlas/blob/35616050/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
----------------------------------------------------------------------
diff --git a/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java 
b/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
index 4829221..38f3208 100644
--- a/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
+++ b/notification/src/main/java/org/apache/atlas/hook/AtlasHook.java
@@ -85,7 +85,16 @@ public abstract class AtlasHook {
 
         notificationRetryInterval = 
atlasProperties.getInt(ATLAS_NOTIFICATION_RETRY_INTERVAL, 1000);
         notificationInterface = NotificationProvider.get();
-        notificationInterface.setCurrentUser(getUser());
+
+        String currentUser = "";
+
+        try {
+            currentUser = getUser();
+        } catch (Exception excp) {
+            LOG.warn("Error in determining current user", excp);
+        }
+
+        notificationInterface.setCurrentUser(currentUser);
 
         LOG.info("Created Atlas Hook");
     }

Reply via email to