You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@hive.apache.org by "r7raul1984@163.com" <r7...@163.com> on 2015/05/05 10:03:59 UTC

How to config hive when using namenode HA

I want to turn my single namenode to namenode HA.  How to config hive ?


r7raul1984@163.com

Re: Re: How to config hive when using namenode HA

Posted by "r7raul1984@163.com" <r7...@163.com>.
Thank you!



r7raul1984@163.com
 
From: Gerald-G
Date: 2015-05-06 10:35
To: user
Subject: Re: How to config hive when using namenode HA
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 <r7...@163.com> wrote:

I want to turn my single namenode to namenode HA.  How to config hive ?


r7raul1984@163.com


Re: How to config hive when using namenode HA

Posted by Gerald-G <sh...@gmail.com>.
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 <r7...@163.com>
wrote:

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