@InterfaceAudience.Private public class ZkCloseRegionCoordination extends Object implements CloseRegionCoordination
CloseRegionCoordination
.Modifier and Type | Class and Description |
---|---|
static class |
ZkCloseRegionCoordination.ZkCloseRegionDetails
ZK-based implementation.
|
CloseRegionCoordination.CloseRegionDetails
Modifier and Type | Field and Description |
---|---|
private CoordinatedStateManager |
csm |
private static int |
FAILED_VERSION |
private static org.apache.commons.logging.Log |
LOG |
private ZooKeeperWatcher |
watcher |
Constructor and Description |
---|
ZkCloseRegionCoordination(CoordinatedStateManager csm,
ZooKeeperWatcher watcher) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkClosingState(HRegionInfo regionInfo,
CloseRegionCoordination.CloseRegionDetails crd)
In ZK-based version we're checking for bad znode state, e.g.
|
CloseRegionCoordination.CloseRegionDetails |
getDetaultDetails()
No ZK tracking will be performed for that case.
|
CloseRegionCoordination.CloseRegionDetails |
parseFromProtoRequest(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest request)
Parse ZK-related fields from request.
|
void |
setClosedState(HRegion region,
ServerName sn,
CloseRegionCoordination.CloseRegionDetails crd)
In ZK-based version we do some znodes transitioning.
|
private boolean |
setClosedState(HRegion region,
ServerName sn,
ZkCloseRegionCoordination.ZkCloseRegionDetails zkCrd)
Transition ZK node to CLOSED
|
private static final org.apache.commons.logging.Log LOG
private static final int FAILED_VERSION
private CoordinatedStateManager csm
private final ZooKeeperWatcher watcher
public ZkCloseRegionCoordination(CoordinatedStateManager csm, ZooKeeperWatcher watcher)
public boolean checkClosingState(HRegionInfo regionInfo, CloseRegionCoordination.CloseRegionDetails crd)
checkClosingState
in interface CloseRegionCoordination
regionInfo
- region being closedcrd
- details about closing operationpublic void setClosedState(HRegion region, ServerName sn, CloseRegionCoordination.CloseRegionDetails crd)
setClosedState
in interface CloseRegionCoordination
region
- region being closedsn
- ServerName on which task runscrd
- details about closing operationpublic CloseRegionCoordination.CloseRegionDetails parseFromProtoRequest(org.apache.hadoop.hbase.protobuf.generated.AdminProtos.CloseRegionRequest request)
parseFromProtoRequest
in interface CloseRegionCoordination
public CloseRegionCoordination.CloseRegionDetails getDetaultDetails()
getDetaultDetails
in interface CloseRegionCoordination
private boolean setClosedState(HRegion region, ServerName sn, ZkCloseRegionCoordination.ZkCloseRegionDetails zkCrd)
region
- HRegion instance being closedsn
- ServerName on which task runszkCrd
- details about region closing operation.Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.