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

jirapos...@reviews.apache.org commented on HIVE-2194:
-----------------------------------------------------



bq.  On 2011-06-03 20:55:01, Carl Steinbach wrote:
bq.  > 
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java,
 line 54
bq.  > <https://reviews.apache.org/r/853/diff/1/?file=20442#file20442line54>
bq.  >
bq.  >     This method should either succeed or throw an exception. Since it 
already throws checked exceptions, adding a boolean return value makes things 
more complicated for the caller, and signals the same type of failure as an 
exception but without the ability to include information about what caused the 
failure. I think it would be better to modify the code so that an exception is 
always thrown when success==FALSE.
bq.  >     
bq.  >     This comment also applies to the various alterTable and 
alterPartition methods located in other classes.

Thanks for your feedback, Carl.  I understand your point about the return value 
of those functions.  Is throwing a MetaException in the case of failure 
appropriate?

Furthermore, I noticed that a few other RawStore operations return boolean 
values, such as dropDatabase, alterDatabase, dropTable, addPartition, etc.  The 
return value in each case corresponds to successfully committing the 
transaction.  Should we adopt a uniform interface across these functions?


- Sohan


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/853/#review758
-----------------------------------------------------------


On 2011-06-03 20:20:03, Sohan Jain wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/853/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-06-03 20:20:03)
bq.  
bq.  
bq.  Review request for hive and Paul Yang.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  HIVE-2038 introduced the MetaStoreEventListener abstract class that 
defines actions to be performed after particular events on a metastore. Improve 
upon that class by adding events to be performed on "alter table" and "alter 
partition" actions.  Also, update the hive metastore to call the appropriate 
functions of the listeners when the events happen.
bq.  
bq.  
bq.  This addresses bug HIVE-2194.
bq.      https://issues.apache.org/jira/browse/HIVE-2194
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/AlterHandler.java 
1130342 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveAlterHandler.java 
1130342 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 
1130342 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreEventListener.java
 1130342 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 
1130342 
bq.    trunk/metastore/src/java/org/apache/hadoop/hive/metastore/RawStore.java 
1130342 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/events/AlterPartitionEvent.java
 PRE-CREATION 
bq.    
trunk/metastore/src/java/org/apache/hadoop/hive/metastore/events/AlterTableEvent.java
 PRE-CREATION 
bq.    
trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyListener.java 
1130342 
bq.    
trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreEventListener.java
 1130342 
bq.  
bq.  Diff: https://reviews.apache.org/r/853/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Added test cases to TestMetaStoreEventListener.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sohan
bq.  
bq.



> Add actions for alter table and alter partition events for metastore event 
> listeners
> ------------------------------------------------------------------------------------
>
>                 Key: HIVE-2194
>                 URL: https://issues.apache.org/jira/browse/HIVE-2194
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sohan Jain
>            Assignee: Sohan Jain
>         Attachments: HIVE-2194.1.patch
>
>
> HIVE-2038 introduced the MetaStoreEventListener abstract class that defines 
> actions to be performed after particular events on a metastore.  Improve upon 
> that class by adding events to be performed on "alter table" and "alter 
> partition" actions.

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to