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/10/09 01:41:19 UTC

svn commit: r703024 - in /hadoop/hbase/trunk: CHANGES.txt bin/HBase.rb src/java/org/apache/hadoop/hbase/HTableDescriptor.java

Author: stack
Date: Wed Oct  8 16:41:17 2008
New Revision: 703024

URL: http://svn.apache.org/viewvc?rev=703024&view=rev
Log:
HBASE-853  [shell] Cannot describe meta tables

Modified:
    hadoop/hbase/trunk/CHANGES.txt
    hadoop/hbase/trunk/bin/HBase.rb
    hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java

Modified: hadoop/hbase/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/CHANGES.txt?rev=703024&r1=703023&r2=703024&view=diff
==============================================================================
--- hadoop/hbase/trunk/CHANGES.txt (original)
+++ hadoop/hbase/trunk/CHANGES.txt Wed Oct  8 16:41:17 2008
@@ -13,6 +13,7 @@
                (Doğacan Güney via Jim Kellerman)
    HBASE-906   [shell] Truncates output
    HBASE-912   PE is broken when other tables exist
+   HBASE-853    [shell] Cannot describe meta tables (Izaak Rubin via Stack)
 
   IMPROVEMENTS
    HBASE-901   Add a limit to key length, check key and value length on client side

Modified: hadoop/hbase/trunk/bin/HBase.rb
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/bin/HBase.rb?rev=703024&r1=703023&r2=703024&view=diff
==============================================================================
--- hadoop/hbase/trunk/bin/HBase.rb (original)
+++ hadoop/hbase/trunk/bin/HBase.rb Wed Oct  8 16:41:17 2008
@@ -55,7 +55,9 @@
       now = Time.now 
       @formatter.header()
       found = false
-      for t in @admin.listTables()
+      tables = @admin.listTables().to_a
+      tables.push(HTableDescriptor::META_TABLEDESC, HTableDescriptor::ROOT_TABLEDESC)
+      for t in tables
         if t.getNameAsString() == tableName
           @formatter.row([t.to_s])
           found = true

Modified: hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java
URL: http://svn.apache.org/viewvc/hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java?rev=703024&r1=703023&r2=703024&view=diff
==============================================================================
--- hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java (original)
+++ hadoop/hbase/trunk/src/java/org/apache/hadoop/hbase/HTableDescriptor.java Wed Oct  8 16:41:17 2008
@@ -95,6 +95,7 @@
    */
   protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families) {
     this.name = name.clone();
+    this.nameAsString = Bytes.toString(this.name);
     setMetaFlags(name);
     for(HColumnDescriptor descriptor : families) {
       this.families.put(Bytes.mapKey(descriptor.getName()), descriptor);
@@ -108,6 +109,7 @@
   protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families,
        Map<ImmutableBytesWritable,ImmutableBytesWritable> values) {
     this.name = name.clone();
+    this.nameAsString = Bytes.toString(this.name);
     setMetaFlags(name);
     for(HColumnDescriptor descriptor : families) {
       this.families.put(Bytes.mapKey(descriptor.getName()), descriptor);