HBASE-13313 Skip the disabled table in mob compaction chore and MasterRpcServices.(Jingcheng)
This commit is contained in:
parent
fe389d1f19
commit
eba8a708a5
|
@ -1371,6 +1371,9 @@ public class MasterRpcServices extends RSRpcServices
|
|||
*/
|
||||
private CompactRegionResponse compactMob(final CompactRegionRequest request,
|
||||
TableName tableName) throws IOException {
|
||||
if (!master.getTableStateManager().isTableState(tableName, TableState.State.ENABLED)) {
|
||||
throw new DoNotRetryIOException("Table " + tableName + " is not enabled");
|
||||
}
|
||||
boolean isForceAllFiles = false;
|
||||
List<HColumnDescriptor> compactedColumns = new ArrayList<HColumnDescriptor>();
|
||||
HColumnDescriptor[] hcds = master.getTableDescriptors().get(tableName).getColumnFamilies();
|
||||
|
|
|
@ -28,6 +28,7 @@ import org.apache.hadoop.hbase.ScheduledChore;
|
|||
import org.apache.hadoop.hbase.HColumnDescriptor;
|
||||
import org.apache.hadoop.hbase.HTableDescriptor;
|
||||
import org.apache.hadoop.hbase.TableDescriptors;
|
||||
import org.apache.hadoop.hbase.client.TableState;
|
||||
import org.apache.hadoop.hbase.mob.MobConstants;
|
||||
import org.apache.hadoop.hbase.mob.MobUtils;
|
||||
|
||||
|
@ -57,6 +58,10 @@ public class MobFileCompactionChore extends ScheduledChore {
|
|||
TableDescriptors htds = master.getTableDescriptors();
|
||||
Map<String, HTableDescriptor> map = htds.getAll();
|
||||
for (HTableDescriptor htd : map.values()) {
|
||||
if (!master.getTableStateManager().isTableState(htd.getTableName(),
|
||||
TableState.State.ENABLED)) {
|
||||
continue;
|
||||
}
|
||||
boolean reported = false;
|
||||
try {
|
||||
for (HColumnDescriptor hcd : htd.getColumnFamilies()) {
|
||||
|
|
Loading…
Reference in New Issue