You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by su...@apache.org on 2016/12/07 17:27:22 UTC

incubator-atlas git commit: ATLAS-1351 HiveHook fails with NPE for hive process registration (vimalsharma via sumasai)

Repository: incubator-atlas
Updated Branches:
  refs/heads/master c91f582a7 -> 78c835edf


ATLAS-1351 HiveHook fails with NPE for hive process registration (vimalsharma via sumasai)


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

Branch: refs/heads/master
Commit: 78c835edf1597c7d0082790c248235f08fb8474a
Parents: c91f582
Author: Suma Shivaprasad <su...@gmail.com>
Authored: Wed Dec 7 09:27:07 2016 -0800
Committer: Suma Shivaprasad <su...@gmail.com>
Committed: Wed Dec 7 09:27:07 2016 -0800

----------------------------------------------------------------------
 .../src/main/java/org/apache/atlas/hive/hook/HiveHook.java   | 8 +++++++-
 release-log.txt                                              | 1 +
 2 files changed, 8 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/78c835ed/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
index 96a8139..91b97f1 100755
--- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
+++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/HiveHook.java
@@ -1087,7 +1087,13 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext {
     static final class EntityComparator implements Comparator<Entity> {
         @Override
         public int compare(Entity o1, Entity o2) {
-            return o1.getName().toLowerCase().compareTo(o2.getName().toLowerCase());
+            String s1 = o1.getName();
+            String s2 = o2.getName();
+            if (s1 == null || s2 == null){
+                s1 = o1.getD().toString();
+                s2 = o2.getD().toString();
+            }
+            return s1.toLowerCase().compareTo(s2.toLowerCase());
         }
     }
 

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/78c835ed/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index ef3963b..c4d2a49 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -9,6 +9,7 @@ ATLAS-1060 Add composite indexes for exact match performance improvements for al
 ATLAS-1127 Modify creation and modification timestamps to Date instead of Long(sumasai)
 
 ALL CHANGES:
+ATLAS-1351 HiveHook fails with NPE for hive process registration (vimalsharma via sumasai)
 ATLAS-1342 Titan Solrclient - Add timeouts for zookeeper connect and session (sumasai)
 ATLAS-1353 Invalid error message(500 internal server error) for lineage query on non-existing table. (sumasai)
 ATLAS-1347 Creating a class with unknown supertype results in "409 Conflict", where as expected is "400 Bad Message" (apoorvnairk via sumasai)