首页 > 代码库 > hadoop namenode -format Couldn'tload main class "-Djava.library.path=.home.hadoop.hadoop-2.5.2.lib"

hadoop namenode -format Couldn'tload main class "-Djava.library.path=.home.hadoop.hadoop-2.5.2.lib"

<pre name="code" class="sql">[hadoop@MasterHadoop50 ~]$ hadoop namenode -format
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

Error: Could not find or load main class "-Djava.library.path=.home.hadoop.hadoop-2.5.2.lib"
[hadoop@MasterHadoop50 ~]$ echo $JAVA_HOME
/usr/java/jdk1.7.0_71
[hadoop@MasterHadoop50 ~]$ java -version
java version "1.7.0_71"
Java(TM) SE Runtime Environment (build 1.7.0_71-b14)
Java HotSpot(TM) 64-Bit Server VM (build 24.71-b01, mixed mode)
[hadoop@MasterHadoop50 ~]$ less $HADOOP_HOME/etc/hadoop/hadoop-env.sh
[hadoop@MasterHadoop50 ~]$ ls -ltr /usr/java/jdk1.7.0_71
total 19800
-rw-r--r-- 1 root root   110114 Sep 27 05:06 THIRDPARTYLICENSEREADME-JAVAFX.txt
-rw-r--r-- 1 root root   173559 Sep 27 08:06 THIRDPARTYLICENSEREADME.txt
-rw-r--r-- 1 root root      114 Sep 27 08:06 README.html
-rw-r--r-- 1 root root       40 Sep 27 08:06 LICENSE
-rw-r--r-- 1 root root     3339 Sep 27 08:06 COPYRIGHT
-rw-r--r-- 1 root root 19913648 Sep 27 08:06 src.zip
-rw-r--r-- 1 root root      499 Sep 27 08:06 release
drwxr-xr-x 3 root root     4096 Dec 19 23:40 include
drwxr-xr-x 4 root root     4096 Dec 19 23:40 db
drwxr-xr-x 2 root root     4096 Dec 19 23:40 bin
drwxr-xr-x 5 root root     4096 Dec 19 23:40 jre
drwxr-xr-x 4 root root     4096 Dec 19 23:41 man
drwxr-xr-x 5 root root     4096 Dec 19 23:42 lib
[hadoop@MasterHadoop50 ~]$ ls -ltr /usr/java/
total 123844
-rwxr-xr-x 1 root root 126679286 Dec 19 23:34 jdk-7u71-linux-x64.rpm
drwxr-xr-x 8 root root      4096 Dec 19 23:41 jdk1.7.0_71
lrwxrwxrwx 1 root root        21 Dec 19 23:42 latest -> /usr/java/jdk1.7.0_71
lrwxrwxrwx 1 root root        16 Dec 19 23:42 default -> /usr/java/latest
[hadoop@MasterHadoop50 ~]$ less /etc/profile
[hadoop@MasterHadoop50 ~]$ javac
Usage: javac <options> <source files>
where possible options include:
  -g                         Generate all debugging info
  -g:none                    Generate no debugging info
  -g:{lines,vars,source}     Generate only some debugging info
  -nowarn                    Generate no warnings
  -verbose                   Output messages about what the compiler is doing
  -deprecation               Output source locations where deprecated APIs are used
  -classpath <path>          Specify where to find user class files and annotation processors
  -cp <path>                 Specify where to find user class files and annotation processors
  -sourcepath <path>         Specify where to find input source files
  -bootclasspath <path>      Override location of bootstrap class files
  -extdirs <dirs>            Override location of installed extensions
  -endorseddirs <dirs>       Override location of endorsed standards path
  -proc:{none,only}          Control whether annotation processing and/or compilation is done.
  -processor <class1>[,<class2>,<class3>...] Names of the annotation processors to run; bypasses default discovery process
  -processorpath <path>      Specify where to find annotation processors
  -d <directory>             Specify where to place generated class files
  -s <directory>             Specify where to place generated source files
  -implicit:{none,class}     Specify whether or not to generate class files for implicitly referenced files
  -encoding <encoding>       Specify character encoding used by source files
  -source <release>          Provide source compatibility with specified release
  -target <release>          Generate class files for specific VM version
  -version                   Version information
  -help                      Print a synopsis of standard options
  -Akey[=value]              Options to pass to annotation processors
  -X                         Print a synopsis of nonstandard options
  -J<flag>                   Pass <flag> directly to the runtime system
  -Werror                    Terminate compilation if warnings occur
  @<filename>                Read options and filenames from file

