
正文
cdh5.7 做完HA后hive 查询出现异常: expected: hdfs://nameservice
提示:扫一扫查出行【扫一扫了解最新限行尾号】
复制提示
异常信息如下:
select * from b_pt_pr_customer_address_info limit 19;
FAILED: SemanticException Unable to determine if hdfs://nodexx:8020/user/hive/warehouse/ss_aa_bb_info is encrypted: java.lang.IllegalArgumentException: Wrong FS: hdfs://nodexx:8020/user/hive/warehouse/
ss_aa_bb_pt_pr_customer_address_info, expected: hdfs://nameservice
异常原因: 做完HA后 hive 查询hdfs上文件只认 hdfs://nameservice1
解决办法:
1、需要修改hive 数据库里面
DBS : Hive数据仓库的总路径
SDS : Hive每张表对应的路径
2张表的数据。
将原来节点信息修改为HA后的名称
例如:DBS 表中:的DB_LOCATION_URI:hdfs://nodexx:8020/user/hive/warehouse 修改为hdfs://nameservice1/user/hive/warehouse 即可。
SDS表 需要将LOCATION 修改为hdfs://nameservice1开头
修改前:

修改后:







![【电子书】[职业技术] 《Hive编程指南》[美][卡普廖洛][epub+mobi+azw3] 【电子书】[职业技术] 《Hive编程指南》[美][卡普廖洛][epub+mobi+azw3]](https://www.04ip.com/template/qe/style/noimg/6.jpg)
