You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hive.apache.org by "Sushanth Sowmyan (JIRA)" <ji...@apache.org> on 2011/06/16 00:12:47 UTC

[jira] [Created] (HIVE-2224) Ability to add_partitions atomically

Ability to add_partitions atomically
------------------------------------

                 Key: HIVE-2224
                 URL: https://issues.apache.org/jira/browse/HIVE-2224
             Project: Hive
          Issue Type: Improvement
          Components: Metastore
            Reporter: Sushanth Sowmyan


I'd like to see an atomic version of the add_partitions() call.

Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.

This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)

Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056693#comment-13056693 ] 

Sushanth Sowmyan commented on HIVE-2224:
----------------------------------------

I've added on a patch which simply modifies add_partitions behaviour to be atomic. Given that I see no occurrence of add_partitions() being currently called in the project, I expect this to be okay?

I also want to potentially add a add_partitions() call to MetaStoreClient interface so as to allow calling of this function.(Not sure if I should do that as a separate jira or extend this one?)

> Ability to add_partitions atomically
> ------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Updated] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sushanth Sowmyan updated HIVE-2224:
-----------------------------------

    Summary: Ability to add_partitions, and atomically  (was: Ability to add_partitions atomically)

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067855#comment-13067855 ] 

Sushanth Sowmyan commented on HIVE-2224:
----------------------------------------

Any further luck with the tests, Paul?

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Paul Yang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065625#comment-13065625 ] 

Paul Yang commented on HIVE-2224:
---------------------------------

+1 Will test and commit

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061660#comment-13061660 ] 

Sushanth Sowmyan commented on HIVE-2224:
----------------------------------------

Thanks, done, will take note to do so in the future. :)

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Updated] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sushanth Sowmyan updated HIVE-2224:
-----------------------------------

    Status: Patch Available  (was: Open)

Attached HIVE-2224.patch, created reviewboard entry for review.

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add partitions atomically

Posted by "Hudson (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068746#comment-13068746 ] 

Hudson commented on HIVE-2224:
------------------------------

Integrated in Hive-trunk-h0.21 #837 (See [https://builds.apache.org/job/Hive-trunk-h0.21/837/])
    HIVE-2224. Ability to add partitions atomically (Sushanth Sowmyan via pauly)

pauly : http://svn.apache.org/viewcvs.cgi/?root=Apache-SVN&view=rev&rev=1148878
Files : 
* /hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java
* /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp
* /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java
* /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h
* /hive/trunk/metastore/if/hive_metastore.thrift
* /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote
* /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java
* /hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp
* /hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py
* /hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php
* /hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java
* /hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
* /hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb


> Ability to add partitions atomically
> ------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>             Fix For: 0.8.0
>
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Paul Yang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13067209#comment-13067209 ] 

Paul Yang commented on HIVE-2224:
---------------------------------

Sorry for the delay, but I've running into some test issues that are likely not caused by your patch.

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066168#comment-13066168 ] 

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



bq.  On 2011-07-14 23:39:58, Paul Yang wrote:
bq.  > http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java, lines 1469-1471
bq.  > <https://reviews.apache.org/r/999/diff/1/?file=21960#file21960line1469>
bq.  >
bq.  >     This part is a little unusual, as Entry objects are mostly used during iteration

The reason for that was to return a Pair and not have to add on an implementation for a Pair, or to have a custom Object definition for that - do you have a preference in how else to do that?


- Sushanth


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


