Class LearnerZooKeeperServer
java.lang.Object
org.apache.zookeeper.server.ZooKeeperServer
org.apache.zookeeper.server.quorum.QuorumZooKeeperServer
org.apache.zookeeper.server.quorum.LearnerZooKeeperServer
- All Implemented Interfaces:
ServerStats.Provider, SessionTracker.SessionExpirer
- Direct Known Subclasses:
FollowerZooKeeperServer, ObserverZooKeeperServer
Parent class for all ZooKeeperServers for Learners
-
Nested Class Summary
Nested classes/interfaces inherited from class ZooKeeperServer
ZooKeeperServer.MissingSessionException, ZooKeeperServer.State -
Field Summary
FieldsFields inherited from class QuorumZooKeeperServer
self, upgradeableSessionTrackerFields inherited from class ZooKeeperServer
ALLOW_SASL_FAILED_CLIENTS, CLOSE_SESSION_TXN_ENABLED, DEFAULT_STARTING_BUFFER_SIZE, DEFAULT_THROTTLED_OP_WAIT_TIME, DEFAULT_TICK_TIME, ENABLE_EAGER_ACL_CHECK, ENFORCE_QUOTA, enforceQuota, firstProcessor, GET_CHILDREN_RESPONSE_CACHE_SIZE, GET_DATA_RESPONSE_CACHE_SIZE, GLOBAL_OUTSTANDING_LIMIT, initialConfig, INT_BUFFER_STARTING_SIZE_BYTES, intBufferStartingSizeBytes, jmxDataTreeBean, jmxServerBean, jvmPauseMonitor, listenBacklog, LOG, maxSessionTimeout, minSessionTimeout, ok, reconfigEnabled, SASL_SUPER_USER, secureServerCnxnFactory, serverCnxnFactory, sessionTracker, SKIP_ACL, SNAP_COUNT, state, throttledOpWaitTime, tickTime, ZOOKEEPER_DIGEST_ENABLED, ZOOKEEPER_SERIALIZE_LAST_PROCESSED_ZXID_ENABLED -
Constructor Summary
ConstructorsConstructorDescriptionLearnerZooKeeperServer(FileTxnSnapLog logFactory, int tickTime, int minSessionTimeout, int maxSessionTimeout, int listenBacklog, ZKDatabase zkDb, QuorumPeer self) -
Method Summary
Modifier and TypeMethodDescriptionvoidabstract LearnerAbstract method to return the learner associated with this server.longReturns the id of the associated QuorumPeer, which will do for a unique id of this server.Returns the current state of the session tracker.protected voidvoidregisterJMX(ZooKeeperServerBean serverBean, LocalPeerBean localPeerBean) protected voidrevalidateSession(ServerCnxn cnxn, long sessionId, int sessionTimeout) protected voidprotected voidprotected voidunregisterJMX(Learner peer) Methods inherited from class QuorumZooKeeperServer
checkUpgradeSession, dumpConf, dumpMonitorValues, registerMetrics, setLocalSessionFlag, setState, startSessionTracker, unregisterMetrics, upgradeMethods inherited from class ZooKeeperServer
authWriteRequest, checkACL, checkPasswd, checkQuota, checkRequestSizeWhenReceivingMessage, closeSession, closeSession, connThrottle, createRequestThrottler, decInProcess, dumpEphemerals, enqueueRequest, expire, expire, finishSessionInit, getClientPort, getClientPortListenBacklog, getConf, getConnectionDropChance, getDataDirSize, getEphemerals, getGetChildrenResponseCache, getGlobalOutstandingLimit, getInflight, getInitialConfig, getInProcess, getLargeRequestBytes, getLargeRequestMaxBytes, getLargeRequestThreshold, getLastProcessedZxid, getLogDirSize, getMaxClientCnxnsPerHost, getMaxSessionTimeout, getMinSessionTimeout, getNumAliveConnections, getOutstandingHandshakeNum, getOutstandingRequests, getReadResponseCache, getRequestPathMetricsCollector, getSecureClientPort, getSecureServerCnxnFactory, getServerCnxnFactory, getSessionExpiryMap, getSessionTracker, getSnapCount, getSnapSizeInBytes, getState, getThrottledOpWaitTime, getTickTime, getTxnLogElapsedSyncTime, getTxnLogFactory, getZKDatabase, getZkShutdownHandler, getZooKeeperServerListener, getZxid, incInProcess, isCloseSessionTxnEnabled, isDigestEnabled, isEnableEagerACLCheck, isReconfigEnabled, isResponseCachingEnabled, isRunning, isSerializeLastProcessedZxidEnabled, killSession, loadData, processConnectRequest, processPacket, processTxn, reopenSession, requestFinished, restoreFromSnapshot, serverStats, setClientPortListenBacklog, setCloseSessionTxnEnabled, setCreateSessionTrackerServerId, setDigestEnabled, setEnableEagerACLCheck, setLargeRequestMaxBytes, setLargeRequestThreshold, setMaxSessionTimeout, setMinSessionTimeout, setOwner, setResponseCachingEnabled, setSecureServerCnxnFactory, setSerializeLastProcessedZxidEnabled, setServerCnxnFactory, setThrottledOpWaitTime, setTickTime, setTxnLogFactory, setupRequestProcessors, setZKDatabase, setZxid, shouldForceWriteInitialSnapshotAfterLeaderElection, shouldThrottle, shutdown, shutdown, startdata, startJvmPauseMonitor, startRequestThrottler, startup, submitRequest, submitRequestNow, takeSnapshot, takeSnapshot, takeSnapshot, truncateLog, validateSession
-
Field Details
-
commitProcessor
-
syncProcessor
-
-
Constructor Details
-
LearnerZooKeeperServer
public LearnerZooKeeperServer(FileTxnSnapLog logFactory, int tickTime, int minSessionTimeout, int maxSessionTimeout, int listenBacklog, ZKDatabase zkDb, QuorumPeer self) throws IOException - Throws:
IOException
-
-
Method Details
-
getLearner
Abstract method to return the learner associated with this server. Since the Learner may change under our feet (when QuorumPeer reassigns it) we can't simply take a reference here. Instead, we need the subclasses to implement this. -
getTouchSnapshot
-
getServerId
public long getServerId()Returns the id of the associated QuorumPeer, which will do for a unique id of this server.- Specified by:
getServerIdin interfaceSessionTracker.SessionExpirer- Overrides:
getServerIdin classZooKeeperServer
-
createSessionTracker
public void createSessionTracker()- Overrides:
createSessionTrackerin classZooKeeperServer
-
revalidateSession
protected void revalidateSession(ServerCnxn cnxn, long sessionId, int sessionTimeout) throws IOException - Overrides:
revalidateSessionin classZooKeeperServer- Throws:
IOException
-
registerJMX
protected void registerJMX()- Overrides:
registerJMXin classZooKeeperServer
-
registerJMX
-
unregisterJMX
protected void unregisterJMX()- Overrides:
unregisterJMXin classZooKeeperServer
-
unregisterJMX
-
shutdownComponents
protected void shutdownComponents()- Overrides:
shutdownComponentsin classZooKeeperServer
-