[hadoop@MasterHadoop50 ~]$ echo $HADOOP_OPTS
"-Djava.library.path=/home/hadoop/hadoop-2.5.2/lib"
[hadoop@MasterHadoop50 ~]$ jps
3233 Jps
[hadoop@MasterHadoop50 ~]$ less /etc/profile
[hadoop@MasterHadoop50 ~]$ echo $JAVA_HOME
/usr/java/jdk1.7.0_71
[hadoop@MasterHadoop50 ~]$ echo $CLASSPATH
.::/usr/java/jdk1.7.0_71/lib:/usr/java/jdk1.7.0_71/jre/lib
[hadoop@MasterHadoop50 ~]$ ls -ltr $HADOOP_OPTS
ls: "-Djava.library.path=/home/hadoop/hadoop-2.5.2/lib": No such file or directory

<pre name="code" class="sql">[root@MasterHadoop50 ~]# vim /etc/profile
.....................
....................
####### lyc 2014/12/19 23:48 set java path  #########
export JAVA_HOME=/usr/java/jdk1.7.0_71
##export PATH=$PATH:/usr/java/jdk1.7.0_71/bin
export CLASSPATH=.:$CLASSPATH:$JAVA_HOME/lib:$JAVA_HOME/jre/lib

export PATH=$PATH:$JAVA_HOME/bin:$JAVA_HOME/jre/bin

####### lyc 2014/12/20 1:21 set hadoop path ##########

##export HADOOP_HOME=/home/hadoop

##export PATH=$PATH:$HADOOP_HOME/bin

####### lyc 2014/12/21 2:08 set hadoop path ##########
####### set hadoop_env
export HADOOP_HOME=/home/hadoop/hadoop-2.5.2
export HADOOP_COMMON_HOME=$HADOOP_HOME
export HADOOP_HDFS_HOME=$HADOOP_HOME
export HADOOP_MAPRED_HOME=$HADOOP_HOME
export HADOOP_YARN_HOME=$HADOOP_HOME
export HADOOP_CONF_DIR=$HADOOP_HOME/etc/hadoop
export PATH=$PATH:$HADOOP_HOME/bin:$HADOOP_HOME/sbin:$HADOOP_HOME/lib
export HADOOP_COMMON_LIB_NATIVE_DIR=$HADOOP_HOME/lib/native
export HADOOP_OPTS="-Djava.library.path=$HADOOP_HOME/lib"


"/etc/profile" 105L, 2384C                                      

--把 HADOOP_OPTS 后面的双引号前后的 \ \ 去掉 即可.
hadoop namenode -format
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.