On 2011-07-07 23:20:22, Sushanth Sowmyan wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/999/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-07-07 23:20:22)
bq.  
bq.  
bq.  Review request for hive.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  As per HIVE-2224 ( https://issues.apache.org/jira/browse/HIVE-2224 ), this patch does the following:
bq.  
bq.  + Exposing add_partitions() from the thrift metastore api
bq.  + Making add_partitions() atomic
bq.  
bq.  
bq.  This addresses bug HIVE-2224.
bq.      https://issues.apache.org/jira/browse/HIVE-2224
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/if/hive_metastore.thrift 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1142116 
bq.  
bq.  Diff: https://reviews.apache.org/r/999/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Modified TestHiveMetaStore.partitionTester() to add tests for the following scenarios:
bq.  
bq.  + add_partition(empty list) : no exceptions thrown : works
bq.  + add_partitions(list containing 3 partitions) : works, verified that partitions exist
bq.  + add_partitions(list containing 2 partitions, where one of them has keyvalues identical to original partition, and another partition has a directory already created, verified that the call causes an exception, and directories are unchanged(the one with the dir pre-existing continues to exist), and no additional partition was published.
bq.  + add_partitions(list with a single partition) : works, does not fault on duplicate as a result of a partial publish above.
bq.  + verified that all above created partitions exist : works
bq.  
bq.  All of the above is called from both TestEmbeddedHiveMetaStore and TestRemoteHiveMetaStore
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sushanth
bq.  
bq.



> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Updated] (HIVE-2224) Ability to add partitions atomically

Posted by "Paul Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Yang updated HIVE-2224:
----------------------------

       Resolution: Fixed
    Fix Version/s: 0.8.0
           Status: Resolved  (was: Patch Available)

> Ability to add partitions atomically
> ------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>             Fix For: 0.8.0
>
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Updated] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sushanth Sowmyan updated HIVE-2224:
-----------------------------------

    Attachment:     (was: HIVE-2224.patch)

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Assigned] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sushanth Sowmyan reassigned HIVE-2224:
--------------------------------------

    Assignee: Sushanth Sowmyan

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add partitions atomically

Posted by "Paul Yang (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068536#comment-13068536 ] 

Paul Yang commented on HIVE-2224:
---------------------------------

Seems like it was an issue with the machine. But it has been committed - thanks Sushanth!

> Ability to add partitions atomically
> ------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061472#comment-13061472 ] 

John Sichi commented on HIVE-2224:
----------------------------------

Sushanth, please fill in the "Bugs" field to make the link.

https://reviews.apache.org/r/999/

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "John Sichi (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061471#comment-13061471 ] 

John Sichi commented on HIVE-2224:
----------------------------------

When you create the review board entry, be sure to specify the JIRA issue number so that it will populate the comments here with links and other info.

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13061661#comment-13061661 ] 

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


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

(Updated 2011-07-07 23:20:22.001216)


Review request for hive.


Summary
-------

As per HIVE-2224 ( https://issues.apache.org/jira/browse/HIVE-2224 ), this patch does the following:

+ Exposing add_partitions() from the thrift metastore api
+ Making add_partitions() atomic


This addresses bug HIVE-2224.
    https://issues.apache.org/jira/browse/HIVE-2224


Diffs
-----

  http://svn.apache.org/repos/asf/hive/trunk/metastore/if/hive_metastore.thrift 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java 1142116 
  http://svn.apache.org/repos/asf/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1142116 

Diff: https://reviews.apache.org/r/999/diff


Testing
-------

Modified TestHiveMetaStore.partitionTester() to add tests for the following scenarios:

+ add_partition(empty list) : no exceptions thrown : works
+ add_partitions(list containing 3 partitions) : works, verified that partitions exist
+ add_partitions(list containing 2 partitions, where one of them has keyvalues identical to original partition, and another partition has a directory already created, verified that the call causes an exception, and directories are unchanged(the one with the dir pre-existing continues to exist), and no additional partition was published.
+ add_partitions(list with a single partition) : works, does not fault on duplicate as a result of a partial publish above.
+ verified that all above created partitions exist : works

All of the above is called from both TestEmbeddedHiveMetaStore and TestRemoteHiveMetaStore


Thanks,

Sushanth



> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Updated] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sushanth Sowmyan updated HIVE-2224:
-----------------------------------

    Attachment: HIVE-2224.patch

Attaching patch that enables atomic add_partitions() operation, and also exposes add_partitions via the thrift api.

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13056916#comment-13056916 ] 

Sushanth Sowmyan commented on HIVE-2224:
----------------------------------------

(Updated title to reflect want to expose the add_partitions() call itself to the interface)

> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Updated] (HIVE-2224) Ability to add partitions atomically

Posted by "Paul Yang (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Paul Yang updated HIVE-2224:
----------------------------

    Summary: Ability to add partitions atomically  (was: Ability to add_partitions, and atomically)

> Ability to add partitions atomically
> ------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add partitions atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13068629#comment-13068629 ] 

Sushanth Sowmyan commented on HIVE-2224:
----------------------------------------

Thanks!

> Ability to add partitions atomically
> ------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>             Fix For: 0.8.0
>
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Commented] (HIVE-2224) Ability to add_partitions, and atomically

