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:
parent
d6522ebe2d
commit
d5f2595cee
|
@ -193,6 +193,7 @@ Trunk (unreleased changes)
|
|||
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-43 Add a read-only attribute to columns (Andrew Purtell via Stack)
|
||||
HBASE-424 Should be able to enable/disable .META. table
|
||||
|
||||
IMPROVEMENTS
|
||||
HBASE-559 MR example job to count table rows
|
||||
|
|
|
@ -312,7 +312,6 @@ public class HBaseAdmin {
|
|||
if (this.master == null) {
|
||||
throw new MasterNotRunningException("master has been shut down");
|
||||
}
|
||||
HTableDescriptor.isLegalTableName(tableName);
|
||||
try {
|
||||
this.master.enableTable(tableName);
|
||||
} catch (RemoteException e) {
|
||||
|
@ -373,7 +372,6 @@ public class HBaseAdmin {
|
|||
if (this.master == null) {
|
||||
throw new MasterNotRunningException("master has been shut down");
|
||||
}
|
||||
HTableDescriptor.isLegalTableName(tableName);
|
||||
try {
|
||||
this.master.disableTable(tableName);
|
||||
} catch (RemoteException e) {
|
||||
|
|
|
@ -519,6 +519,11 @@ class RegionManager implements HConstants {
|
|||
byte [] firstMetaRegion = null;
|
||||
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) {
|
||||
if (onlineMetaRegions.size() == 1) {
|
||||
firstMetaRegion = onlineMetaRegions.firstKey();
|
||||
|
@ -529,6 +534,7 @@ class RegionManager implements HConstants {
|
|||
}
|
||||
metaRegions.addAll(onlineMetaRegions.tailMap(firstMetaRegion).values());
|
||||
}
|
||||
}
|
||||
return metaRegions;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue