dengzhhu653 commented on code in PR #4820:
URL: https://github.com/apache/hive/pull/4820#discussion_r1384573860


##########
standalone-metastore/metastore-server/src/main/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java:
##########
@@ -908,23 +909,12 @@ 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()) 
{
+        MetaStoreListenerNotifier.notifyEvent(transactionalListeners, 
EventMessage.EventType.ALTER_PARTITIONS,

Review Comment:
   A new property "hive.metastore.alterPartitions.notification.v2.enabled" to 
address the breaking changes, we may need to recycle this property in the future



-- 
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