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/07/25 21:24:37 UTC

incubator-atlas git commit: ATLAS-1052 Fix NPE in HiveHook due to null Session State (sumasai)

Repository: incubator-atlas
Updated Branches:
  refs/heads/master 46ec799cc -> 56e97e225


ATLAS-1052 Fix NPE in HiveHook due to null Session State (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/56e97e22
Tree: http://git-wip-us.apache.org/repos/asf/incubator-atlas/tree/56e97e22
Diff: http://git-wip-us.apache.org/repos/asf/incubator-atlas/diff/56e97e22

Branch: refs/heads/master
Commit: 56e97e225e65b50d15e6f59211f796788dd97446
Parents: 46ec799
Author: Suma Shivaprasad <su...@gmail.com>
Authored: Mon Jul 25 14:24:26 2016 -0700
Committer: Suma Shivaprasad <su...@gmail.com>
Committed: Mon Jul 25 14:24:26 2016 -0700

----------------------------------------------------------------------
 .../java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java     | 2 +-
 release-log.txt                                                    | 1 +
 2 files changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/56e97e22/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
----------------------------------------------------------------------
diff --git a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
index 3d3aef2..fcc45ab 100755
--- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
+++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/bridge/HiveMetaStoreBridge.java
@@ -362,7 +362,7 @@ public class HiveMetaStoreBridge {
     public static String getTableQualifiedName(String clusterName, String dbName, String tableName, boolean isTemporaryTable) {
         String tableTempName = tableName;
         if (isTemporaryTable) {
-            if (SessionState.get().getSessionId() != null) {
+            if (SessionState.get() != null && SessionState.get().getSessionId() != null) {
                 tableTempName = tableName + TEMP_TABLE_PREFIX + SessionState.get().getSessionId();
             } else {
                 tableTempName = tableName + TEMP_TABLE_PREFIX + RandomStringUtils.random(10);

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/56e97e22/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index c5e23f1..334a1c5 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -6,6 +6,7 @@ INCOMPATIBLE CHANGES:
 
 
 ALL CHANGES:
+ATLAS-1052 Fix NPE in HiveHook due to null Session State (sumasai)
 ATLAS-1051 Sqoop Hook does not package HDFS model jars which is required (sumasai)
 ATLAS-1049 List types by supertype (shwethags via sumasai)
 ATLAS-1032 Atlas hook package should not include libraries already present in host component - like log4j(mneethiraj via sumasai)