zoukankan      html  css  js  c++  java
  • HDFS权限问题

    HDFS权限问题 

    Win下Eclipse提交hadoop程序出错:org.apache.hadoop.security.AccessControlException: Permission denied: user=mango, access=WRITE


    描述:在window下使用Eclipse进行hadoop的程序编写,然后Run on hadoop 后,出现如下错误:


    11/10/28 16:05:53 INFO mapred.JobClient: Running job: job_201110281103_0003
    11/10/28 16:05:54 INFO mapred.JobClient: map 0% reduce 0%
    11/10/28 16:06:05 INFO mapred.JobClient: Task Id : attempt_201110281103_0003_m_000002_0, Status : FAILED
    org.apache.hadoop.security.AccessControlException: org.apache.hadoop.security.AccessControlException: Permission denied: user=mango, access=WRITE, inode="hadoop"/inode="tmp":hadoop:supergroup:rwxr-xr-x
    at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)


     


    解决方法:


      到服务器上修改hadoop的配置文件:conf/hdfs-site.xml, 找到 dfs.permissions 的配置项 , 将value值改为 false


    <property>
    <name>dfs.permissions</name>
    <value>false</value>
    <description>
    If "true", enable permission checking in HDFS.
    If "false", permission checking is turned off,
    but all other behavior is unchanged.
    Switching from one parameter value to the other does not change the mode,
    owner or group of files or directories.
    </description>
    </property>

    如果配置文件中没有该内容,可以自己添加
     


    修改完貌似要重启下hadoop的进程才能生效

  • 相关阅读:
    模拟Linux修改实际、有效和保存设置标识
    ubuntu中桌面图标的配置
    硬盘安装ubuntu
    关于NumPy
    关于Spring JavaWeb工程中的ContextRefreshedEvent事件
    MySQL中Index Merge简介
    InetlliJ IDEA的快捷键及各种配置
    Java语言中的正则表达式
    Git使用笔记
    linux中添加常用应用程序的桌面图标
  • 原文地址:https://www.cnblogs.com/catWang/p/4014696.html
Copyright © 2011-2022 走看看