美文网首页
CDH文件权限问题

CDH文件权限问题

作者: 只是甲 | 来源:发表于2021-03-09 14:46 被阅读0次

Hive执行语句的时候提示 /user权限不够

hive> 
    > select count(*) from fact_sale;
Query ID = root_20201119152619_16f496b5-2482-4efb-a26c-e18117b2f10c
Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
  set mapreduce.job.reduces=<number>
org.apache.hadoop.security.AccessControlException: Permission denied: user=root, access=WRITE, inode="/user":hdfs:supergroup:drwxr-xr-x

解决方案:

[root@hp1 ~]# 
[root@hp1 ~]# hadoop fs -ls /
Found 2 items
drwxrwxrwt   - hdfs supergroup          0 2020-11-15 12:22 /tmp
drwxr-xr-x   - hdfs supergroup          0 2020-11-15 12:21 /user
[root@hp1 ~]# 
[root@hp1 ~]# hadoop fs -chmod 777 /user
chmod: changing permissions of '/user': Permission denied. user=root is not the owner of inode=/user
[root@hp1 ~]# 
[root@hp1 ~]# sudo -u hdfs hadoop fs -chmod 777 /user
[root@hp1 ~]# 
[root@hp1 ~]# 
[root@hp1 ~]# hadoop fs -ls /
Found 2 items
drwxrwxrwt   - hdfs supergroup          0 2020-11-15 12:22 /tmp
drwxrwxrwx   - hdfs supergroup          0 2020-11-15 12:21 /user
[root@hp1 ~]# 

重新测试:

    > 
    > select count(*) from fact_sale;
Query ID = root_20201119153419_cdcbb275-4439-47d6-a240-30641dc180fd
Total jobs = 1
Launching Job 1 out of 1
Number of reduce tasks determined at compile time: 1
In order to change the average load for a reducer (in bytes):
  set hive.exec.reducers.bytes.per.reducer=<number>
In order to limit the maximum number of reducers:
  set hive.exec.reducers.max=<number>
In order to set a constant number of reducers:
  set mapreduce.job.reduces=<number>
20/11/19 15:34:19 INFO client.ConfiguredRMFailoverProxyProvider: Failing over to rm69
Starting Job = job_1605767427026_0001, Tracking URL = http://hp3:8088/proxy/application_1605767427026_0001/
Kill Command = /opt/cloudera/parcels/CDH-6.3.1-1.cdh6.3.1.p0.1470567/lib/hadoop/bin/hadoop job  -kill job_1605767427026_0001
Hadoop job information for Stage-1: number of mappers: 0; number of reducers: 0
2020-11-19 15:34:58,689 Stage-1 map = 0%,  reduce = 0%
Ended Job = job_1605767427026_0001 with errors
Error during job, obtaining debugging information...
FAILED: Execution Error, return code 2 from org.apache.hadoop.hive.ql.exec.mr.MapRedTask
MapReduce Jobs Launched: 
Stage-Stage-1:  HDFS Read: 0 HDFS Write: 0 HDFS EC Read: 0 FAIL
Total MapReduce CPU Time Spent: 0 msec

相关文章

  • CDH文件权限问题

    Hive执行语句的时候提示 /user权限不够 解决方案: 重新测试:

  • Nginx初学相关问题

    nginx 重启权限问题 解决: nginx 文件权限写入问题 解决: nginx vagrant配置文件位置

  • CDH服务最大文件描述符

    CDH最大文件描述符 Configuring Maximum File Descriptors 一:问题: 二:解...

  • 文件权限问题

    使用ls -l查看文件属性: 这个地方最需要注意了!仔细看的话,你应该可以发现这一栏其实共有十个字符: 图2.1....

  • Permission denied error

    go get 后出现权限问题 文件权限问题没有权限写入按 sudo 方式运行命令 git 权限问题没有权...

  • Linux文件权限

    本文问题 文件/文件夹的权限有哪几种,含义分别是什么? 如何查看文件/文件夹权限? 如何更改文件/文件夹权限? 如...

  • MacOS 文件权限

    需求 MacOS下,文件分为只读/只写/读写权限,用户在修改系统管理的文件,需要获取文件的读写权限 权限问题提示:...

  • Error: Unable to launch WebDrive

    该问题是权限问题: appium的守护进程的所有者对上述文件夹没有写入权限。您需要更改该文件夹的权限或从其他文件夹...

  • webstorm: clear read-only status

    clear read-only status问题是由于文件权限不够导致的,要想修改文件,就修改文件权限 进入终端(...

  • Python简明教程第6节: 文件和异常

    文件 关于文件,需要了解关于文件操作权限的问题。 这里我们只关心文件的读写权限,也就是 ‘r’和 ‘w’。 首先,...

网友评论

      本文标题:CDH文件权限问题

      本文链接:https://www.haomeiwen.com/subject/iocliktx.html