You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2008/07/09 23:29:46 UTC
svn commit: r675347 - /hadoop/hbase/trunk/bin/Formatter.rb
Author: stack
Date: Wed Jul 9 14:29:46 2008
New Revision: 675347
URL: http://svn.apache.org/viewvc?rev=675347&view=rev
Log:
HBASE-732 shell formatting error with the describe command
Modified:
hadoop/hbase/trunk/bin/Formatter.rb
Modified: hadoop/hbase/trunk/bin/Formatter.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/bin/Formatter.rb?rev=675347&r1=675346&r2=675347&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/Formatter.rb (original)
+++ hadoop/hbase/trunk/bin/Formatter.rb Wed Jul 9 14:29:46 2008
@@ -77,7 +77,7 @@
result = []
index = 0
while index < str.length do
- result << str.slice(index, index + width)
+ result << str.slice(index, width)
index += width
end
result
@@ -121,11 +121,13 @@
# Do a bit of testing.
if $0 == __FILE__
formatter = Console.new(STDOUT)
+ now = Time.now
formatter.header(['a', 'b'])
formatter.row(['a', 'b'])
formatter.row(['xxxxxxxxx xxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxxxxxx'])
formatter.row(['yyyyyy yyyyyy yyyyy yyy', 'xxxxxxxxx xxxxxxxxxxx xxxxxxxxxxx xxxxxxxxxxxx xxxxxxxxx xxxxxxxxxxxx xxxxxxxxxxxxxxx xxxxxxxxx xxxxxxxxxxxxxx xxx xx x xx xxx xx xx xx x xx x x xxx x x xxx x x xx x x x x x x xx '])
- formatter.footer()
+ formatter.row(["NAME => 'table1', FAMILIES => [{NAME => 'fam2', VERSIONS => 3, COMPRESSION => 'NONE', IN_MEMORY => false, BLOCKCACHE => false, LENGTH => 2147483647, TTL => FOREVER, BLOOMFILTER => NONE}, {NAME => 'fam1', VERSIONS => 3, COMPRESSION => 'NONE', IN_MEMORY => false, BLOCKCACHE => false, LENGTH => 2147483647, TTL => FOREVER, BLOOMFILTER => NONE}]"])
+ formatter.footer(now)
end
end