赞
踩
D:\hadoop-2.8.3\hadoop-2.8.3\sbin>start-all.cmd
D:\hadoop-2.8.3\hadoop-2.8.3\sbin>stop-all.cmd
start-all.sh等价于start-dfs.sh + start-yarn.sh
单进程启动。
sbin/start-dfs.sh
---------------
sbin/hadoop-daemons.sh --config .. --hostname .. start namenode ...
sbin/hadoop-daemons.sh --config .. --hostname .. start datanode ...
sbin/hadoop-daemons.sh --config .. --hostname .. start sescondarynamenode ...
sbin/hadoop-daemons.sh --config .. --hostname .. start zkfc ... //
sbin/start-yarn.sh
--------------
libexec/yarn-config.sh
sbin/yarn-daemon.sh --config $YARN_CONF_DIR start resourcemanager
sbin/yarn-daemons.sh --config $YARN_CONF_DIR start nodemanager
http://localhost:50070/explorer.html#/
hdfs dfs -mkdir -p /cmd_create_dir
hdfs dfs -put ./demo_mvn.jar /test/
hdfs dfs -touchz /cmd_create_dir/empty.txt
hdfs dfs -mv /cmd_create_dir/empty.txt /cmd_create_dir/rename_empty.txt
D:\GITSPACE\demo\out\artifacts\demo_mvn_jar>hadoop dfs -get /test/test.xml C:\Users\chang\Desktop\fsdownload\security
DEPRECATED: Use of this script to execute hdfs command is deprecated.
Instead use the hdfs command for it.
D:\GITSPACE\demo\out\artifacts\demo_mvn_jar>hdfs dfs -get /test/test.xml C:\Users\chang\Desktop\fsdownload\security
get: `C:/Users/chang/Desktop/fsdownload/security/test.xml': File exists
D:\GITSPACE\demo\out\artifacts\demo_mvn_jar>hdfs dfs -get /test/test.xml C:\Users\chang\Desktop\fsdownload\
hdfs dfs -get /cmd_create_dir C:\Users\chang\Desktop\fsdownload\
hadoop fs -rm -r -skipTrash /path_to_file/file_name
D:\GITSPACE\demo\out\artifacts\demo_mvn_jar>hadoop fs -rm -r -skipTrash /test/word_output_json
Deleted /test/word_output_json
hadoop fs -rm -r /test/new2
hadoop fs -cat /test/word_output_json/part-r-00000
hdfs dfs -ls /
hdfs dfs -cat /test/test.xml
hdfs dfs -lsr /
hdfs dfs -ls -d /path/to/directory
或者使用更详细的格式:
hdfs dfs -getfacl /path/to/file_or_directory
hdfs dfs -chown -R new_owner:new_group /path/to/file_or_directory
这里,-R选项表示递归地更改指定路径下所有文件和目录的拥有者。
hdfs dfs -chmod -R 755 /path/to/file_or_directory
D:\hbase-2.0.2-bin\hbase-2.0.2\bin>start-hbase.cmd
D:\hbase-2.0.2-bin\hbase-2.0.2\bin>hbase shell
status
create 'testtable','coln1'
list_namespace_tables 'default'
hbase(main):011:0> create_namespace 'testnamespace'
Took 0.2850 seconds
hbase(main):012:0> create 'testnamespace:testtable', 'coln1'
Created table testnamespace:testtable
Took 0.7770 seconds
=> Hbase::Table - testnamespace:testtable
hbase(main):013:0> list
hbase(main):023:0> put "testtable", "row1", "coln1",'zhangsan'
Took 0.1300 seconds
hbase(main):024:0> put "testtable", "row2", "coln1",'lisi'
Took 0.0020 seconds
hbase(main):027:0> get "testtable", "row1"
COLUMN CELL
coln1: timestamp=1639382832908, value=lisi
1 row(s)
Took 0.0180 seconds
hbase(main):028:0> get "testtable", "coln1"
COLUMN CELL
0 row(s)
Took 0.0040 seconds
hbase(main):029:0> get "testtable", "row1", "coln1"
COLUMN CELL
coln1: timestamp=1639382832908, value=lisi
1 row(s)
Took 0.0040 seconds
delete "testtable", "row1", "coln1"
deleteall "testtable", "row1"
hbase(main):071:0> disable "testtable"
Took 0.7690 seconds
hbase(main):072:0> drop "testtable"
Took 0.2570 seconds
hbase(main):073:0> drop "testtable1"
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。