Package org.apache.hadoop.ha
Class ZKFailoverController
java.lang.Object
org.apache.hadoop.ha.ZKFailoverController
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected Configurationprotected final HAServiceTargetprotected ZKFCRpcServerprotected static final Stringstatic final Stringstatic final Stringstatic final Stringprotected static final String[]All of the conf keys used by the ZKFC. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedZKFailoverController(Configuration conf, HAServiceTarget localTarget) -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidprotected abstract HAServiceTargetdataToTarget(byte[] data) protected abstract List<HAServiceTarget>protected HealthMonitor.Stateprotected abstract PolicyProviderprotected abstract InetSocketAddressprotected abstract StringReturn the name of a znode inside the configured parent znode in which the ZKFC will do all of its work.protected voidinitRPC()protected abstract booleanprotected abstract voidintprotected voidsetLastHealthState(HealthMonitor.State newState) protected voidstartRPC()protected abstract byte[]targetToData(HAServiceTarget target)
-
Field Details
-
ZK_QUORUM_KEY
- See Also:
-
ZK_ACL_KEY
- See Also:
-
ZK_AUTH_KEY
- See Also:
-
ZKFC_CONF_KEYS
All of the conf keys used by the ZKFC. This is used in order to allow them to be overridden on a per-nameservice or per-namenode basis. -
USAGE
- See Also:
-
conf
-
localTarget
-
rpcServer
-
-
Constructor Details
-
ZKFailoverController
-
-
Method Details
-
targetToData
-
dataToTarget
-
loginAsFCUser
- Throws:
IOException
-
checkRpcAdminAccess
- Throws:
AccessControlExceptionIOException
-
getRpcAddressToBindTo
-
getPolicyProvider
-
getAllOtherNodes
-
isSSLEnabled
protected abstract boolean isSSLEnabled() -
getScopeInsideParentNode
Return the name of a znode inside the configured parent znode in which the ZKFC will do all of its work. This is so that multiple federated nameservices can run on the same ZK quorum without having to manually configure them to separate subdirectories.- Returns:
- ScopeInsideParentNode.
-
getLocalTarget
-
getServiceState
-
run
- Throws:
Exception
-
initRPC
- Throws:
IOException
-
startRPC
- Throws:
IOException
-
getLastHealthState
- Returns:
- the last health state passed to the FC by the HealthMonitor.
-
setLastHealthState
-
getElectorForTests
-