Na Li commented on HIVE-18942:

[~kkalyan] The event type is "EventMessage.EventType.ADD_PARTITION", not 
"EventType.ALTER_TABLE". It puts all partitions in the event.
In DbNotificationListener

public void onAddPartition (AddPartitionEvent partitionEvent)
throws MetaException {
Table t = partitionEvent.getTable();
NotificationEvent event = new NotificationEvent(0, now(),
enqueue(event, partitionEvent);


> ALTER TABLE may generate huge event (with all partitions)
> ---------------------------------------------------------
>                 Key: HIVE-18942
>                 URL: https://issues.apache.org/jira/browse/HIVE-18942
>             Project: Hive
>          Issue Type: Bug
>          Components: Metastore
>    Affects Versions: 3.0.0
>            Reporter: Alexander Kolbasov
>            Priority: Major
> ALTER TABLE handler in HiveAlterHandler has this code:
> {code:java}
> if (isPartitionedTable) {
>   parts = msdb.getPartitions(newt.getDbName(), newt.getTableName(), -1);
>   MetaStoreListenerNotifier.notifyEvent(transactionalListeners,
>           EventMessage.EventType.ADD_PARTITION,
>           new AddPartitionEvent(newt, parts, true, handler),
>           environmentContext);
> }{code}
> The problem is that table may contain huge number of partitions and the event 
> will contain all of them. Partition object itself isn't very small either, so 
> we may end up with huge events which would be stored and then transmitted 
> over the wire to consumers.
> [~spena] [~kkalyan] [~lina.li] [~vaidyand] FYI.

This message was sent by Atlassian JIRA

Reply via email to