org.apache.hadoop.util.PlatformName //cgywin下Hadoop-0.21.0 错误问题
生活随笔
收集整理的這篇文章主要介紹了
org.apache.hadoop.util.PlatformName //cgywin下Hadoop-0.21.0 错误问题
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
windows 7 專業版 32位 cgywin下Hadoop-0.21.0 錯誤問題
格式化管理者,即namenode,創建HDFS
執行命令$ bin/hadoop namenode -format
$ bin/hadoop namenode -format cygwin warning:MS-DOS style path detected: C:\cygwin\hadoop\/build/nativePreferred POSIX equivalent is: /hadoop/build/nativeCYGWIN environment variable option "nodosfilewarning" turns off this warning.Consult the user's guide for more details about POSIX paths:http://cygwin.com/cygwin-ug-net/using.html#using-pathnames Exception in thread "Main Thread" java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.PlatformNameat java.net.URLClassLoader$1.run(URLClassLoader.java:202)at java.net.URLClassLoader.findClass(URLClassLoader.java:190)at java.lang.ClassLoader.loadClass(ClassLoader.java:307)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: org.apache.hadoop.util.PlatformName. Program will exit. DEPRECATED: Use of this script to execute hdfs command is deprecated. Instead use the hdfs command for it.Exception in thread "Main Thread" java.lang.NoClassDefFoundError: org/apache/hadoop/util/PlatformName Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.util.PlatformNameat java.net.URLClassLoader$1.run(URLClassLoader.java:202)at java.net.URLClassLoader.findClass(URLClassLoader.java:190)at java.lang.ClassLoader.loadClass(ClassLoader.java:307)at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308)at java.lang.ClassLoader.loadClass(ClassLoader.java:248) Could not find the main class: org.apache.hadoop.util.PlatformName. Program will exit.
解決方法:
只需要將${HADOOP_HOME}/bin/hadoop-config.sh文件中的第190行的一下的內容?
JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m ${HADOOP_JAVA_PLATFORM_OPTS} org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`?
改成?
JAVA_PLATFORM=`CLASSPATH=${CLASSPATH} ${JAVA} -Xmx32m -classpath ${HADOOP_COMMON_HOME}/hadoop-common-0.21.0.jar org.apache.hadoop.util.PlatformName | sed -e "s/ /_/g"`
總結
以上是生活随笔為你收集整理的org.apache.hadoop.util.PlatformName //cgywin下Hadoop-0.21.0 错误问题的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: Spring MVC 3.2.2 +ea
- 下一篇: hadoop-0.21.0 在Windo