您好,登錄后才能下訂單哦!
1、啟動yarn時報Error: JAVA_HOME is not set and could not be found.
修改/etc/hadoop/hadoop-env.sh中設JAVA_HOME,應當使用絕對路徑。
export JAVA_HOME=$JAVA_HOME //錯誤,不能這么改
export JAVA_HOME=/usr/java/jdk1.6.0_45 //正確,應該這么改
2、安裝完啟動hadoop的時候出現如下警告信息
2016-05-20 18:45:11,022 INFO org.apache.hadoop.http.HttpServer2: Jetty bound to port 50070 2016-05-20 18:45:11,027 INFO org.mortbay.log: jetty-6.1.26 2016-05-20 18:45:11,648 INFO org.mortbay.log: Started HttpServer2$SelectChannelConnectorWithSafeStartup@0.0.0.0:50070 2016-05-20 18:45:11,725 2016-05-20 18:45:11,833 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: No KeyProvider found. 2016-05-20 18:45:11,849 INFO org.apache.hadoop.hdfs.server.namenode.FSNamesystem: fsLock is fair:true 2016-05-20 18:45:11,899 INFO org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000 2016-05-20 18:45:11,900 INFO org.apache.hadoop.hdfs.server.blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true 2016-05-20 18:45:11,904 INFO org.apache.hadoop.hdfs.server.blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000 2016-05-20 18:45:11,907 INFO org.apache.hadoop.hdfs.server.blockmanagement.BlockManager: The block deletion will start around 2016 五月 20 18:45:11 2016-05-20 18:45:11,914 INFO org.apache.hadoop.util.GSet: Computing capacity for map BlocksMap 2016-05-20 18:45:11,914 INFO org.apache.hadoop.util.GSet: VM type = 64-bit 2016-05-20 18:45:11,919 INFO org.apache.hadoop.util.GSet: 2.0% max memory 966.7 MB = 19.3 MB
問題原因及解決方法
改警告信息主要是因為做配置文件hdfs-site.xml中dfs.namenode.name.dir參數的路勁前綴未加上file://,如:
<configuration>
<property>
<name>dfs.replication</name>
<value>2</value>
</property>
<property>
<name>dfs.namenode.name.dir</name>
<value>file:////hadoop/dfs/name</value>
</property>
<property>
<name>dfs.datanode.data.dir</name>
<value>file:////hadoop/dfs/data</value>
</property>
</configuration>
3、hadoop執行任意命令對HDFS操作報錯如下:
WARN org.apache.hadoop.util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable 問題原因及解決: 改警告主要是因為做hadoop安裝目錄/hadoop/lib/native/下缺少libhadoop.so或者libhadoop.so的版本(32/64bit)與操作系統的版本不一致導致的,只需下載hadoop-native-64-2.6.0解壓到/hadoop/lib/native/目錄下,或者替換原來的即可
免責聲明:本站發布的內容(圖片、視頻和文字)以原創、轉載和分享為主,文章觀點不代表本網站立場,如果涉及侵權請聯系站長郵箱:is@yisu.com進行舉報,并提供相關證據,一經查實,將立刻刪除涉嫌侵權內容。