hbase shell 命令

来源:互联网 发布:天干地支算法年月日 编辑:程序博客网 时间:2024/06/05 01:04

推荐一个hbase官方文档网址(中文)
如果不喜欢看英文的话你会喜欢的:http://abloz.com/hbase/book.html#schema.creation
COMMAND GROUPS:
Group name: general
Commands: status, table_help, version, whoami

Group name: ddl
Commands: alter, alter_async, alter_status, create, describe, disable, disable_all, drop, drop_all, enable, enable_all, exists, get_table, is_disabled, is_enabled, list, show_filters

Group name: namespace
Commands: alter_namespace, create_namespace, describe_namespace, drop_namespace, list_namespace, list_namespace_tables

Group name: dml
Commands: append, count, delete, deleteall, get, get_counter, incr, put, scan, truncate, truncate_preserve

Group name: tools
Commands: assign, balance_switch, balancer, catalogjanitor_enabled, catalogjanitor_run, catalogjanitor_switch, close_region, compact, flush, hlog_roll, major_compact, merge_region, move, split, trace, unassign, zk_dump

Group name: replication
Commands: add_peer, disable_peer, enable_peer, list_peers, list_replicated_tables, remove_peer, set_peer_tableCFs, show_peer_tableCFs

Group name: snapshots
Commands: clone_snapshot, delete_snapshot, list_snapshots, rename_snapshot, restore_snapshot, snapshot

Group name: security
Commands: grant, revoke, user_permission

Group name: visibility labels
Commands: add_labels, clear_auths, get_auths, set_auths, set_visibility

举例:

创建一张表hbase(main):001:0> create ‘test’, ‘cf’
test为表名 cf为列簇名

向表中加数据hbase(main):003:0> put ‘test’, ‘row1’, ‘cf:a’, ‘value1’
以上命令的意思是
向test表中,rowkey为row1的这一行中的,列簇名为cf的该列簇下的列名为a的这一个cell赋值为value1