14/12/21 12:00:35 INFO namenode.NameNode: STARTUP_MSG: 
/************************************************************
STARTUP_MSG: Starting NameNode
STARTUP_MSG:   host = MasterHadoop50.localdomain/192.168.0.200
STARTUP_MSG:   args = [-format]
STARTUP_MSG:   version = 2.5.2
STARTUP_MSG:   classpath = /home/hadoop/hadoop-2.5.2/etc/hadoop:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jersey-core-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/apacheds-i18n-2.0.0-M15.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-el-1.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-configuration-1.6.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jackson-xc-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/netty-3.6.2.Final.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jetty-util-6.1.26.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-collections-3.2.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/hadoop-auth-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-compress-1.4.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/java-xmlbuilder-0.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-net-3.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jets3t-0.9.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-cli-1.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jersey-server-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/zookeeper-3.4.6.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/activation-1.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/log4j-1.2.17.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jasper-compiler-5.5.23.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/paranamer-2.3.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jaxb-api-2.2.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jackson-jaxrs-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/apacheds-kerberos-codec-2.0.0-M15.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/xmlenc-0.52.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-codec-1.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/mockito-all-1.8.5.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jaxb-impl-2.2.3-1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jasper-runtime-5.5.23.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/asm-3.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jettison-1.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/junit-4.11.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/api-util-1.0.0-M20.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-io-2.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jsch-0.1.42.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/hadoop-annotations-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/httpcore-4.2.5.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jersey-json-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-logging-1.1.3.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/servlet-api-2.5.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/slf4j-api-1.7.5.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/protobuf-java-2.5.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-httpclient-3.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-beanutils-1.7.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/api-asn1-api-1.0.0-M20.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jetty-6.1.26.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/snappy-java-1.0.4.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/stax-api-1.0-2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/guava-11.0.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-math3-3.1.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-digester-1.8.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jsr305-1.3.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/httpclient-4.2.5.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-lang-2.6.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/jsp-api-2.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/hamcrest-core-1.3.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/avro-1.7.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/commons-beanutils-core-1.8.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/lib/xz-1.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/hadoop-common-2.5.2-tests.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/hadoop-common-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/common/hadoop-nfs-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jersey-core-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/commons-el-1.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/commons-daemon-1.0.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/netty-3.6.2.Final.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jetty-util-6.1.26.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/commons-cli-1.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jersey-server-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/log4j-1.2.17.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/xmlenc-0.52.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/commons-codec-1.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jasper-runtime-5.5.23.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/asm-3.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/commons-io-2.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/commons-logging-1.1.3.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/servlet-api-2.5.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/protobuf-java-2.5.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jackson-core-asl-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jetty-6.1.26.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/guava-11.0.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jsr305-1.3.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/commons-lang-2.6.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/lib/jsp-api-2.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/hadoop-hdfs-nfs-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/hadoop-hdfs-2.5.2-tests.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/hdfs/hadoop-hdfs-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jersey-core-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jackson-xc-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/guice-servlet-3.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/guice-3.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/netty-3.6.2.Final.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jetty-util-6.1.26.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/commons-collections-3.2.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/commons-compress-1.4.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/commons-cli-1.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jersey-server-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/zookeeper-3.4.6.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/activation-1.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/log4j-1.2.17.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jline-0.9.94.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jaxb-api-2.2.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jersey-client-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jackson-jaxrs-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/commons-codec-1.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jaxb-impl-2.2.3-1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/asm-3.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jettison-1.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/commons-io-2.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/javax.inject-1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jersey-json-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/commons-logging-1.1.3.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/servlet-api-2.5.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/protobuf-java-2.5.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/commons-httpclient-3.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jackson-core-asl-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jetty-6.1.26.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/stax-api-1.0-2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/guava-11.0.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jsr305-1.3.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/commons-lang-2.6.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/jersey-guice-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/xz-1.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/aopalliance-1.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/lib/leveldbjni-all-1.8.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-server-web-proxy-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-server-nodemanager-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-api-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-server-common-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-client-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-common-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/yarn/hadoop-yarn-server-tests-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/jersey-core-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/guice-servlet-3.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/guice-3.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/netty-3.6.2.Final.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/commons-compress-1.4.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/jersey-server-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/log4j-1.2.17.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/paranamer-2.3.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/asm-3.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/junit-4.11.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/commons-io-2.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/hadoop-annotations-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/javax.inject-1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/protobuf-java-2.5.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/jackson-core-asl-1.9.13.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/snappy-java-1.0.4.1.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/jersey-guice-1.9.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/hamcrest-core-1.3.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/avro-1.7.4.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/xz-1.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/aopalliance-1.0.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/lib/leveldbjni-all-1.8.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-client-app-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.5.2-tests.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.5.2.jar:/home/hadoop/hadoop-2.5.2/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.2.jar:/home/hadoop/hadoop-2.5.2/contrib/capacity-scheduler/*.jar:/home/hadoop/hadoop-2.5.2/contrib/capacity-scheduler/*.jar
STARTUP_MSG:   build = https://git-wip-us.apache.org/repos/asf/hadoop.git -r cc72e9b000545b86b75a61f4835eb86d57bfafc0; compiled by 'jenkins' on 2014-11-14T23:45Z
STARTUP_MSG:   java = 1.7.0_71
************************************************************/
14/12/21 12:00:35 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
14/12/21 12:00:35 INFO namenode.NameNode: createNameNode [-format]
14/12/21 12:00:37 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
14/12/21 12:00:37 WARN common.Util: Path /home/hadoop/hdfs/name should be specified as a URI in configuration files. Please update hdfs configuration.
14/12/21 12:00:37 WARN common.Util: Path /home/hadoop/hdfs/name should be specified as a URI in configuration files. Please update hdfs configuration.
Formatting using clusterid: CID-eb5f8e69-bad5-4b41-8ae0-89786e61b15c
14/12/21 12:00:37 INFO namenode.FSNamesystem: fsLock is fair:true
14/12/21 12:00:38 INFO blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000
14/12/21 12:00:38 INFO blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true
14/12/21 12:00:38 INFO blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000
14/12/21 12:00:38 INFO blockmanagement.BlockManager: The block deletion will start around 2014 Dec 21 12:00:38
14/12/21 12:00:38 INFO util.GSet: Computing capacity for map BlocksMap
14/12/21 12:00:38 INFO util.GSet: VM type       = 64-bit
14/12/21 12:00:38 INFO util.GSet: 2.0% max memory 966.7 MB = 19.3 MB
14/12/21 12:00:38 INFO util.GSet: capacity      = 2^21 = 2097152 entries
14/12/21 12:00:38 INFO blockmanagement.BlockManager: dfs.block.access.token.enable=false
14/12/21 12:00:38 INFO blockmanagement.BlockManager: defaultReplication         = 2
14/12/21 12:00:38 INFO blockmanagement.BlockManager: maxReplication             = 512
14/12/21 12:00:38 INFO blockmanagement.BlockManager: minReplication             = 1
14/12/21 12:00:38 INFO blockmanagement.BlockManager: maxReplicationStreams      = 2
14/12/21 12:00:38 INFO blockmanagement.BlockManager: shouldCheckForEnoughRacks  = false
14/12/21 12:00:38 INFO blockmanagement.BlockManager: replicationRecheckInterval = 3000
14/12/21 12:00:38 INFO blockmanagement.BlockManager: encryptDataTransfer        = false
14/12/21 12:00:38 INFO blockmanagement.BlockManager: maxNumBlocksToLog          = 1000
14/12/21 12:00:38 INFO namenode.FSNamesystem: fsOwner             = root (auth:SIMPLE)
14/12/21 12:00:38 INFO namenode.FSNamesystem: supergroup          = supergroup
14/12/21 12:00:38 INFO namenode.FSNamesystem: isPermissionEnabled = false
14/12/21 12:00:38 INFO namenode.FSNamesystem: HA Enabled: false
14/12/21 12:00:38 INFO namenode.FSNamesystem: Append Enabled: true
14/12/21 12:00:38 INFO util.GSet: Computing capacity for map INodeMap
14/12/21 12:00:38 INFO util.GSet: VM type       = 64-bit
14/12/21 12:00:38 INFO util.GSet: 1.0% max memory 966.7 MB = 9.7 MB
14/12/21 12:00:38 INFO util.GSet: capacity      = 2^20 = 1048576 entries
14/12/21 12:00:38 INFO namenode.NameNode: Caching file names occuring more than 10 times
14/12/21 12:00:38 INFO util.GSet: Computing capacity for map cachedBlocks
14/12/21 12:00:38 INFO util.GSet: VM type       = 64-bit
14/12/21 12:00:38 INFO util.GSet: 0.25% max memory 966.7 MB = 2.4 MB
14/12/21 12:00:38 INFO util.GSet: capacity      = 2^18 = 262144 entries
14/12/21 12:00:38 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033
14/12/21 12:00:38 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0
14/12/21 12:00:38 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension     = 30000
14/12/21 12:00:38 INFO namenode.FSNamesystem: Retry cache on namenode is enabled
14/12/21 12:00:38 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis
14/12/21 12:00:38 INFO util.GSet: Computing capacity for map NameNodeRetryCache
14/12/21 12:00:38 INFO util.GSet: VM type       = 64-bit
14/12/21 12:00:38 INFO util.GSet: 0.029999999329447746% max memory 966.7 MB = 297.0 KB
14/12/21 12:00:38 INFO util.GSet: capacity      = 2^15 = 32768 entries
14/12/21 12:00:38 INFO namenode.NNConf: ACLs enabled? false
14/12/21 12:00:38 INFO namenode.NNConf: XAttrs enabled? true
14/12/21 12:00:38 INFO namenode.NNConf: Maximum size of an xattr: 16384
Re-format filesystem in Storage Directory /home/hadoop/hdfs/name ? (Y or N) y
14/12/21 12:00:48 INFO namenode.FSImage: Allocated new BlockPoolId: BP-1807063120-192.168.0.200-1419134447551
14/12/21 12:00:48 INFO common.Storage: Storage directory /home/hadoop/hdfs/name has been successfully formatted.
14/12/21 12:00:49 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
14/12/21 12:00:49 INFO util.ExitUtil: Exiting with status 0
14/12/21 12:00:49 INFO namenode.NameNode: SHUTDOWN_MSG: 
/************************************************************
SHUTDOWN_MSG: Shutting down NameNode at MasterHadoop50.localdomain/192.168.0.200
************************************************************/
[root@MasterHadoop50 ~]# 

