windows远程调试hadoop权限问题

为了开发方便想要直接在windows下开发,遇到了访问权限的问题。于是搜索了下解决方案,大约有两种

1 不检查用户权限

修改conf/core-site.xml,不检查权限 将 dfs.permissions属性修改为false

同时修改conf/hdfs-site.xml,添加dfs.permissions属性false

<property>
  <name>dfs.permissions</name>
  <value>false</value>
</property>

这种办法过于粗暴,仅仅开发环境可以使用。说以需要采用别的方法。

2 修改用户权限

这种方法文雅了很多,而且更加安全。我们观察hadoop hdfs中的文件发现了这样的现象,所有的文件都是由一个叫做supergroup的用户组上传的,于是如果将windows的用户也放到这个组里面 或许就能够搞定了

具体过程如下

a)创建名为supergroup的用户组

[plain] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sudo  groupadd  supergroup

b)将windows用户名加入supergroup中,因为我windows的用户名为Chang所以就就这么弄

[plain] view plaincopy在CODE上查看代码片派生到我的代码片

  1. sudo  useradd -g supergroup -N -r Chang

到此为止就搞定了,在windows下的eclipse中随意写个小程序跑跑,比如列出datanote名称。得到了下面的结果

说明已经能够正常访问hdfs了,方法奏效了!

8 thoughts on “windows远程调试hadoop权限问题

    1. Hello, is your web host having any prbeolms lately? I had to refresh the web page about ten times till the 404 error went away and I was able to look at this post!

    1. Hell, I’m happy Favre is skipping out on training camp to mow his lawn, shot that pesky armadillo, play games with the media and throw passes to teerigens.Meanwhale, Rodgers has been to all of the OTA’s and is in camp, watching film, working on his line calls, and developing timing with his receivers.Stay home Favre, you don’t need training camp!

  1. I loved as much as you will receive carried out right here. The sketch is attractive, your authored material stylish. nonetheless, you command get got an edginess over that you wish be delivering the following. unwell unquestionably come further formerly again as exactly the same nearly a lot often inside case you shield this hike.

  2. I have a Samsung Galaxy Tab 10.1 and would love it if Samsung would get on with the job of getting ICS out to this device. I do3;#0n9&t want to have to root the silly thing!

Leave a Reply

Your email address will not be published. Required fields are marked *