atlas-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From mad...@apache.org
Subject [06/50] [abbrv] incubator-atlas git commit: ATLAS-1097 Fix a potential NPE issue flagged by Coverity scan (mneethiraj via shwethags)
Date Fri, 23 Dec 2016 01:46:35 GMT
ATLAS-1097 Fix a potential NPE issue flagged by Coverity scan (mneethiraj via shwethags)

(cherry picked from commit 89f25d411897dbd35a2baf7a96a0cf137c273f4a)


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

Branch: refs/heads/0.7-incubating
Commit: 8db872086dc02a5de393bf374d81fec552dd77af
Parents: 00afd32
Author: Shwetha GS <sshivalingamurthy@hortonworks.com>
Authored: Fri Aug 5 16:25:03 2016 +0530
Committer: Madhan Neethiraj <madhan@apache.org>
Committed: Thu Dec 22 14:48:30 2016 -0800

----------------------------------------------------------------------
 .../main/java/org/apache/atlas/hive/hook/HiveHook.java  | 12 ++++++++----
 release-log.txt                                         |  1 +
 2 files changed, 9 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/8db87208/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 7905bcf..14359c5 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
@@ -773,10 +773,14 @@ public class HiveHook extends AtlasHook implements ExecuteWithHookContext
{
                                           SortedMap<WriteEntity, Referenceable> hiveOutputsMap)
throws HiveException {
         HiveOperation op = eventContext.getOperation();
         if (isCreateOp(eventContext)) {
-            Table outTable = getEntityByType(sortedHiveOutputs, Type.TABLE).getTable();
-            //refresh table
-            outTable = dgiBridge.hiveClient.getTable(outTable.getDbName(), outTable.getTableName());
-            return HiveMetaStoreBridge.getTableProcessQualifiedName(dgiBridge.getClusterName(),
outTable);
+            Entity entity = getEntityByType(sortedHiveOutputs, Type.TABLE);
+
+            if (entity != null) {
+                Table outTable = entity.getTable();
+                //refresh table
+                outTable = dgiBridge.hiveClient.getTable(outTable.getDbName(), outTable.getTableName());
+                return HiveMetaStoreBridge.getTableProcessQualifiedName(dgiBridge.getClusterName(),
outTable);
+            }
         }
 
         StringBuilder buffer = new StringBuilder(op.getOperationName());

http://git-wip-us.apache.org/repos/asf/incubator-atlas/blob/8db87208/release-log.txt
----------------------------------------------------------------------
diff --git a/release-log.txt b/release-log.txt
index 1091ede..8e0ee38 100644
--- a/release-log.txt
+++ b/release-log.txt
@@ -27,6 +27,7 @@ ATLAS-409 Atlas will not import avro tables with schema read from a file
(dosset
 ATLAS-379 Create sqoop and falcon metadata addons (venkatnrangan,bvellanki,sowmyaramesh via
shwethags)
 
 ALL CHANGES:
+ATLAS-1097 Fix a potential NPE issue flagged by Coverity scan (mneethiraj via shwethags)
 ATLAS-1090 UI: Multi-Select Tagging. (Kalyanikashikar via kevalbhatt)
 ATLAS-1092 Add Table.CreateTime to process qualified Name for all hive_process (sumasai via
shwethags)
 ATLAS-1096 Modify HveMetaStoreBridge.import to use getEntity instead of DSL (sumasai via
shwethags)


Mime
View raw message