hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From st...@apache.org
Subject svn commit: r675347 - /hadoop/hbase/trunk/bin/Formatter.rb
Date Wed, 09 Jul 2008 21:29:46 GMT
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
 



Mime
View raw message