Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you under the Apache License, Version 2.0 (the
"License"); you may not use this file except in compliance
with the License. You may obtain a copy of the License at
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
This class contains helper methods that repair parts of hbase's filesystem
Fix multiple assignment by doing silent closes on each RS hosting the region
and then force ZK unassigned node to OFFLINE to trigger assignment by
admin HBase admin used to undeploy
region Region to undeploy
servers list of Servers to undeploy from
Fix unassigned by creating/transition the unassigned ZK node for this
region to OFFLINE state with a special flag to tell the master that this is
a forced operation by HBCK.
This assumes that info is in META.
In 0.90, this forces an HRI offline by setting the RegionTransitionData
in ZK to have HBCK_CODE_NAME as the server. This is a special case in
the AssignmentManager that attempts an assign call by the master.
- See also:
This doesn't seem to work properly in the updated version of 0.92+'s hbck
so we use assign to force the region into transition. This has the
side-effect of requiring a HRegionInfo that considers regionId (timestamp)
in comparators that is addressed by HBASE-5563.
LOG.info("Region still in transition, waiting for "
+ "it to become assigned: " + region);
LOG.warn("Exception when waiting for region to become assigned,"
throw new IOException("Region " + region + " failed to move out of " +
"transition within timeout " + timeout + "ms");
Contacts a region server and waits up to hbase.hbck.close.timeout ms
(default 120s) to close the region. This bypasses the active hmaster.
if (rsRegion == null) return;
throw new IOException("Region " + region + " failed to close within"
+ " timeout " + timeout);
Puts the specified HRegionInfo into META.
Creates, flushes, and closes a new region.