saihemanth-cloudera commented on code in PR #4820:
URL: https://github.com/apache/hive/pull/4820#discussion_r1421095680


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java:
##########
@@ -908,23 +909,22 @@ public List<Partition> alterPartitions(final RawStore 
msdb, Warehouse wh, final
       }
 
       msdb.alterPartitions(catName, dbname, name, partValsList, new_parts, 
writeId, writeIdList);
-      Iterator<Partition> oldPartsIt = oldParts.iterator();
-      for (Partition newPart : new_parts) {
-        Partition oldPart;
-        if (oldPartsIt.hasNext()) {
-          oldPart = oldPartsIt.next();
-        } else {
-          throw new InvalidOperationException("Missing old partition 
corresponding to new partition " +
-              "when invoking MetaStoreEventListener for alterPartitions 
event.");
-        }
 
-        if (transactionalListeners != null && 
!transactionalListeners.isEmpty()) {
-          MetaStoreListenerNotifier.notifyEvent(transactionalListeners, 
EventMessage.EventType.ALTER_PARTITION,
-              new AlterPartitionEvent(oldPart, newPart, tbl, false, true, 
newPart.getWriteId(), handler),
-              environmentContext);
+      if (transactionalListeners != null && !transactionalListeners.isEmpty()) 
{
+        boolean shouldSingleEvent = MetastoreConf.getBoolVar(handler.getConf(),

Review Comment:
   Nit: 'shouldSendSingleEvent'



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to