Fix an issue where the hive path is incorrect after namenode configuration of HA

Source: Internet
Author: User
Tags table name

Fix an issue where the hive path is incorrect after namenode configuration of HA


After CDH5.7 is configured with Namenode ha, hive has no normal query data, but other components HDFs, HBase, and Spark are normal.

The following exception occurred in the hive query:

Failed:semanticexception unable to determine if Hdfs://bdc240.hexun.com:8020/user/hive/warehouse/test1 is encrypted: Java.lang.IllegalArgumentException:Wrong Fs:hdfs://bdc240.hexun.com:8020/user/hive/warehouse/test1, expected: Hdfs://nameservice1


All kinds of reloading service is not solved.


A friend reminder should be the hive metadata problem, there are two tables in the Hive database:

Dbs:hive the total path of the Data Warehouse

Sds:hive path for each table


The path of the original HDFs is saved in the database and modified to an ha corresponding alias.


In general, the metabase uses MySQL to replace field content with SQL, which is convenient:

Related SQL Specification:

Update table name set field name =replace (field name, ' original value ', ' value to modify ')

Modification Example:

Update DBS Set Db_location_uri=replace (Db_location_uri, ' bdc240.hexun.com:8020 ', ' Nameservice1 ');
Update SDS set Location=replace (location, ' bdc240.hexun.com:8020 ', ' Nameservice1 ');





Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.