HBASE-853 [shell] Cannot describe meta tables

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@703024 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-10-08 23:41:17 +00:00
parent c75ea989d6
commit 0a3560ccea
3 changed files with 6 additions and 1 deletions

View File

@ -13,6 +13,7 @@ Release 0.19.0 - Unreleased
(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

View File

@ -55,7 +55,9 @@ module HBase
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

View File

@ -95,6 +95,7 @@ public class HTableDescriptor implements WritableComparable {
*/
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 @@ public class HTableDescriptor implements WritableComparable {
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);