HBASE-780 Can't scan '.META.' from new shell

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@680215 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Michael Stack 2008-07-28 00:23:15 +00:00
parent 06c52615f8
commit a68ef955d1
3 changed files with 15 additions and 3 deletions

View File

@ -216,6 +216,7 @@ Release 0.2.0
expecting IllegalStateException expecting IllegalStateException
HBASE-766 FileNotFoundException trying to load HStoreFile 'data' HBASE-766 FileNotFoundException trying to load HStoreFile 'data'
HBASE-770 Update HBaseRPC to match hadoop 0.17 RPC HBASE-770 Update HBaseRPC to match hadoop 0.17 RPC
HBASE-780 Can't scan '.META.' from new shell
IMPROVEMENTS IMPROVEMENTS
HBASE-559 MR example job to count table rows HBASE-559 MR example job to count table rows

View File

@ -88,7 +88,7 @@ public class HTableDescriptor implements WritableComparable {
* Private constructor used internally creating table descriptors for * Private constructor used internally creating table descriptors for
* catalog tables: e.g. .META. and -ROOT-. * catalog tables: e.g. .META. and -ROOT-.
*/ */
private HTableDescriptor(final byte [] name, HColumnDescriptor[] families) { protected HTableDescriptor(final byte [] name, HColumnDescriptor[] families) {
this.name = name.clone(); this.name = name.clone();
setMetaFlags(name); setMetaFlags(name);
for(HColumnDescriptor descriptor : families) { for(HColumnDescriptor descriptor : families) {

View File

@ -36,10 +36,21 @@ public class UnmodifyableHTableDescriptor extends HTableDescriptor {
* @param desc * @param desc
*/ */
UnmodifyableHTableDescriptor(final HTableDescriptor desc) { UnmodifyableHTableDescriptor(final HTableDescriptor desc) {
super(desc.getName()); super(desc.getName(), getUnmodifyableFamilies(desc));
for (HColumnDescriptor c: desc.getFamilies()) {
super.addFamily(new UnmodifyableHColumnDescriptor(c));
} }
/*
* @param desc
* @return Families as unmodifiable array.
*/
private static HColumnDescriptor[] getUnmodifyableFamilies(
final HTableDescriptor desc) {
HColumnDescriptor [] f = new HColumnDescriptor[desc.getFamilies().size()];
int i = 0;
for (HColumnDescriptor c: desc.getFamilies()) {
f[i++] = c;
}
return f;
} }
/** /**