HBASE-424 Should be able to enable/disable .META. table

git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@677684 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Jim Kellerman 2008-07-17 18:54:25 +00:00
parent d6522ebe2d
commit d5f2595cee
3 changed files with 15 additions and 10 deletions

View File

@ -193,6 +193,7 @@ Trunk (unreleased changes)
HBASE-34 Set memcache flush size per column (Andrew Purtell via Stack) HBASE-34 Set memcache flush size per column (Andrew Purtell via Stack)
HBASE-42 Set region split size on table creation (Andrew Purtell via Stack) HBASE-42 Set region split size on table creation (Andrew Purtell via Stack)
HBASE-43 Add a read-only attribute to columns (Andrew Purtell via Stack) HBASE-43 Add a read-only attribute to columns (Andrew Purtell via Stack)
HBASE-424 Should be able to enable/disable .META. table
IMPROVEMENTS IMPROVEMENTS
HBASE-559 MR example job to count table rows HBASE-559 MR example job to count table rows

View File

@ -312,7 +312,6 @@ public class HBaseAdmin {
if (this.master == null) { if (this.master == null) {
throw new MasterNotRunningException("master has been shut down"); throw new MasterNotRunningException("master has been shut down");
} }
HTableDescriptor.isLegalTableName(tableName);
try { try {
this.master.enableTable(tableName); this.master.enableTable(tableName);
} catch (RemoteException e) { } catch (RemoteException e) {
@ -373,7 +372,6 @@ public class HBaseAdmin {
if (this.master == null) { if (this.master == null) {
throw new MasterNotRunningException("master has been shut down"); throw new MasterNotRunningException("master has been shut down");
} }
HTableDescriptor.isLegalTableName(tableName);
try { try {
this.master.disableTable(tableName); this.master.disableTable(tableName);
} catch (RemoteException e) { } catch (RemoteException e) {

View File

@ -519,6 +519,11 @@ class RegionManager implements HConstants {
byte [] firstMetaRegion = null; byte [] firstMetaRegion = null;
Set<MetaRegion> metaRegions = new HashSet<MetaRegion>(); Set<MetaRegion> metaRegions = new HashSet<MetaRegion>();
if (Bytes.equals(tableName, HConstants.META_TABLE_NAME)) {
metaRegions.add(new MetaRegion(rootRegionLocation.get(),
HRegionInfo.ROOT_REGIONINFO.getRegionName()));
} else {
synchronized (onlineMetaRegions) { synchronized (onlineMetaRegions) {
if (onlineMetaRegions.size() == 1) { if (onlineMetaRegions.size() == 1) {
firstMetaRegion = onlineMetaRegions.firstKey(); firstMetaRegion = onlineMetaRegions.firstKey();
@ -529,6 +534,7 @@ class RegionManager implements HConstants {
} }
metaRegions.addAll(onlineMetaRegions.tailMap(firstMetaRegion).values()); metaRegions.addAll(onlineMetaRegions.tailMap(firstMetaRegion).values());
} }
}
return metaRegions; return metaRegions;
} }