- 查看与关闭防火墙
1.Ubuntu(ubuntu-12.04-desktop-amd64)
查看防火墙状态:ufw status
关闭防火墙:ufw disable
2.centos6.0
查看防火墙状态:service iptables status
关闭防火墙:chkconfig iptables off #开机不启动防火墙服务
3.centos7.0(默认是使用firewall作为防火墙,如若未改为iptables防火墙,使用以下命令查看和关闭防火墙)
查看防火墙状态:firewall-cmd --state
关闭防火墙:systemctl stop firewalld.service
- 运行实例
hadoop fs -mkdir -p /in/test
mkdir -p input/f{1..3}.txt
echo "hello aaa" > input/f1.txt'
echo "hello bbb" > input/f2.txt'
echo "hello ccc" > input/f3.txt'
hadoop fs -put input/* /in/test/
[root@bing0 hadoop-3.0.0]# yarn jar /opt/hadoop/hadoop-3.0.0/share/hadoop/mapreduce/hadoop-mapreduce-examples-3.0.0.jar wordcount /in/test/ /out/wc
[root@bing0 hadoop-3.0.0]# hadoop fs -cat /out/wc/part-r-00000
网友评论