[hadoop@MasterHadoop50 ~]$ echo $HADOOP_OPTS
"-Djava.library.path=/home/hadoop/hadoop-2.5.2/lib"
[hadoop@MasterHadoop50 ~]$ jps
3233 Jps
[hadoop@MasterHadoop50 ~]$ less /etc/profile
[hadoop@MasterHadoop50 ~]$ echo $JAVA_HOME
/usr/java/jdk1.7.0_71
[hadoop@MasterHadoop50 ~]$ echo $CLASSPATH
.::/usr/java/jdk1.7.0_71/lib:/usr/java/jdk1.7.0_71/jre/lib
[hadoop@MasterHadoop50 ~]$ ls -ltr $HADOOP_OPTS
ls: "-Djava.library.path=/home/hadoop/hadoop-2.5.2/lib": No such file or directory
[hadoop@MasterHadoop50 ~]$ echo $HADOOP_OPTS
"-Djava.library.path=/home/hadoop/hadoop-2.5.2/lib"
[hadoop@MasterHadoop50 ~]$ source /etc/profile
[hadoop@MasterHadoop50 ~]$ echo $HADOOP_OPTS
-Djava.library.path=/home/hadoop/hadoop-2.5.2/lib
改前后“”没了 。



hadoop namenode -format Couldn'tload main class "-Djava.library.path=.home.hadoop.hadoop-2.5.2.lib"