为了开发方便想要直接在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的用户组
b)将windows用户名加入supergroup中,因为我windows的用户名为Chang所以就就这么弄
- sudo useradd -g supergroup -N -r Chang
到此为止就搞定了,在windows下的eclipse中随意写个小程序跑跑,比如列出datanote名称。得到了下面的结果

说明已经能够正常访问hdfs了,方法奏效了!
web site, i am visiting this website dailly and take fastidious
data from here daily.
one is sharing facts, that’s really good, keep up
writing.
great written and include approximately all vital infos.
I would like to see more posts like this .