You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by jm...@apache.org on 2012/12/10 19:45:18 UTC
svn commit: r1419654 -
/hbase/trunk/hbase-server/src/main/ruby/shell/commands/count.rb
Author: jmhsieh
Date: Mon Dec 10 18:45:17 2012
New Revision: 1419654
URL: http://svn.apache.org/viewvc?rev=1419654&view=rev
Log:
HBASE-7306 [shell] Count shell command to return ruby bindable value
Modified:
hbase/trunk/hbase-server/src/main/ruby/shell/commands/count.rb
Modified: hbase/trunk/hbase-server/src/main/ruby/shell/commands/count.rb
URL: http://svn.apache.org/viewvc/hbase/trunk/hbase-server/src/main/ruby/shell/commands/count.rb?rev=1419654&r1=1419653&r2=1419654&view=diff
==============================================================================
--- hbase/trunk/hbase-server/src/main/ruby/shell/commands/count.rb (original)
+++ hbase/trunk/hbase-server/src/main/ruby/shell/commands/count.rb Mon Dec 10 18:45:17 2012
@@ -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