记下常用命令,慢慢补充
1.hadoop
查看hdfs上的目录: hadoop fs -ls /
给hdfs上目录授予权限: hadoop fs -chmod 777 /tmp/hive
在hdfs上创建一个目录: hadoop fs -mkdir /jiatest
把文件上传到hdfs指定目录: hadoop fs -put test.txt /jiatest
上传jar包到hadoop上跑: hadoop jar maven_test-1.0-SNAPSHOT.jar org.jiahong.test.WordCount /jiatest /jiatest/output
查看结果: hadoop fs -cat /jiatest/output/part-r-00000
提交hadoop jar包运行:bin/hadoop jar /home/hadoop/hjh/jar/hadoopTest.jar com.jia.WordCount /test/input /test/output
2.linux
把本地文件上传到集群:scp maven_test-1.0-SNAPSHOT.jar root@121.8.228.23:/home/hadoop/jia/