saihemanth-cloudera commented on code in PR #4820:
URL: https://github.com/apache/hive/pull/4820#discussion_r1384331395
##########
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:
Should we make this configurable? This is breaking interoperability.
Consumers of the notification log should update their code to consume this new
event. If it is configurable, older clients can process the ALTER_PARTITION
events and whenever they are ready to consume newer event ALTER_PARTITIONS,
then can flip the config.
--
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]