hive-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Shreepadma Venugopalan" <>
Subject Re: Review Request: HIVE-3443: Add serdeParamKey option to Hive Metatool
Date Mon, 10 Sep 2012 23:24:38 GMT

This is an automatically generated e-mail. To reply, visit:

(Updated Sept. 10, 2012, 11:24 p.m.)

Review request for hive, Carl Steinbach and Carl Steinbach.


The patch has been updated to take in -tablePropKey <table-prop-key> from the user.
This option is valid only with the -updateLocation option. When -tablePropKey option is specified
metatool looks for records in SD_PARAMS and updates those records whose key match the the
table-prop-key specified by the user and whose value matches the <old-loc> specified
with -updateLocation option. The new metatool option looks as below,

metatool -updateLocation <new-loc> <old-loc> -tablePropKey <table-prop-key>
serdeParamKey <serde-param-key> 

Both -tablePropKey and -serdePropKey are optional.


This patch adds an additional option to Hive Metatool that allows Metatool to take in a serdeParamKey
from the user. Avro Serde's schema URL key used to be called schema.url in the past whereas
its called avro.schema.url now. The purpose of the patch is to make Metatool more generic
than what it is today so that its in a position to handle variations such as the one described
above. The new option looks as below,

-serdeParamKey <serde_param_key>=<value>

Note that the new Option -serdeParamKey is valid only with the -updateLocation option. When
the user attempts to use the serdeParamKey option with other options, an error is raised and
the usage is printed.

If the user doesn't pass -serdeParamKey as part of the -updateLocation option, Hive Metatool
searches for records with both "avro.schema.url" and "schema.url" keys and updates them.

This addresses bug HIVE-3343.

Diffs (updated)

  metastore/src/java/org/apache/hadoop/hive/metastore/ 251d4ba 
  metastore/src/java/org/apache/hadoop/hive/metastore/tools/ a76594a 
  metastore/src/test/org/apache/hadoop/hive/metastore/ 5790ae9 



HiveMetaTool has been tested to verify that it handles both avro.schema.url and schema.url
correctly. Existing test case in has been modified to use AvroSerDe
instead of LazySimpleSerDe.


Shreepadma Venugopalan

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message