@InterfaceAudience.Private public class ZkOpenRegionCoordination extends Object implements OpenRegionCoordination
OpenRegionCoordination
.Modifier and Type | Class and Description |
---|---|
static class |
ZkOpenRegionCoordination.ZkOpenRegionDetails
ZK-based implementation.
|
OpenRegionCoordination.OpenRegionDetails
Constructor and Description |
---|
ZkOpenRegionCoordination(CoordinatedStateManager coordination,
ZooKeeperWatcher watcher) |
public ZkOpenRegionCoordination(CoordinatedStateManager coordination, ZooKeeperWatcher watcher)
public boolean transitionToOpened(HRegion r, OpenRegionCoordination.OpenRegionDetails ord) throws IOException
OpenRegionCoordination
transitionToOpened
in interface OpenRegionCoordination
r
- Region we're working on.ord
- details about region opening taskIOException
public boolean transitionFromOfflineToOpening(HRegionInfo regionInfo, OpenRegionCoordination.OpenRegionDetails ord)
transitionFromOfflineToOpening
in interface OpenRegionCoordination
regionInfo
- region info instanceord
- - instance of open region details, for ZK implementation
will include version Of OfflineNode that needs to be compared
before changing the node's state from OFFLINEpublic boolean tickleOpening(OpenRegionCoordination.OpenRegionDetails ord, HRegionInfo regionInfo, RegionServerServices rsServices, String context)
tickleOpening
in interface OpenRegionCoordination
context
- Some context to add to logs if failureord
- details about opening task.regionInfo
- region we're working on.rsServices
- instance of RegionServerrServicespublic boolean tryTransitionFromOfflineToFailedOpen(RegionServerServices rsServices, HRegionInfo hri, OpenRegionCoordination.OpenRegionDetails ord)
tryTransitionFromOfflineToFailedOpen
in interface OpenRegionCoordination
rsServices
- hri
- Region we're working on.ord
- Details about region open taskpublic boolean tryTransitionFromOpeningToFailedOpen(HRegionInfo hri, OpenRegionCoordination.OpenRegionDetails ord)
tryTransitionFromOpeningToFailedOpen
in interface OpenRegionCoordination
hri
- Region we're working on.ord
- details about region opening taskpublic OpenRegionCoordination.OpenRegionDetails parseFromProtoRequest(AdminProtos.OpenRegionRequest.RegionOpenInfo regionOpenInfo)
parseFromProtoRequest
in interface OpenRegionCoordination
public OpenRegionCoordination.OpenRegionDetails getDetailsForNonCoordinatedOpening()
getDetailsForNonCoordinatedOpening
in interface OpenRegionCoordination
public boolean commitOpenOnMasterSide(AssignmentManager assignmentManager, HRegionInfo regionInfo, OpenRegionCoordination.OpenRegionDetails ord)
OpenRegionCoordination
commitOpenOnMasterSide
in interface OpenRegionCoordination
Copyright © 2007-2016 The Apache Software Foundation. All Rights Reserved.