hive-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gerald-G <shadowinl...@gmail.com>
Subject Re: How to config hive when using namenode HA
Date Wed, 06 May 2015 02:35:45 GMT
Upgrading the Hive Metastore to Use HDFS HA Using the Command Line

To configure the Hive metastore to use HDFS HA, change the records to
reflect the location specified in the dfs.nameservices property, using the
Hive metatool to obtain and change the locations.
  *Note*: Before attempting to upgrade the Hive metastore to use HDFS HA,
shut down the metastore and back it up to a persistent store.

If you are unsure which version of Avro SerDe is used, use both the
serdePropKey and tablePropKey arguments. For example:

$ metatool -listFSRoot
hdfs://oldnamenode.com/user/hive/warehouse
$ metatool -updateLocation hdfs://nameservice1 hdfs://oldnamenode.com
-tablePropKey avro.schema.url
-serdePropKey schema.url
$ metatool -listFSRoot
hdfs://nameservice1/user/hive/warehouse

where:

   - hdfs://oldnamenode.com/user/hive/warehouse identifies the NameNode
   location.
   - hdfs://nameservice1 specifies the new location and should match the
   value of the dfs.nameservices property.
   - tablePropKey is a table property key whose value field may reference
   the HDFS NameNode location and hence may require an update. To update the
   Avro SerDe schema URL, specify avro.schema.url for this argument.
   - serdePropKey is a SerDe property key whose value field may reference
   the HDFS NameNode location and hence may require an update. To update the
   Haivvero schema URL, specify schema.url for this argument.


On Tue, May 5, 2015 at 4:03 PM, r7raul1984@163.com <r7raul1984@163.com>
wrote:

>
> I want to turn my single namenode to namenode HA.  How to config hive ?
> ------------------------------
> r7raul1984@163.com
>

Mime
View raw message