Posted by "jiraposter@reviews.apache.org (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13065610#comment-13065610 ] 

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


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



http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java
<https://reviews.apache.org/r/999/#comment2160>

    This part is a little unusual, as Entry objects are mostly used during iteration


- Paul


On 2011-07-07 23:20:22, Sushanth Sowmyan wrote:
bq.  
bq.  -----------------------------------------------------------
bq.  This is an automatically generated e-mail. To reply, visit:
bq.  https://reviews.apache.org/r/999/
bq.  -----------------------------------------------------------
bq.  
bq.  (Updated 2011-07-07 23:20:22)
bq.  
bq.  
bq.  Review request for hive.
bq.  
bq.  
bq.  Summary
bq.  -------
bq.  
bq.  As per HIVE-2224 ( https://issues.apache.org/jira/browse/HIVE-2224 ), this patch does the following:
bq.  
bq.  + Exposing add_partitions() from the thrift metastore api
bq.  + Making add_partitions() atomic
bq.  
bq.  
bq.  This addresses bug HIVE-2224.
bq.      https://issues.apache.org/jira/browse/HIVE-2224
bq.  
bq.  
bq.  Diffs
bq.  -----
bq.  
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/if/hive_metastore.thrift 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.h 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore.cpp 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-cpp/ThriftHiveMetastore_server.skeleton.cpp 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-javabean/org/apache/hadoop/hive/metastore/api/ThriftHiveMetastore.java 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-php/hive_metastore/ThriftHiveMetastore.php 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore-remote 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-py/hive_metastore/ThriftHiveMetastore.py 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/gen/thrift/gen-rb/thrift_hive_metastore.rb 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStore.java 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/HiveMetaStoreClient.java 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/java/org/apache/hadoop/hive/metastore/IMetaStoreClient.java 1142116 
bq.    http://svn.apache.org/repos/asf/hive/trunk/metastore/src/test/org/apache/hadoop/hive/metastore/TestHiveMetaStore.java 1142116 
bq.  
bq.  Diff: https://reviews.apache.org/r/999/diff
bq.  
bq.  
bq.  Testing
bq.  -------
bq.  
bq.  Modified TestHiveMetaStore.partitionTester() to add tests for the following scenarios:
bq.  
bq.  + add_partition(empty list) : no exceptions thrown : works
bq.  + add_partitions(list containing 3 partitions) : works, verified that partitions exist
bq.  + add_partitions(list containing 2 partitions, where one of them has keyvalues identical to original partition, and another partition has a directory already created, verified that the call causes an exception, and directories are unchanged(the one with the dir pre-existing continues to exist), and no additional partition was published.
bq.  + add_partitions(list with a single partition) : works, does not fault on duplicate as a result of a partial publish above.
bq.  + verified that all above created partitions exist : works
bq.  
bq.  All of the above is called from both TestEmbeddedHiveMetaStore and TestRemoteHiveMetaStore
bq.  
bq.  
bq.  Thanks,
bq.  
bq.  Sushanth
bq.  
bq.



> Ability to add_partitions, and atomically
> -----------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>            Assignee: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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

        

[jira] [Updated] (HIVE-2224) Ability to add_partitions atomically

Posted by "Sushanth Sowmyan (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Sushanth Sowmyan updated HIVE-2224:
-----------------------------------

    Attachment: HIVE-2224.patch

Attaching proposed patch.

> Ability to add_partitions atomically
> ------------------------------------
>
>                 Key: HIVE-2224
>                 URL: https://issues.apache.org/jira/browse/HIVE-2224
>             Project: Hive
>          Issue Type: Improvement
>          Components: Metastore
>            Reporter: Sushanth Sowmyan
>         Attachments: HIVE-2224.patch
>
>
> I'd like to see an atomic version of the add_partitions() call.
> Whether this is to be done by config to affect add_partitions() behaviour (not my preference) or just changing add_partitions() default behaviour (my preference, but likely to affect current behaviour, so will need others' input) or by making a new add_partitions_atomic() call depends on discussion.
> This looks relatively doable to implement (will need a dependent add_partition_core to not do a ms.commit_partition() early, and to cache list of directories created to remove on rollback, and a list of AddPartitionEvent to trigger in one shot later)
> Thoughts? This also seems like something to implement for allowing HIVE-1805.

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