Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Threaded View
Hive, mail # dev - Review Request 14169: HIVE-3764: Support metastore version consistency check


Copy link to this message
-
Re: Review Request 14169: HIVE-3764: Support metastore version consistency check
Ashutosh Chauhan 2013-09-17, 20:38

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/14169/#review26182
-----------------------------------------------------------
Mostly looks good. Some comments.
metastore/scripts/upgrade/derby/hive-schema-0.12.0.derby.sql
<https://reviews.apache.org/r/14169/#comment51142>

    Name 'comment' has caused problems previously. I will suggest to name it VERSION_COMMENT, VCOMMENT or any other variation of it.

metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java
<https://reviews.apache.org/r/14169/#comment51143>

    Looks like this line can be removed.

metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java
<https://reviews.apache.org/r/14169/#comment51144>

    typo

metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java
<https://reviews.apache.org/r/14169/#comment51145>

    Can you name this variable version. I got confused thinking curVersion implies current version of jars (which was incorrect)

metastore/src/java/org/apache/hadoop/hive/metastore/MetaStoreSchemaInfo.java
<https://reviews.apache.org/r/14169/#comment51146>

    Will be good to do currVersion.trim() here.

metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
<https://reviews.apache.org/r/14169/#comment51147>

    Can you add a comment why we need to do a recheck? Seems like its not necessary.

metastore/src/java/org/apache/hadoop/hive/metastore/ObjectStore.java
<https://reviews.apache.org/r/14169/#comment51148>

    Should this be if(strictValidation && ... )
- Ashutosh Chauhan
On Sept. 17, 2013, 6:13 a.m., Prasad Mujumdar wrote:
>
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/14169/
> -----------------------------------------------------------
>
> (Updated Sept. 17, 2013, 6:13 a.m.)
>
>
> Review request for hive, Ashutosh Chauhan and Brock Noland.
>
>
> Bugs: HIVE-3764
>     https://issues.apache.org/jira/browse/HIVE-3764
>
>
> Repository: hive-git
>
>
> Description
> -------
>
> This is a 0.12 specific patch. The trunk patch will include additional metastore scripts which I will attach separately to the ticket.
>
> - Added a new table in the metastore schema to store the Hive version in the metastore.
> - Metastore handler compare the version stored in the schema with its own version. If there's a mismatch, then it can either record the correct version or raise error. The behavior is configurable via a new Hive config. This config when set, also restrict dataNucleus to auto upgrade the schema.
> - The new schema creation and upgrade scripts record the new version in the metastore version table.
> - Added 0.12 upgrade scripts for all supported DBs to creates the new table version tables in 0.12 metastore schema
>
> The current patch has the verification turned off by default. I would prefer to keep it enabled, though it require any add-hoc setup to explicitly disable it (or create the metastore schema by running scripts). The default can be changed or left as is as per the consensus.
>
>
> Diffs
> -----
>
>   common/src/java/org/apache/hadoop/hive/conf/HiveConf.java 22149e4
>   conf/hive-default.xml.template 9a3fc1d
>   metastore/scripts/upgrade/derby/014-HIVE-3764.derby.sql PRE-CREATION
>   metastore/scripts/upgrade/derby/hive-schema-0.12.0.derby.sql cce544f
>   metastore/scripts/upgrade/derby/upgrade-0.10.0-to-0.11.0.derby.sql cae7936
>   metastore/scripts/upgrade/derby/upgrade-0.11.0-to-0.12.0.derby.sql 492cc93
>   metastore/scripts/upgrade/derby/upgrade.order.derby PRE-CREATION
>   metastore/scripts/upgrade/mysql/014-HIVE-3764.mysql.sql PRE-CREATION
>   metastore/scripts/upgrade/mysql/hive-schema-0.12.0.mysql.sql 22a77fe
>   metastore/scripts/upgrade/mysql/upgrade-0.11.0-to-0.12.0.mysql.sql 375a05f
>   metastore/scripts/upgrade/mysql/upgrade.order.mysql PRE-CREATION