public class ZkRegionMergeCoordination extends Object implements RegionMergeCoordination
Modifier and Type | Class and Description |
---|---|
static class |
ZkRegionMergeCoordination.ZkRegionMergeDetails
ZK-based implementation.
|
RegionMergeCoordination.RegionMergeDetails
Constructor and Description |
---|
ZkRegionMergeCoordination(CoordinatedStateManager manager,
ZooKeeperWatcher watcher) |
public ZkRegionMergeCoordination(CoordinatedStateManager manager, ZooKeeperWatcher watcher)
public RegionMergeCoordination.RegionMergeDetails getDefaultDetails()
getDefaultDetails
in interface RegionMergeCoordination
public void waitForRegionMergeTransaction(RegionServerServices services, HRegionInfo mergedRegionInfo, HRegion region_a, HRegion region_b, RegionMergeCoordination.RegionMergeDetails details) throws IOException
waitForRegionMergeTransaction
in interface RegionMergeCoordination
IOException
public void startRegionMergeTransaction(HRegionInfo region, ServerName serverName, HRegionInfo a, HRegionInfo b) throws IOException
Does not transition nodes from other states. If a node already exists for
this region, a KeeperException.NodeExistsException
will be thrown.
startRegionMergeTransaction
in interface RegionMergeCoordination
region
- region to be created as offlineserverName
- server event originates fromIOException
public void clean(HRegionInfo hri)
RegionMergeCoordination
clean
in interface RegionMergeCoordination
hri
- region to be rolled backpublic void completeRegionMergeTransaction(RegionServerServices services, HRegionInfo mergedRegionInfo, HRegion region_a, HRegion region_b, RegionMergeCoordination.RegionMergeDetails rmd, HRegion mergedRegion) throws IOException
RegionMergeCoordination
completeRegionMergeTransaction
in interface RegionMergeCoordination
services
- Used to online/offline regions.mergedRegionInfo
- regionregion_a
- merging region Aregion_b
- merging region Brmd
- region merge detailsIOException
- If thrown, transaction failed. Call
RegionMergeTransaction.rollback(
Server, RegionServerServices)
public void confirmRegionMergeTransaction(HRegionInfo merged, HRegionInfo a, HRegionInfo b, ServerName serverName, RegionMergeCoordination.RegionMergeDetails rmd) throws IOException
RegionMergeCoordination
confirmRegionMergeTransaction
in interface RegionMergeCoordination
merged
- regiona
- merging region Ab
- merging region BserverName
- server event originates fromrmd
- region merge detailsIOException
- If thrown, transaction failed.public void processRegionMergeRequest(HRegionInfo p, HRegionInfo hri_a, HRegionInfo hri_b, ServerName sn, RegionMergeCoordination.RegionMergeDetails rmd) throws IOException
processRegionMergeRequest
in interface RegionMergeCoordination
p
- regionhri_a
- merging region Ahri_b
- merging region Bsn
- server event originates fromrmd
- region merge detailsIOException
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.