public class LeaderZooKeeperServer extends QuorumZooKeeperServer
ZooKeeperServer.MissingSessionException, ZooKeeperServer.State
self, upgradeableSessionTracker
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
Constructor and Description |
---|
LeaderZooKeeperServer(FileTxnSnapLog logFactory,
QuorumPeer self,
ZKDatabase zkDb) |
Modifier and Type | Method and Description |
---|---|
boolean |
checkIfValidGlobalSession(long sess,
int to) |
void |
createSessionTracker() |
int |
getGlobalOutstandingLimit() |
Leader |
getLeader() |
long |
getServerId()
Returns the id of the associated QuorumPeer, which will do for a unique
id of this server.
|
String |
getState() |
protected void |
registerJMX() |
void |
registerJMX(LeaderBean leaderBean,
LocalPeerBean localPeerBean) |
protected void |
registerMetrics() |
protected void |
revalidateSession(ServerCnxn cnxn,
long sessionId,
int sessionTimeout) |
protected void |
setupRequestProcessors() |
void |
shutdown() |
void |
startup() |
void |
submitLearnerRequest(Request request)
Requests coming from the learner should go directly to
PrepRequestProcessor
|
boolean |
touch(long sess,
int to) |
protected void |
unregisterJMX() |
protected void |
unregisterJMX(Leader leader) |
protected void |
unregisterMetrics() |
checkUpgradeSession, dumpConf, dumpMonitorValues, setLocalSessionFlag, setState, startSessionTracker, upgrade
authWriteRequest, canShutdown, checkACL, checkPasswd, checkQuota, checkRequestSizeWhenReceivingMessage, closeSession, closeSession, connThrottle, decInProcess, dumpEphemerals, enqueueRequest, expire, expire, finishSessionInit, getClientPort, getClientPortListenBacklog, getConf, getConnectionDropChance, getDataDirSize, getEphemerals, getGetChildrenResponseCache, getInflight, getInitialConfig, getInProcess, getLargeRequestBytes, getLargeRequestMaxBytes, getLargeRequestThreshold, getLastProcessedZxid, getLogDirSize, getMaxClientCnxnsPerHost, getMaxSessionTimeout, getMinSessionTimeout, getNumAliveConnections, getOutstandingHandshakeNum, getOutstandingRequests, getReadResponseCache, getRequestPathMetricsCollector, getSecureClientPort, getSecureServerCnxnFactory, getServerCnxnFactory, getSessionExpiryMap, getSessionTracker, getSnapCount, getSnapSizeInBytes, getThrottledOpWaitTime, getTickTime, getTxnLogElapsedSyncTime, getTxnLogFactory, getZKDatabase, getZkShutdownHandler, getZooKeeperServerListener, getZxid, incInProcess, isCloseSessionTxnEnabled, isDigestEnabled, isReconfigEnabled, isResponseCachingEnabled, isRunning, killSession, loadData, processConnectRequest, processPacket, processTxn, processTxn, reopenSession, requestFinished, serverStats, setClientPortListenBacklog, setCloseSessionTxnEnabled, setCreateSessionTrackerServerId, setDigestEnabled, setLargeRequestMaxBytes, setLargeRequestThreshold, setMaxSessionTimeout, setMinSessionTimeout, setOwner, setResponseCachingEnabled, setSecureServerCnxnFactory, setServerCnxnFactory, setThrottledOpWaitTime, setTickTime, setTxnLogFactory, setZKDatabase, setZxid, shouldForceWriteInitialSnapshotAfterLeaderElection, shouldThrottle, shutdown, startdata, startJvmPauseMonitor, startRequestThrottler, startServing, startupWithoutServing, submitRequest, submitRequestNow, takeSnapshot, takeSnapshot, truncateLog, validateSession
public LeaderZooKeeperServer(FileTxnSnapLog logFactory, QuorumPeer self, ZKDatabase zkDb) throws IOException
IOException
public Leader getLeader()
protected void setupRequestProcessors()
setupRequestProcessors
in class ZooKeeperServer
public void startup()
startup
in class ZooKeeperServer
protected void registerMetrics()
registerMetrics
in class QuorumZooKeeperServer
protected void unregisterMetrics()
unregisterMetrics
in class QuorumZooKeeperServer
public void shutdown()
shutdown
in class ZooKeeperServer
public int getGlobalOutstandingLimit()
getGlobalOutstandingLimit
in class ZooKeeperServer
public void createSessionTracker()
createSessionTracker
in class ZooKeeperServer
public boolean touch(long sess, int to)
public boolean checkIfValidGlobalSession(long sess, int to)
public void submitLearnerRequest(Request request)
request
- protected void registerJMX()
registerJMX
in class ZooKeeperServer
public void registerJMX(LeaderBean leaderBean, LocalPeerBean localPeerBean)
protected void unregisterJMX()
unregisterJMX
in class ZooKeeperServer
protected void unregisterJMX(Leader leader)
public String getState()
getState
in interface ServerStats.Provider
getState
in class ZooKeeperServer
public long getServerId()
getServerId
in interface SessionTracker.SessionExpirer
getServerId
in class ZooKeeperServer
protected void revalidateSession(ServerCnxn cnxn, long sessionId, int sessionTimeout) throws IOException
revalidateSession
in class ZooKeeperServer
IOException
Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.