Index: hbase-shell/src/main/ruby/shell/commands/alter.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/alter.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/alter.rb (working copy) @@ -38,10 +38,10 @@ hbase> alter 't1', 'f1', {NAME => 'f2', IN_MEMORY => true}, {NAME => 'f3', VERSIONS => 5} -To delete the 'f1' column family in table 't1', use one of: +To delete the 'f1' column family in table 'ns1:t1', use one of: - hbase> alter 't1', NAME => 'f1', METHOD => 'delete' - hbase> alter 't1', 'delete' => 'f1' + hbase> alter 'ns1:t1', NAME => 'f1', METHOD => 'delete' + hbase> alter 'ns1:t1', 'delete' => 'f1' You can also change table-scope attributes like MAX_FILESIZE, READONLY, MEMSTORE_FLUSHSIZE, DEFERRED_LOG_FLUSH, etc. These can be put at the end; Index: hbase-shell/src/main/ruby/shell/commands/alter_async.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/alter_async.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/alter_async.rb (working copy) @@ -32,13 +32,13 @@ hbase> alter_async 't1', NAME => 'f1', VERSIONS => 5 -To delete the 'f1' column family in table 't1', do: +To delete the 'f1' column family in table 'ns1:t1', do: - hbase> alter_async 't1', NAME => 'f1', METHOD => 'delete' + hbase> alter_async 'ns1:t1', NAME => 'f1', METHOD => 'delete' or a shorter version: - hbase> alter_async 't1', 'delete' => 'f1' + hbase> alter_async 'ns1:t1', 'delete' => 'f1' You can also change table-scope attributes like MAX_FILESIZE MEMSTORE_FLUSHSIZE, READONLY, and DEFERRED_LOG_FLUSH. Index: hbase-shell/src/main/ruby/shell/commands/alter_status.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/alter_status.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/alter_status.rb (working copy) @@ -27,6 +27,7 @@ Pass table name. hbase> alter_status 't1' +hbase> alter_status 'ns1:t1' EOF end def command(table) Index: hbase-shell/src/main/ruby/shell/commands/clone_snapshot.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/clone_snapshot.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/clone_snapshot.rb (working copy) @@ -27,6 +27,7 @@ Examples: hbase> clone_snapshot 'snapshotName', 'tableName' + hbase> clone_snapshot 'snapshotName', 'namespace:tableName' EOF end Index: hbase-shell/src/main/ruby/shell/commands/close_region.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/close_region.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/close_region.rb (working copy) @@ -30,6 +30,8 @@ name looks like this: TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396. +or + Namespace:TestTable,0094429456,1289497600452.527db22f95c8a9e0116f0cc13c680396. The trailing period is part of the regionserver name. A region's encoded name is the hash at the end of a region name; e.g. 527db22f95c8a9e0116f0cc13c680396 Index: hbase-shell/src/main/ruby/shell/commands/compact.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/compact.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/compact.rb (working copy) @@ -27,6 +27,7 @@ family within a region. Examples: Compact all regions in a table: + hbase> compact 'ns1:t1' hbase> compact 't1' Compact an entire region: hbase> compact 'r1' Index: hbase-shell/src/main/ruby/shell/commands/count.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/count.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/count.rb (working copy) @@ -30,6 +30,7 @@ If your rows are small in size, you may want to increase this parameter. Examples: + hbase> count 'ns1:t1' hbase> count 't1' hbase> count 't1', INTERVAL => 100000 hbase> count 't1', CACHE => 1000 Index: hbase-shell/src/main/ruby/shell/commands/create.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/create.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/create.rb (working copy) @@ -29,7 +29,10 @@ including NAME attribute. Examples: - hbase> create 't1', {NAME => 'f1', VERSIONS => 5} +Create a table with namespace=ns1 and table qualifier=t1 + hbase> create 'ns1:t1', {NAME => 'f1', VERSIONS => 5} + +Create a table with namespace=default and table qualifier=t1 hbase> create 't1', {NAME => 'f1'}, {NAME => 'f2'}, {NAME => 'f3'} hbase> # The above in shorthand would be the following: hbase> create 't1', 'f1', 'f2', 'f3' @@ -39,6 +42,7 @@ Table configuration options can be put at the end. Examples: + hbase> create 'ns1:t1', 'f1', SPLITS => ['10', '20', '30', '40'] hbase> create 't1', 'f1', SPLITS => ['10', '20', '30', '40'] hbase> create 't1', 'f1', SPLITS_FILE => 'splits.txt', OWNER => 'johndoe' hbase> create 't1', {NAME => 'f1', VERSIONS => 5}, METADATA => { 'mykey' => 'myvalue' } Index: hbase-shell/src/main/ruby/shell/commands/delete.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/delete.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/delete.rb (working copy) @@ -28,6 +28,7 @@ versions. To delete a cell from 't1' at row 'r1' under column 'c1' marked with the time 'ts1', do: + hbase> delete 'ns1:t1', 'r1', 'c1', ts1 hbase> delete 't1', 'r1', 'c1', ts1 The same command can also be run on a table reference. Suppose you had a reference Index: hbase-shell/src/main/ruby/shell/commands/deleteall.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/deleteall.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/deleteall.rb (working copy) @@ -25,6 +25,7 @@ Delete all cells in a given row; pass a table name, row, and optionally a column and timestamp. Examples: + hbase> deleteall 'ns1:t1', 'r1' hbase> deleteall 't1', 'r1' hbase> deleteall 't1', 'r1', 'c1' hbase> deleteall 't1', 'r1', 'c1', ts1 Index: hbase-shell/src/main/ruby/shell/commands/describe.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/describe.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/describe.rb (working copy) @@ -24,6 +24,7 @@ return <<-EOF Describe the named table. For example: hbase> describe 't1' + hbase> describe 'ns1:t1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/disable.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/disable.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/disable.rb (working copy) @@ -22,7 +22,9 @@ class Disable < Command def help return <<-EOF -Start disable of named table: e.g. "hbase> disable 't1'" +Start disable of named table: + hbase> disable 't1' + hbase> disable 'ns1:t1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/disable_all.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/disable_all.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/disable_all.rb (working copy) @@ -25,6 +25,8 @@ Disable all of tables matching the given regex: hbase> disable_all 't.*' +hbase> disable_all 'ns:t.*' +hbase> disable_all 'ns:.*' EOF end Index: hbase-shell/src/main/ruby/shell/commands/drop.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/drop.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/drop.rb (working copy) @@ -22,7 +22,9 @@ class Drop < Command def help return <<-EOF -Drop the named table. Table must first be disabled: e.g. "hbase> drop 't1'" +Drop the named table. Table must first be disabled: + hbase> drop 't1' + hbase> drop 'ns1:t1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/drop_all.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/drop_all.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/drop_all.rb (working copy) @@ -25,6 +25,8 @@ Drop all of the tables matching the given regex: hbase> drop_all 't.*' +hbase> drop_all 'ns:t.*' +hbase> drop_all 'ns:.*' EOF end Index: hbase-shell/src/main/ruby/shell/commands/enable.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/enable.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/enable.rb (working copy) @@ -22,7 +22,9 @@ class Enable < Command def help return <<-EOF -Start enable of named table: e.g. "hbase> enable 't1'" +Start enable of named table: + hbase> enable 't1' + hbase> enable 'ns1:t1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/enable_all.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/enable_all.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/enable_all.rb (working copy) @@ -25,6 +25,8 @@ Enable all of the tables matching the given regex: hbase> enable_all 't.*' +hbase> enable_all 'ns:t.*' +hbase> enable_all 'ns:.*' EOF end Index: hbase-shell/src/main/ruby/shell/commands/exists.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/exists.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/exists.rb (working copy) @@ -22,7 +22,9 @@ class Exists < Command def help return <<-EOF -Does the named table exist? e.g. "hbase> exists 't1'" +Does the named table exist? + hbase> exists 't1' + hbase> exists 'ns1:t1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/get.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/get.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/get.rb (working copy) @@ -25,6 +25,7 @@ Get row or cell contents; pass table name, row, and optionally a dictionary of column(s), timestamp, timerange and versions. Examples: + hbase> get 'ns1:t1', 'r1' hbase> get 't1', 'r1' hbase> get 't1', 'r1', {TIMERANGE => [ts1, ts2]} hbase> get 't1', 'r1', {COLUMN => 'c1'} Index: hbase-shell/src/main/ruby/shell/commands/get_counter.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/get_counter.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/get_counter.rb (working copy) @@ -26,6 +26,7 @@ A cell cell should be managed with atomic increment function oh HBase and the data should be binary encoded. Example: + hbase> get_counter 'ns1:t1', 'r1', 'c1' hbase> get_counter 't1', 'r1', 'c1' The same commands also can be run on a table reference. Suppose you had a reference Index: hbase-shell/src/main/ruby/shell/commands/get_table.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/get_table.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/get_table.rb (working copy) @@ -27,6 +27,7 @@ Eg. hbase> t1 = get_table 't1' + hbase> t1 = get_table 'ns1:t1' returns the table named 't1' as a table object. You can then do Index: hbase-shell/src/main/ruby/shell/commands/grant.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/grant.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/grant.rb (working copy) @@ -31,6 +31,7 @@ hbase> grant 'bobsmith', 'RWXCA' hbase> grant 'bobsmith', 'RW', 't1', 'f1', 'col1' + hbase> grant 'bobsmith', 'RW', 'ns1:t1', 'f1', 'col1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/incr.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/incr.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/incr.rb (working copy) @@ -23,9 +23,10 @@ def help return <<-EOF Increments a cell 'value' at specified table/row/column coordinates. -To increment a cell value in table 't1' at row 'r1' under column +To increment a cell value in table 'ns1:t1' or 't1' at row 'r1' under column 'c1' by 1 (can be omitted) or 10 do: + hbase> incr 'ns1:t1', 'r1', 'c1' hbase> incr 't1', 'r1', 'c1' hbase> incr 't1', 'r1', 'c1', 1 hbase> incr 't1', 'r1', 'c1', 10 Index: hbase-shell/src/main/ruby/shell/commands/is_disabled.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/is_disabled.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/is_disabled.rb (working copy) @@ -22,7 +22,9 @@ class IsDisabled < Command def help return <<-EOF -Is named table disabled?: e.g. "hbase> is_disabled 't1'" +Is named table disabled? For example: + hbase> is_disabled 't1' + hbase> is_disabled 'ns1:t1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/is_enabled.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/is_enabled.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/is_enabled.rb (working copy) @@ -22,7 +22,9 @@ class IsEnabled < Command def help return <<-EOF -Is named table enabled?: e.g. "hbase> is_enabled 't1'" +Is named table enabled? For example: + hbase> is_enabled 't1' + hbase> is_enabled 'ns1:t1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/list.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/list.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/list.rb (working copy) @@ -27,6 +27,8 @@ hbase> list hbase> list 'abc.*' + hbase> list 'ns:abc.*' + hbase> list 'ns:.*' EOF end Index: hbase-shell/src/main/ruby/shell/commands/major_compact.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/major_compact.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/major_compact.rb (working copy) @@ -29,6 +29,7 @@ Examples: Compact all regions in a table: hbase> major_compact 't1' + hbase> major_compact 'ns1:t1' Compact an entire region: hbase> major_compact 'r1' Compact a single column family within a region: Index: hbase-shell/src/main/ruby/shell/commands/put.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/put.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/put.rb (working copy) @@ -23,10 +23,10 @@ def help return <<-EOF Put a cell 'value' at specified table/row/column and optionally -timestamp coordinates. To put a cell value into table 't1' at -row 'r1' under column 'c1' marked with the time 'ts1', do: +timestamp coordinates. To put a cell value into table 'ns1:t1' or 't1' +at row 'r1' under column 'c1' marked with the time 'ts1', do: - hbase> put 't1', 'r1', 'c1', 'value', ts1 + hbase> put 'ns1:t1', 'r1', 'c1', 'value', ts1 The same commands also can be run on a table reference. Suppose you had a reference t to table 't1', the corresponding command would be: Index: hbase-shell/src/main/ruby/shell/commands/revoke.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/revoke.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/revoke.rb (working copy) @@ -27,6 +27,7 @@ hbase> revoke 'bobsmith' hbase> revoke 'bobsmith', 't1', 'f1', 'col1' + hbase> revoke 'bobsmith', 'ns1:t1', 'f1', 'col1' EOF end Index: hbase-shell/src/main/ruby/shell/commands/scan.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/scan.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/scan.rb (working copy) @@ -40,6 +40,7 @@ hbase> scan 'hbase:meta' hbase> scan 'hbase:meta', {COLUMNS => 'info:regioninfo'} + hbase> scan 'ns1:t1', {COLUMNS => ['c1', 'c2'], LIMIT => 10, STARTROW => 'xyz'} hbase> scan 't1', {COLUMNS => ['c1', 'c2'], LIMIT => 10, STARTROW => 'xyz'} hbase> scan 't1', {COLUMNS => 'c1', TIMERANGE => [1303668804, 1303668904]} hbase> scan 't1', {FILTER => "(PrefixFilter ('row2') AND Index: hbase-shell/src/main/ruby/shell/commands/snapshot.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/snapshot.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/snapshot.rb (working copy) @@ -24,6 +24,7 @@ Take a snapshot of specified table. Examples: hbase> snapshot 'sourceTable', 'snapshotName' + hbase> snapshot 'namespace:sourceTable', 'snapshotName' EOF end Index: hbase-shell/src/main/ruby/shell/commands/split.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/split.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/split.rb (working copy) @@ -26,6 +26,7 @@ second parameter, you can specify an explicit split key for the region. Examples: split 'tableName' + split 'namespace:tableName' split 'regionName' # format: 'tableName,startKey,id' split 'tableName', 'splitKey' split 'regionName', 'splitKey' Index: hbase-shell/src/main/ruby/shell/commands/user_permission.rb =================================================================== --- hbase-shell/src/main/ruby/shell/commands/user_permission.rb (revision 1566762) +++ hbase-shell/src/main/ruby/shell/commands/user_permission.rb (working copy) @@ -27,6 +27,7 @@ hbase> user_permission hbase> user_permission 'table1' + hbase> user_permission 'namespace1:table1' EOF end