[ https://issues.apache.org/jira/browse/HIVE-2224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13066168#comment-13066168 ]
jirapos...@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