1, 关闭Hadoop安全模式
进入hdfs用户 su – hdfs
Cd /opt/cloudera/parcels/CDH-5.12.1-1.cdh5.12.1.p0.3/bin
hdfs dfsadmin -safemode leave
2, 执行teragen生成数据
./hadoop jar ../lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar teragen 10000000 /opt/test/
3, 查看是否生成数据
./Hadoop fs –ls /opt/test/
4, 使用terasort排序
./hadoop jar ../lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar terasort /opt/test/ /opt/1T-output
5, 查看是否完成排序
./hadoop fs -ls /opt/1T-output
6, 使用TeraValidate 对Terasort的结果进行验证
./hadoop jar ../lib/hadoop-mapreduce/hadoop-mapreduce-examples.jar teravalidate /opt/1T-output /opt/1T-validate