From e448a8105380ad27b070b58b5138b79fa983033d Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 25 Apr 2011 17:34:24 +0000 Subject: [PATCH] HBASE-3539 Improve shell help to reflect all possible options git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1096533 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ src/main/ruby/shell/commands/get.rb | 2 +- src/main/ruby/shell/commands/scan.rb | 14 +++++++++----- 3 files changed, 12 insertions(+), 6 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index 1e165aba010..697012663f3 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -84,6 +84,8 @@ Release 0.91.0 - Unreleased HBASE-3800 HMaster is not able to start due to AlreadyCreatedException HBASE-3806 distributed log splitting double escapes task names (Prakash Khemani) + HBASE-3539 Improve shell help to reflect all possible options + (Harsh J Chouraria) IMPROVEMENTS HBASE-3290 Max Compaction Size (Nicolas Spiegelberg via Stack) diff --git a/src/main/ruby/shell/commands/get.rb b/src/main/ruby/shell/commands/get.rb index 62272630f23..754c3d6b08f 100644 --- a/src/main/ruby/shell/commands/get.rb +++ b/src/main/ruby/shell/commands/get.rb @@ -24,7 +24,7 @@ module Shell def help return <<-EOF Get row or cell contents; pass table name, row, and optionally -a dictionary of column(s), timestamp and versions. Examples: +a dictionary of column(s), timestamp, timerange and versions. Examples: hbase> get 't1', 'r1' hbase> get 't1', 'r1', {TIMERANGE => [ts1, ts2]} diff --git a/src/main/ruby/shell/commands/scan.rb b/src/main/ruby/shell/commands/scan.rb index 4d722afa748..c68c6f1673b 100644 --- a/src/main/ruby/shell/commands/scan.rb +++ b/src/main/ruby/shell/commands/scan.rb @@ -24,15 +24,19 @@ module Shell def help return <<-EOF Scan a table; pass table name and optionally a dictionary of scanner -specifications. Scanner specifications may include one or more of -the following: LIMIT, STARTROW, STOPROW, TIMESTAMP, or COLUMNS. If -no columns are specified, all columns will be scanned. To scan all -members of a column family, leave the qualifier empty as in -'col_family:'. Examples: +specifications. Scanner specifications may include one or more of: +TIMERANGE, FILTER, LIMIT, STARTROW, STOPROW, TIMESTAMP, MAXLENGTH, +or COLUMNS. If no columns are specified, all columns will be scanned. +To scan all members of a column family, leave the qualifier empty as in +'col_family:'. + +Some examples: hbase> scan '.META.' hbase> scan '.META.', {COLUMNS => 'info:regioninfo'} hbase> scan 't1', {COLUMNS => ['c1', 'c2'], LIMIT => 10, STARTROW => 'xyz'} + hbase> scan 't1', {FILTER => org.apache.hadoop.hbase.filter.ColumnPaginationFilter.new(1, 0)} + hbase> scan 't1', {COLUMNS => 'c1', TIMERANGE => [1303668804, 1303668904]} For experts, there is an additional option -- CACHE_BLOCKS -- which switches block caching for the scanner on (true) or off (false). By