Hadoop-2.5.1集群安装配置笔记
1.环境
1.1.虚拟机
准备3台虚拟机,安装Centos 64-bit操作系统,采用最小安装。
(本来想多跑几台虚拟机,但本人笔记本电脑内存有限,最多只能同时跑3个虚拟机)
虚拟机一律配置静态IP地址,配置域名解析,各虚拟机时间同步。
192.168.17.100 nameNode
192.168.17.101 dataNode1
192.168.17.102 dataNode2
2.安装
2.1.安装前
2.1.1.安装wget和ssh
用于下载和ssh登录
-
yum -y install wget
-
-
yum -y install openssh*
2.1.2.安装JDK、配置环境变量
略...
2.1.3.配置ssh公钥密钥自动登录
在hadoop集群环境中,nameNode节点,需要能够ssh无密码登录访问dataNode节点
进入SSH目录:
-
[root@nameNode ~]# cd .ssh
-
[root@nameNode .ssh]#
生成公钥密钥对:
-
[root@nameNode /]# ssh-keygen -t rsa
-
Generating public/private rsa key pair.
-
Enter file in which to save the key (/root/.ssh/id_rsa):
-
Enter passphrase (empty for no passphrase):
-
Enter same passphrase again:
-
Your identification has been saved in /root/.ssh/id_rsa.
-
Your public key has been saved in /root/.ssh/id_rsa.pub.
-
The key fingerprint is:
-
98:3c:31:5c:23:21:73:a0:a0:1f:c6:d3:c3:dc:58:32 root@gifer
-
The key's randomart image is:
-
+--[ RSA 2048]----+
-
|. E.=.o |
-
|.o = @ o . |
-
|. * * = |
-
| o o o = |
-
| . = S |
-
| . |
-
| |
-
| |
-
| |
-
+-----------------+
看到图形输出,表示密钥生成成功,目录下多出两个文件
私钥文件:id_raa
公钥文件:id_rsa.pub
将公钥文件id_rsa.pub内容放到authorized_keys文件中:
-
cat id_rsa.pub >> authorized_keys
将公钥文件authorized_keys分发到各dataNode节点:
-
scp authorized_keys root@dataNode:/root/.ssh/
验证ssh无密码登录:
-
[root@nameNode .ssh]# ssh root@dataNode1
-
Last login: Sun Sep 21 11:38:05 2014 from 192.168.17.1
看到以上输出,表示配置成功!如果还提示需要输出密码访问,表示配置失败!
2.2.开始安装
下载最新版本hadoop-2.5.1
-
wget http://mirrors.hust.edu.cn/apache/hadoop/common/hadoop-2.5.1/hadoop-2.5.1.tar.gz
解压
-
tar -zxf hadoop-2.5.1.tar.gz
2.3.配置文件
进入配置文件目录:cd hadoop-2.5.1/etc/hadoop
2.3.1.core-site.xml
-
<configuration>
-
<property>
-
<name>hadoop.tmp.dir</name>
-
<value>/home/hadoop/tmp</value>
-
<description>Abase for other temporary directories.</description>
-
</property>
-
<property>
-
<name>fs.defaultFS</name>
-
<value>hdfs://nameNode:9000</value>
-
</property>
-
<property>
-
<name>io.file.buffer.size</name>
-
<value>4096</value>
-
</property>
-
</configuration>
2.3.2.hdfs-site.xml
-
<configuration>
-
<property>
-
<name>dfs.nameservices</name>
-
<value>hadoop-cluster1</value>
-
</property>
-
<property>
-
<name>dfs.namenode.secondary.http-address</name>
-
<value>nameNode:50090</value>
-
</property>
-
<property>
-
<name>dfs.namenode.name.dir</name>
-
<value>file:///home/hadoop/dfs/name</value>
-
</property>
-
<property>
-
<name>dfs.datanode.data.dir</name>
-
<value>file:///home/hadoop/dfs/data</value>
-
</property>
-
<property>
-
<name>dfs.replication</name>
-
<value>2</value>
-
</property>
-
<property>
-
<name>dfs.webhdfs.enabled</name>
-
<value>true</value>
-
</property>
-
</configuration>
2.3.3.mapred-site.xml
-
<configuration>
-
<property>
-
<name>mapreduce.framework.name</name>
-
<value>yarn</value>
-
</property>
-
<property>
-
<name>mapreduce.jobtracker.http.address</name>
-
<value>nameNode:50030</value>
-
</property>
-
<property>
-
<name>mapreduce.jobhistory.address</name>
-
<value>nameNode:10020</value>
-
</property>
-
<property>
-
<name>mapreduce.jobhistory.webapp.address</name>
-
<value>nameNode:19888</value>
-
</property>
-
</configuration>
2.3.4.yarn-site.xml
-
<configuration>
-
-
-
<property>
-
<name>yarn.nodemanager.aux-services</name>
-
<value>mapreduce_shuffle</value>
-
</property>
-
<property>
-
<name>yarn.resourcemanager.address</name>
-
<value>nameNode:8032</value>
-
</property>
-
<property>
-
<name>yarn.resourcemanager.scheduler.address</name>
-
<value>nameNode:8030</value>
-
</property>
-
<property>
-
<name>yarn.resourcemanager.resource-tracker.address</name>
-
<value>nameNode:8031</value>
-
</property>
-
<property>
-
<name>yarn.resourcemanager.admin.address</name>
-
<value>nameNode:8033</value>
-
</property>
-
<property>
-
<name>yarn.resourcemanager.webapp.address</name>
-
<value>nameNode:8088</value>
-
</property>
-
</configuration>
2.3.5.slaves
2.3.6.修改JAVA_HOME
分别在文件hadoop-env.sh和yarn-env.sh中添加JAVA_HOME配置
vi hadoop-env.sh
-
export JAVA_HOME=/usr/java/jdk1.7.0_65
vi yarn-env.sh
-
export JAVA_HOME=/usr/java/jdk1.7.0_65
2.4.格式化文件系统
格式化文件系统:
-
bin/hdfs namenode -format
输出:
-
14/09/21 11:57:22 INFO namenode.NameNode: STARTUP_MSG:
-
/************************************************************
-
STARTUP_MSG: Starting NameNode
-
STARTUP_MSG: host = nameNode/127.0.0.1
-
STARTUP_MSG: args = [-format]
-
STARTUP_MSG: version = 2.5.1
-
STARTUP_MSG: classpath = /home/hadoop-2.5.1/etc/hadoop:/home/hadoop-2.5.1/share/hadoop/common/lib/jackson-jaxrs-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jets3t-0.9.0.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jersey-server-1.9.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/asm-3.2.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/guava-11.0.2.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jetty-6.1.26.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/api-util-1.0.0-M20.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/xz-1.0.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/paranamer-2.3.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-lang-2.6.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/api-asn1-api-1.0.0-M20.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-beanutils-1.7.0.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-codec-1.4.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-math3-3.1.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-beanutils-core-1.8.0.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-configuration-1.6.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jsch-0.1.42.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/netty-3.6.2.Final.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jackson-xc-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/zookeeper-3.4.6.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-cli-1.2.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/activation-1.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-collections-3.2.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jackson-core-asl-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/hadoop-auth-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/hamcrest-core-1.3.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-el-1.0.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/xmlenc-0.52.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jasper-runtime-5.5.23.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/apacheds-i18n-2.0.0-M15.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jsr305-1.3.9.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/log4j-1.2.17.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/httpclient-4.2.5.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jersey-json-1.9.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/avro-1.7.4.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jasper-compiler-5.5.23.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jersey-core-1.9.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/apacheds-kerberos-codec-2.0.0-M15.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/hadoop-annotations-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-httpclient-3.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-io-2.4.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-net-3.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/stax-api-1.0-2.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-compress-1.4.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jaxb-api-2.2.2.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/junit-4.11.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/slf4j-api-1.7.5.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jetty-util-6.1.26.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jsp-api-2.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/mockito-all-1.8.5.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/slf4j-log4j12-1.7.5.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/protobuf-java-2.5.0.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jaxb-impl-2.2.3-1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/java-xmlbuilder-0.4.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/httpcore-4.2.5.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/servlet-api-2.5.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/snappy-java-1.0.4.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-digester-1.8.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/jettison-1.1.jar:/home/hadoop-2.5.1/share/hadoop/common/lib/commons-logging-1.1.3.jar:/home/hadoop-2.5.1/share/hadoop/common/hadoop-nfs-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/common/hadoop-common-2.5.1-tests.jar:/home/hadoop-2.5.1/share/hadoop/common/hadoop-common-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/hdfs:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/commons-daemon-1.0.13.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jersey-server-1.9.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/asm-3.2.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/guava-11.0.2.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jetty-6.1.26.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/commons-lang-2.6.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/commons-codec-1.4.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/netty-3.6.2.Final.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/commons-cli-1.2.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jackson-core-asl-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/commons-el-1.0.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/xmlenc-0.52.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jasper-runtime-5.5.23.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jsr305-1.3.9.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/log4j-1.2.17.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jersey-core-1.9.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/commons-io-2.4.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jetty-util-6.1.26.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/jsp-api-2.1.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/protobuf-java-2.5.0.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/servlet-api-2.5.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/lib/commons-logging-1.1.3.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/hadoop-hdfs-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/hadoop-hdfs-nfs-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/hdfs/hadoop-hdfs-2.5.1-tests.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jackson-jaxrs-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jersey-server-1.9.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/asm-3.2.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/guava-11.0.2.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jetty-6.1.26.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/xz-1.0.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/commons-lang-2.6.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/commons-codec-1.4.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/javax.inject-1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/netty-3.6.2.Final.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jackson-xc-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/zookeeper-3.4.6.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/commons-cli-1.2.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/activation-1.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/commons-collections-3.2.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jersey-guice-1.9.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/guice-servlet-3.0.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/leveldbjni-all-1.8.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jline-0.9.94.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jackson-core-asl-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jsr305-1.3.9.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/log4j-1.2.17.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jersey-json-1.9.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/guice-3.0.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jersey-core-1.9.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/commons-httpclient-3.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/commons-io-2.4.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/stax-api-1.0-2.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/commons-compress-1.4.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jaxb-api-2.2.2.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jetty-util-6.1.26.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/protobuf-java-2.5.0.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jaxb-impl-2.2.3-1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/servlet-api-2.5.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jersey-client-1.9.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/aopalliance-1.0.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/jettison-1.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/lib/commons-logging-1.1.3.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-client-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-common-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-server-tests-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-server-nodemanager-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-server-web-proxy-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-server-resourcemanager-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-api-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-server-common-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-applications-distributedshell-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-server-applicationhistoryservice-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/yarn/hadoop-yarn-applications-unmanaged-am-launcher-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/jackson-mapper-asl-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/jersey-server-1.9.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/asm-3.2.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/xz-1.0.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/paranamer-2.3.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/javax.inject-1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/netty-3.6.2.Final.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/jersey-guice-1.9.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/guice-servlet-3.0.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/leveldbjni-all-1.8.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/jackson-core-asl-1.9.13.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/hamcrest-core-1.3.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/log4j-1.2.17.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/avro-1.7.4.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/guice-3.0.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/jersey-core-1.9.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/hadoop-annotations-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/commons-io-2.4.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/commons-compress-1.4.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/junit-4.11.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/protobuf-java-2.5.0.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/snappy-java-1.0.4.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/lib/aopalliance-1.0.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-client-app-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-client-jobclient-2.5.1-tests.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-client-shuffle-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-client-common-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-plugins-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-client-hs-2.5.1.jar:/home/hadoop-2.5.1/share/hadoop/mapreduce/hadoop-mapreduce-client-core-2.5.1.jar:/home/hadoop-2.5.1/contrib/capacity-scheduler/*.jar
-
STARTUP_MSG: build = https://git-wip-us.apache.org/repos/asf/hadoop.git -r 2e18d179e4a8065b6a9f29cf2de9451891265cce; compiled by 'jenkins' on 2014-09-05T23:11Z
-
STARTUP_MSG: java = 1.7.0_65
-
************************************************************/
-
14/09/21 11:57:22 INFO namenode.NameNode: registered UNIX signal handlers for [TERM, HUP, INT]
-
14/09/21 11:57:22 INFO namenode.NameNode: createNameNode [-format]
-
14/09/21 11:57:26 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable
-
Formatting using clusterid: CID-85e34a63-6cd7-4f1e-bbb9-add72ccaa660
-
14/09/21 11:57:29 INFO namenode.FSNamesystem: fsLock is fair:true
-
14/09/21 11:57:30 INFO blockmanagement.DatanodeManager: dfs.block.invalidate.limit=1000
-
14/09/21 11:57:30 INFO blockmanagement.DatanodeManager: dfs.namenode.datanode.registration.ip-hostname-check=true
-
14/09/21 11:57:30 INFO blockmanagement.BlockManager: dfs.namenode.startup.delay.block.deletion.sec is set to 000:00:00:00.000
-
14/09/21 11:57:30 INFO blockmanagement.BlockManager: The block deletion will start around 2014 九月 21 11:57:30
-
14/09/21 11:57:30 INFO util.GSet: Computing capacity for map BlocksMap
-
14/09/21 11:57:30 INFO util.GSet: VM type = 64-bit
-
14/09/21 11:57:30 INFO util.GSet: 2.0% max memory 966.7 MB = 19.3 MB
-
14/09/21 11:57:30 INFO util.GSet: capacity = 2^21 = 2097152 entries
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: dfs.block.access.token.enable=false
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: defaultReplication = 3
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: maxReplication = 512
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: minReplication = 1
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: maxReplicationStreams = 2
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: shouldCheckForEnoughRacks = false
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: replicationRecheckInterval = 3000
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: encryptDataTransfer = false
-
14/09/21 11:57:31 INFO blockmanagement.BlockManager: maxNumBlocksToLog = 1000
-
14/09/21 11:57:31 INFO namenode.FSNamesystem: fsOwner = root (auth:SIMPLE)
-
14/09/21 11:57:31 INFO namenode.FSNamesystem: supergroup = supergroup
-
14/09/21 11:57:31 INFO namenode.FSNamesystem: isPermissionEnabled = true
-
14/09/21 11:57:31 INFO namenode.FSNamesystem: Determined nameservice ID: hadoop-cluster1
-
14/09/21 11:57:31 INFO namenode.FSNamesystem: HA Enabled: false
-
14/09/21 11:57:31 INFO namenode.FSNamesystem: Append Enabled: true
-
14/09/21 11:57:33 INFO util.GSet: Computing capacity for map INodeMap
-
14/09/21 11:57:33 INFO util.GSet: VM type = 64-bit
-
14/09/21 11:57:33 INFO util.GSet: 1.0% max memory 966.7 MB = 9.7 MB
-
14/09/21 11:57:33 INFO util.GSet: capacity = 2^20 = 1048576 entries
-
14/09/21 11:57:33 INFO namenode.NameNode: Caching file names occuring more than 10 times
-
14/09/21 11:57:33 INFO util.GSet: Computing capacity for map cachedBlocks
-
14/09/21 11:57:33 INFO util.GSet: VM type = 64-bit
-
14/09/21 11:57:33 INFO util.GSet: 0.25% max memory 966.7 MB = 2.4 MB
-
14/09/21 11:57:33 INFO util.GSet: capacity = 2^18 = 262144 entries
-
14/09/21 11:57:33 INFO namenode.FSNamesystem: dfs.namenode.safemode.threshold-pct = 0.9990000128746033
-
14/09/21 11:57:33 INFO namenode.FSNamesystem: dfs.namenode.safemode.min.datanodes = 0
-
14/09/21 11:57:33 INFO namenode.FSNamesystem: dfs.namenode.safemode.extension = 30000
-
14/09/21 11:57:33 INFO namenode.FSNamesystem: Retry cache on namenode is enabled
-
14/09/21 11:57:33 INFO namenode.FSNamesystem: Retry cache will use 0.03 of total heap and retry cache entry expiry time is 600000 millis
-
14/09/21 11:57:33 INFO util.GSet: Computing capacity for map NameNodeRetryCache
-
14/09/21 11:57:33 INFO util.GSet: VM type = 64-bit
-
14/09/21 11:57:33 INFO util.GSet: 0.029999999329447746% max memory 966.7 MB = 297.0 KB
-
14/09/21 11:57:33 INFO util.GSet: capacity = 2^15 = 32768 entries
-
14/09/21 11:57:33 INFO namenode.NNConf: ACLs enabled? false
-
14/09/21 11:57:33 INFO namenode.NNConf: XAttrs enabled? true
-
14/09/21 11:57:33 INFO namenode.NNConf: Maximum size of an xattr: 16384
-
14/09/21 11:57:34 INFO namenode.FSImage: Allocated new BlockPoolId: BP-955896090-127.0.0.1-1411271853454
-
14/09/21 11:57:34 INFO common.Storage: Storage directory /home/hadoop/dfs/name has been successfully formatted.
-
14/09/21 11:57:36 INFO namenode.NNStorageRetentionManager: Going to retain 1 images with txid >= 0
-
14/09/21 11:57:36 INFO util.ExitUtil: Exiting with status 0
-
14/09/21 11:57:36 INFO namenode.NameNode: SHUTDOWN_MSG:
-
/************************************************************
-
SHUTDOWN_MSG: Shutting down NameNode at nameNode/127.0.0.1
-
************************************************************/
2.5.启动、停止服务
现在可以启动服务了
2.5.1.启动
-
[root@nameNode sbin]# ./start-dfs.sh
-
[root@nameNode sbin]# ./start-yarn.sh
2.5.2.停止
-
[root@nameNode sbin]# ./stop-dfs.sh
-
[root@nameNode sbin]# ./stop-yarn.sh
3.验证
3.1.查看启动的进程
-
[root@nameNode sbin]# jps
-
7854 Jps
-
7594 ResourceManager
-
7357 NameNode
3.2.通过浏览器访问
http://192.168.17.100:50070/
http://192.168.17.100:8088/
(责任编辑:IT) |