[root@master ~]# start-dfs.sh Starting namenodes on [master] Last login: Sat Apr 16 20:09:41 CST 2022 from 192.168.166.1 on pts/0 Starting datanodes Last login: Sat Apr 16 20:13:05 CST 2022 on pts/0 Starting secondary namenodes [master] Last login: Sat Apr 16 20:13:07 CST 2022 on pts/0
运行脚本start-yarn.sh
1 2 3 4 5
[root@master ~]# start-yarn.sh Starting resourcemanager Last login: Sat Apr 16 20:13:14 CST 2022 on pts/0 Starting nodemanagers Last login: Sat Apr 16 20:32:18 CST 2022 on pts/0
将数据插入HDFS
创建本地文件
1
echo"I am xxx" > file.txt
1 2 3 4 5
[root@master ~]# echo "I am zzq" > file.txt [root@master ~]# ls anaconda-ks.cfg file.txt hadoop-3.1.4.tar.gz jdk-8u202-linux-x64.rpm [root@master ~]# cat file.txt I am zzq
[root@master ~]# stop-dfs.sh Stopping namenodes on [master] Last login: Sat Apr 16 20:32:20 CST 2022 on pts/0 Stopping datanodes Last login: Sat Apr 16 21:36:38 CST 2022 on pts/0 Stopping secondary namenodes [master] Last login: Sat Apr 16 21:36:39 CST 2022 on pts/0 [root@master ~]# stop-yarn.sh Stopping nodemanagers Last login: Sat Apr 16 21:36:41 CST 2022 on pts/0 Stopping resourcemanager Last login: Sat Apr 16 21:36:51 CST 2022 on pts/0