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

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

Mithun, per your previous comments:

a) Making a change to JSONMessageFactory.getPartitionKeyValues() to Iterator 
semantics is more work than I thought initially, because it requires quite a 
bit of testing if we change the AddPartitionMessage also to use an Iterator 
instead of a List, since we're using automatic JSON generation in the 
JSONAddPartitionMessage, and that can handle Lists properly, but with 
Iterators, it might require more testing. If that does not itself change, then 
changing this signature from List to Iterator gains us nothing. It's definitely 
worth experimenting, and I will try to take another stab at it later. Also, if 
we're converting from Iterator to List at some point, Lists.newArrayList is 
supposed to be a pretty low-cost way of doing that.
b) Splitting JSONAddPartitionMessage.partitions, equally, is a lot more 
complex. Again, for a future jira.
c) Changing java.util.* - fixed. It was there from earlier, but good catch on 
it. It's better to remove these where we find it.

In addition, there are some new tests that need fixing, I've fixed those.

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