HBaseShellPro is a powerful Hbase Shell extention.
1. Can use filter in all command
2. Can use Regular Expression in command parameter
3. Log all command output
4. More simple more lighter then hbase shell
Now it support hbase-0.20.4, hbase-0.94.2(https://github.com/bit-ware/HBaseShellPro/tree/0.94)
MIT License (see LICENSE)
1. vi conf/hbase-site.xml
modify hbase.zookeeper.quorum
2. run.rb
- WARNING : ‘clear’(and its alias) will clear contents of all tables in database
- NOTE : use ‘clear! …’ to force clear
usage : clear [table_pattern]
example : clear ^test_table
alias : [c, cle, clr]
- NOTE: for permanent change of quorums, modify hosts file
[windows: C:\Windows\System32\drivers\etc\hosts / linux: /etc/hosts]
or change value of ‘hbase.zookeeper.quorum’ in conf/hbase-site.xml
usage : connect [quorums_separated_by_comma]
example : connect 172.17.1.206
alias : [con]
usage : create table_name family_name1 [family_name2 …]
example : create test_table family1 family2
alias : [cre]
- WARNING : ‘delete’(and its alias) will delete all tables in database
- NOTE : use ‘delete! …’ to force delete
usage : delete [table_pattern [row_pattern [family_pattern [qualifier_pattern [value_pattern]]]]]
example : delete ^test_table family1
alias : [del]
usage : describe [table_pattern [family_pattern]]
example : describe ^135530186920f18b9049b0a0743e86ac3185887c5d
alias : [d, des]
usage : filter [table_pattern [row_pattern [family_pattern [qualifier_pattern [value_pattern]]]]] other_pattern
example : filter ^135530186920f18b9049b0a0743e86ac3185887c5d fullpath
alias : [f]
usage : get [table_name [row_key [family_name [qualifier_name]]]]
example : get 135530186920f18b9049b0a0743e86ac3185887c5d f30dab5e-4b42-11e2-b324-998f21848d86file
alias : [g]
usage : help [topic1 [topic2 …]]
example : help filter get
alias : [h]
usage : history [count [pattern]]
example : history 3 get
alias : [his]
usage : list [table_pattern [row_pattern [family_pattern [qualifier_pattern [value_pattern]]]]]
example : list ^135530186920f18b9049b0a0743e86ac3185887c5d file
alias : [l, ls]
usage : put table_name row_key family_name qualifier_name value
example : put test_table row1 family1 qualifier1 value1
alias : [p]
usage : quit
example : quit
alias : [e, q, exit]
usage : rename old_table_name new_table_name
example : rename test_table test_table2
alias : [r, ren]
usage : scan [table_pattern [row_pattern [family_pattern [qualifier_pattern [value_pattern]]]]]
example : scan ^135530186920f18b9049b0a0743e86ac3185887c5d . fileinfo
alias : [s]
usage : version
example : version
alias : [v, ver]
- all control keys are not usable before jline added
- thanks to jline, arrow left/right/up/down are usable, but
- backspace and delete are switched (resolved by MyUnixTerminal)
- home/end, page up/down are not usable (resolved by MyConsoleReader partially)
- the following text in pasting text will act as control keys
- ‘1~’ → home, go to begin of line
- ‘2~’ → insert, do nothing
- ‘4~’ → end, go to end of line
- ‘5~’ → page up, move to first history entry
- ‘6~’ → page down, move to last history entry
Xia Xiongjun
BitWare Inc. (http://www.bit-ware.co.jp [email protected])