切换到Hadoop目录:
cd /usr/local/hadoop
Hadoop启动:
./sbin/start-dfs.sh
Hadoop关闭:
sbin/stop-dfs.sh
NameNode格式化:
./bin/hdfs namenode -format
HDFS查看当前用户目录中所有内容:
./bin/hdfs dfs -ls .
新建/user/hadoop/...目录:
./bin/hdfs dfs -mkdir ...
删除/user/hadoop/...目录:
./bin/hdfs dfs -rm -r ...
将本地文件传入HDFS,并查看是否传入成功:
./bin/hdfs dfs -put /home/hadoop/myLocalFile.txt input
./bin/hdfs dfs -ls input
查看文件具体内容:
./bin/hdfs dfs -cat input/myLocalFile.txt
切换到HBase目录:
cd /usr/local/hbase
HBase启动:
bin/start-hbase.sh
HBase关闭:
bin/stop-hbase.sh