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

Mithun Radhakrishnan commented on HIVE-9609:
--------------------------------------------

Sorry for the delay. I'm going to need a little more time to study the second 
patch. I'd like to get my head around

But on first glance, I appreciate how streamlined {{AddPartitionEvent}}'s 
interface is now. I'm even more taken by {{Iterators}}.

Minor nitpicks:
1. Should we also change {{JSONMessageFactory.getPartitionKeyValues()}} to 
return {{Iterator<Map<String,String>>}}? Also, appropriately change 
{{JSONAddPartitionMessage}} constructor? Perhaps not a big deal, given that 
these are just names. But then again, perhaps every little counts?
2. Shall we split {{JSONAddPartitionMessage.partitions}} to include only 
part-values, and avoid the repetition of partition-key-names.
3. JSONMessageFactory.java imports "java.util.*". That's likely my 
(code-editor's) doing. Could I please bother you to fix that?

I'd like to do a similar change for DropPartitionEvent/Message. I'll raise a 
JIRA shortly.

> 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