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:31:23 UTC

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

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

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


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

commit ff0c65a49fb4617b85a5b8a674be53305f5cf64b
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>
---
 .../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());