異常信息如下:
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開頭
修改前:
修改后: