HBASE-7306 [shell] Count shell command to return ruby bindable value

git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1419654 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jonathan Hsieh 2012-12-10 18:45:17 +00:00
parent 5c39f7258e
commit 8c61fe6364
1 changed files with 6 additions and 5 deletions

View File

@ -22,11 +22,11 @@ module Shell
class Count < Command
def help
return <<-EOF
Count the number of rows in a table. This operation may take a LONG
time (Run '$HADOOP_HOME/bin/hadoop jar hbase.jar rowcount' to run a
counting mapreduce job). Current count is shown every 1000 rows by
default. Count interval may be optionally specified. Scan caching
is enabled on count scans by default. Default cache size is 10 rows.
Count the number of rows in a table. Return value is the number of rows.
This operation may take a LONG time (Run '$HADOOP_HOME/bin/hadoop jar
hbase.jar rowcount' to run a counting mapreduce job). Current count is shown
every 1000 rows by default. Count interval may be optionally specified. Scan
caching is enabled on count scans by default. Default cache size is 10 rows.
If your rows are small in size, you may want to increase this
parameter. Examples:
@ -66,6 +66,7 @@ EOF
formatter.row([ "Current count: #{cnt}, row: #{row}" ])
end
formatter.footer(now, count)
return count
end
end
end