[ 
https://issues.apache.org/jira/browse/HIVE-9609?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14313359#comment-14313359
 ] 

Sushanth Sowmyan commented on HIVE-9609:
----------------------------------------

Oh, one more thing. Changing HiveMetaStore.fireMetaStoreAddPartitionEvent() to 
eschew List<Partition> does not help us, unless we remove add_partitions 
itself, since we were sent in the List<Partition> already, and that is a call 
on which we should not break backward compatibility.

I'm retaining AddPartitionEvent as effectively a union of 
List<Partition>/PartitionSpec as it currently stands - but I am changing it so 
that the "one true way" of accessing AddPartitionEvent is through 
getPartitionIterator, which works correctly for both cases. In addition, I'm 
outright removing the getPartitions() method that was there earlier and forcing 
use of the iterator, since that will not cause a PSpec-based add partitions to 
fail when the event is processed.

> AddPartitionMessage.getPartitions() can return null
> ---------------------------------------------------
>
>                 Key: HIVE-9609
>                 URL: https://issues.apache.org/jira/browse/HIVE-9609
>             Project: Hive
>          Issue Type: Bug
>    Affects Versions: 1.2.0
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-9609.2.patch, HIVE-9609.patch
>
>
> DbNotificationListener and NotificationListener both depend on 
> AddPartitionEvent.getPartitions() to get their partitions to trigger a 
> message, but this can be null if an AddPartitionEvent was initialized on a 
> PartitionSpec rather than a List<Partition>.
> Also, AddPartitionEvent seems to have a duality, where getPartitions() works 
> only if instantiated on a List<Partition>, and getPartitionIterator() works 
> only if instantiated on a PartitionSpec.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to