$ hdfs namenode -format ... 21/01/10 14:38:44 INFO common.Storage: Storage directory /data/hadoop/hdfs/nn has been successfully formatted. ...
启动Hadoop
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
$ start-dfs.sh Starting namenodes on [master] The authenticity of host 'master (172.17.212.17)' can't be established. ECDSA key fingerprint is SHA256:aOcOvEQXhyzfs4i5vOBoM2raFUt7tqCo22B5zCS4Tto. Are you sure you want to continue connecting (yes/no)? yes master: Warning: Permanently added 'master,172.17.212.17' (ECDSA) to the list of known hosts. root@master's password: master: starting namenode, logging to /root/hadoop-2.10.1/logs/hadoop-root-namenode-master.out root@master's password: master: starting datanode, logging to /root/hadoop-2.10.1/logs/hadoop-root-datanode-master.out Starting secondary namenodes [0.0.0.0] The authenticity of host '0.0.0.0 (0.0.0.0)' can't be established. ECDSA key fingerprint is SHA256:aOcOvEQXhyzfs4i5vOBoM2raFUt7tqCo22B5zCS4Tto. Are you sure you want to continue connecting (yes/no)? yes 0.0.0.0: Warning: Permanently added '0.0.0.0' (ECDSA) to the list of known hosts. root@0.0.0.0's password: 0.0.0.0: starting secondarynamenode, logging to /root/hadoop-2.10.1/logs/hadoop-root-secondarynamenode-master.out
启动Yarn
1 2 3 4 5
$ start-yarn.sh starting yarn daemons starting resourcemanager, logging to /root/hadoop-2.10.1/logs/yarn-root-resourcemanager-master.out root@master's password: master: starting nodemanager, logging to /root/hadoop-2.10.1/logs/yarn-root-nodemanager-master.out
$ cd ~/hadoop-2.10.1/share/hadoop/mapreduce/ $ hadoop jar hadoop-mapreduce-examples-2.10.1.jar pi 5 5 ... Estimated value of Pi is 3.68000000000000000000