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