One update. Hive seems to have an issue about handling "viewfs://"?
For example, hive db creation got failed with permission error even if the permission of the target hdfs dir is 777.
HDFS permission:
hdfs dfs -ls -d viewfs://fed/user/hadoop/warehouse/hadoop_viewfs6.db drwxrwxrwx - hadoop hadoop 0 2019-04-24 07:44 viewfs://fed/user/hadoop/warehouse/hadoop_viewfs6.db |
Hive DB creation got failed with the hdfs dir.
0: jdbc:hive2://XXXX > create database hadoop_viewfs6 location '/user/hadoop/warehouse/hadoop_viewfs6.db'; Error: Error while compiling statement: FAILED: HiveAccessControlException Permission denied: user [hadoop] does not have [WRITE] privilege on [viewfs://fed/user/hadoop/warehouse/hadoop_viewfs6.db] (state=42000,code=40000 |
Succeeded with "hdfs://"
0: jdbc:hive2://XXXX > create database hadoop_viewfs6 location 'hdfs://ns1/user/hadoop/warehouse/hadoop_viewfs6.db';
|