You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@atlas.apache.org by si...@apache.org on 2021/06/03 17:32:00 UTC

[atlas] branch branch-2.0 updated: ATLAS-4322: Hive HOOK NPE

This is an automated email from the ASF dual-hosted git repository.

sidmishra pushed a commit to branch branch-2.0
in repository https://gitbox.apache.org/repos/asf/atlas.git


The following commit(s) were added to refs/heads/branch-2.0 by this push:
     new a2a1e3b  ATLAS-4322: Hive HOOK NPE
a2a1e3b is described below

commit a2a1e3b5d23ff5db45fbf7f5a28976ea465d9c46
Author: JP Li <jp...@8634.local>
AuthorDate: Tue Jun 1 16:31:51 2021 -0700

    ATLAS-4322: Hive HOOK NPE
    
    Signed-off-by: sidmishra <si...@apache.org>
    (cherry picked from commit ff0c65a49fb4617b85a5b8a674be53305f5cf64b)
---
 .../java/org/apache/atlas/hive/hook/events/AlterTableRenameCol.java | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRenameCol.java b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRenameCol.java
index 756a608..29ca920 100644
--- a/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRenameCol.java
+++ b/addons/hive-bridge/src/main/java/org/apache/atlas/hive/hook/events/AlterTableRenameCol.java
@@ -69,7 +69,6 @@ public class AlterTableRenameCol extends AlterTable {
 
     public List<HookNotification> getHiveMessages() throws Exception {
         List<HookNotification> baseMsgs = super.getNotificationMessages();
-        List<HookNotification> ret      = new ArrayList<>(baseMsgs);
 
         if (CollectionUtils.isEmpty(getInputs())) {
             LOG.error("AlterTableRenameCol: old-table not found in inputs list");
@@ -89,8 +88,9 @@ public class AlterTableRenameCol extends AlterTable {
             return null;
         }
 
-        Table oldTable = getInputs().iterator().next().getTable();
-        Table newTable = getOutputs().iterator().next().getTable();
+        List<HookNotification> ret      = new ArrayList<>(baseMsgs);
+        Table                  oldTable = getInputs().iterator().next().getTable();
+        Table                  newTable = getOutputs().iterator().next().getTable();
 
         if (newTable != null) {
             newTable = getHive().getTable(newTable.getDbName(), newTable.getTableName());