Return-Path: Delivered-To: apmail-hadoop-hbase-commits-archive@locus.apache.org Received: (qmail 71996 invoked from network); 9 Jul 2008 21:30:07 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 9 Jul 2008 21:30:07 -0000 Received: (qmail 87421 invoked by uid 500); 9 Jul 2008 21:30:08 -0000 Delivered-To: apmail-hadoop-hbase-commits-archive@hadoop.apache.org Received: (qmail 87402 invoked by uid 500); 9 Jul 2008 21:30:08 -0000 Mailing-List: contact hbase-commits-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: hbase-dev@hadoop.apache.org Delivered-To: mailing list hbase-commits@hadoop.apache.org Received: (qmail 87393 invoked by uid 99); 9 Jul 2008 21:30:08 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 14:30:08 -0700 X-ASF-Spam-Status: No, hits=-1996.8 required=10.0 tests=ALL_TRUSTED,LONGWORDS X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 09 Jul 2008 21:29:24 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 1A20D2388A07; Wed, 9 Jul 2008 14:29:47 -0700 (PDT) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r675347 - /hadoop/hbase/trunk/bin/Formatter.rb Date: Wed, 09 Jul 2008 21:29:46 -0000 To: hbase-commits@hadoop.apache.org From: stack@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20080709212947.1A20D2388A07@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org 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