hive-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From khorg...@apache.org
Subject svn commit: r1672129 - /hive/trunk/hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java
Date Wed, 08 Apr 2015 17:46:00 GMT
Author: khorgath
Date: Wed Apr  8 17:45:59 2015
New Revision: 1672129

URL: http://svn.apache.org/r1672129
Log:
HIVE-9679 : Remove redundant null-checks from DbNotificationListener (Mithun Radhakrishnan
via Sushanth Sowmyan)

Modified:
    hive/trunk/hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java

Modified: hive/trunk/hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java
URL: http://svn.apache.org/viewvc/hive/trunk/hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java?rev=1672129&r1=1672128&r2=1672129&view=diff
==============================================================================
--- hive/trunk/hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java
(original)
+++ hive/trunk/hcatalog/server-extensions/src/main/java/org/apache/hive/hcatalog/listener/DbNotificationListener.java
Wed Apr  8 17:45:59 2015
@@ -29,7 +29,6 @@ import org.apache.hadoop.hive.metastore.
 import org.apache.hadoop.hive.metastore.api.NotificationEvent;
 import org.apache.hadoop.hive.metastore.api.Partition;
 import org.apache.hadoop.hive.metastore.api.Table;
-import org.apache.hadoop.hive.metastore.api.hive_metastoreConstants;
 import org.apache.hadoop.hive.metastore.events.AddPartitionEvent;
 import org.apache.hadoop.hive.metastore.events.AlterPartitionEvent;
 import org.apache.hadoop.hive.metastore.events.AlterTableEvent;
@@ -146,11 +145,9 @@ public class DbNotificationListener exte
     NotificationEvent event = new NotificationEvent(0, now(),
         HCatConstants.HCAT_ALTER_TABLE_EVENT,
         msgFactory.buildAlterTableMessage(before, after).toString());
-    if (event != null) {
-      event.setDbName(after.getDbName());
-      event.setTableName(after.getTableName());
-      enqueue(event);
-    }
+    event.setDbName(after.getDbName());
+    event.setTableName(after.getTableName());
+    enqueue(event);
   }
 
   /**
@@ -192,11 +189,9 @@ public class DbNotificationListener exte
     NotificationEvent event = new NotificationEvent(0, now(),
         HCatConstants.HCAT_ALTER_PARTITION_EVENT,
         msgFactory.buildAlterPartitionMessage(before, after).toString());
-    if (event != null) {
-      event.setDbName(before.getDbName());
-      event.setTableName(before.getTableName());
-      enqueue(event);
-    }
+    event.setDbName(before.getDbName());
+    event.setTableName(before.getTableName());
+    enqueue(event);
   }
 
   /**



Mime
View raw message