windows hadoop issue

1:

在hadoop安裝目錄下,運行運行命令

bin/hadoop fs -put /home/files/* /input 

報錯,提示

put: File /home/files/ does not exist.

由於 Cygwin 的路徑並無法正常被 Hadoop 解析,亦即 Hadoop 經過 Windows OS 告知路徑爲 C:\...\files\ 但在 Cygwin 中卻爲 \...\files

因此倘若您看到 File XXXX does not exist 的問題,可用 cygpath -w 指令把路徑轉變成 Windows 絕對路徑,就可以解決,運行


bin/hadoop fs -put $(cygpath -w /cygdrive/d/cygwin/home/files/*) /input

拷貝成功。


2

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

solution: 到服務器上修改hadoop的配置文件:conf/hdfs-core.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>


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章