hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "jiraposter@reviews.apache.org (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HIVE-2038) Metastore listener
Date Tue, 12 Apr 2011 15:47:05 GMT

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

jiraposter@reviews.apache.org commented on HIVE-2038:
-----------------------------------------------------



bq.  On 2011-04-12 03:07:54, Carl Steinbach wrote:
bq.  > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java, line
999
bq.  > <https://reviews.apache.org/r/581/diff/1/?file=15625#file15625line999>
bq.  >
bq.  >     Unrelated bugfix?

Related bugfix, I will say : ) Without it, when drop partition returns from object store,
partition object doesn't contain partition values. 


bq.  On 2011-04-12 03:07:54, Carl Steinbach wrote:
bq.  > trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java, line 180
bq.  > <https://reviews.apache.org/r/581/diff/1/?file=15621#file15621line180>
bq.  >
bq.  >     Please add this property to hive-default.xml along with a description of what
it does.
bq.  >

Will add it in hive-default.xml.


bq.  On 2011-04-12 03:07:54, Carl Steinbach wrote:
bq.  > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, line
955
bq.  > <https://reviews.apache.org/r/581/diff/1/?file=15622#file15622line955>
bq.  >
bq.  >     Please run checkstyle and correct any violations included in your patch.

Will run checkstyle to check for any style violations.


bq.  On 2011-04-12 03:07:54, Carl Steinbach wrote:
bq.  > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreListener.java,
line 27
bq.  > <https://reviews.apache.org/r/581/diff/1/?file=15623#file15623line27>
bq.  >
bq.  >     Please add some javadoc explaining the intended use of this interface. 
bq.  >     
bq.  >     * Are the methods called before or after an action completes? What happens if
a metastore operation fails?
bq.  >     
bq.  >     * Are the methods allowed to block? Are they run in a separate thread?
bq.  >     
bq.  >     * Are the methods allowed to modify the catalog objects that are passed in as
parameters?

Will also add in javadoc.
 
 * Methods are called after action completes. Only if action succeeds. They are not called
if operation fails since in that case nothing has actually changed in metastore.

 * This is upto implementation. They can run in same thread, or they can schedule there work
in separate thread and return immediately. 

 * I don't see a reason to disallow modification of passed in parameter objects. But, its
mostly irrelevant here since methods are called after change has already been persisted on
metastore. So, modifying these objects can't change any state on metastore. 


bq.  On 2011-04-12 03:07:54, Carl Steinbach wrote:
bq.  > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreListener.java,
line 29
bq.  > <https://reviews.apache.org/r/581/diff/1/?file=15623#file15623line29>
bq.  >
bq.  >     Instead of passing in raw Table/Partition/Database objects it may be better
to instead wrap these objects in containers, e.g. CreateTableEvent, DropTableEvent, etc. Eventually
this interface will probably include onAlterTable() and onAlterPartition(), and programmers
will probably want to access both the before and after versions of a Table/Partition, etc.

Whats the advantage of wrapper container objects?


bq.  On 2011-04-12 03:07:54, Carl Steinbach wrote:
bq.  > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, line
1446
bq.  > <https://reviews.apache.org/r/581/diff/1/?file=15622#file15622line1446>
bq.  >
bq.  >     No need to reference "this", right?

Right. Though, I think using "this" in such cases improves code readability. 


bq.  On 2011-04-12 03:07:54, Carl Steinbach wrote:
bq.  > trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreListener.java,
line 26
bq.  > <https://reviews.apache.org/r/581/diff/1/?file=15623#file15623line26>
bq.  >
bq.  >     What do you think about changing the name to MetaStoreEventListener or CatalogEventListener?

MetaStoreEventListener is fine too.


- Ashutosh


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


On 2011-04-12 01:29:41, Ashutosh Chauhan wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/581/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-04-12 01:29:41)
bq.  
bq.  
bq.  Review request for hive, Carl Steinbach, John Sichi, and Paul Yang.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  Review request for HIVE-2038
bq.  
bq.  
bq.  This addresses bug HIVE-2038.
bq.      https://issues.apache.org/jira/browse/HIVE-2038
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    trunk/common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 1079575 
bq.    trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1079575

bq.    trunk/metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreListener.java PRE-CREATION

bq.    trunk/metastore/src/java/org/apache/hadoop/hive/metastore/NoOpListener.java PRE-CREATION

bq.    trunk/metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java 1079575

bq.    trunk/metastore/src/test/org/apache/hadoop/hive/metastore/DummyListener.java PRE-CREATION

bq.    trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestMetaStoreListener.java
PRE-CREATION 
bq.  
bq.  Diff: https://reviews.apache.org/r/581/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Unit test with dummy listener included. Also tested with an alternate listener which
sends a message on a message bus.
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Ashutosh
bq.  
bq.



> Metastore listener
> ------------------
>
>                 Key: HIVE-2038
>                 URL: https://issues.apache.org/jira/browse/HIVE-2038
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Ashutosh Chauhan
>            Assignee: Ashutosh Chauhan
>             Fix For: 0.8.0
>
>         Attachments: hive-2038.patch, metastore_listener.patch, metastore_listener.patch,
metastore_listener.patch
>
>
> Provide to way to observe changes happening on Metastore

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

Mime
View raw message