public class ReadOnlyZooKeeperServer extends ZooKeeperServer
The very first processor in the chain of request processors is a ReadOnlyRequestProcessor which drops state-changing requests.
ZooKeeperServer.MissingSessionException, ZooKeeperServer.State
Modifier and Type | Field and Description |
---|---|
protected QuorumPeer |
self |
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
Modifier and Type | Method and Description |
---|---|
void |
createSessionTracker() |
void |
dumpConf(PrintWriter pwriter) |
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(ZooKeeperServerBean serverBean,
LocalPeerBean localPeerBean) |
protected void |
setLocalSessionFlag(Request si)
If the underlying Zookeeper server support local session, this method
will set a isLocalSession to true if a request is associated with
a local session.
|
protected void |
setState(ZooKeeperServer.State state)
Sets the state of ZooKeeper server.
|
protected void |
setupRequestProcessors() |
void |
shutdown() |
protected void |
startSessionTracker() |
void |
startup() |
protected void |
unregisterJMX() |
protected void |
unregisterJMX(ZooKeeperServer zks) |
protected void |
validateSession(ServerCnxn cnxn,
long sessionId)
Validate if a particular session can be reestablished.
|
authWriteRequest, canShutdown, checkACL, checkPasswd, checkQuota, checkRequestSizeWhenReceivingMessage, closeSession, closeSession, connThrottle, decInProcess, dumpEphemerals, dumpMonitorValues, 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, getThrottledOpWaitTime, getTickTime, getTxnLogElapsedSyncTime, getTxnLogFactory, getZKDatabase, getZkShutdownHandler, getZooKeeperServerListener, getZxid, incInProcess, isCloseSessionTxnEnabled, isDigestEnabled, isReconfigEnabled, isResponseCachingEnabled, isRunning, killSession, loadData, processConnectRequest, processPacket, processTxn, processTxn, registerMetrics, reopenSession, requestFinished, revalidateSession, 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, unregisterMetrics
protected final QuorumPeer self
protected void setupRequestProcessors()
setupRequestProcessors
in class ZooKeeperServer
public void startup()
startup
in class ZooKeeperServer
public void createSessionTracker()
createSessionTracker
in class ZooKeeperServer
protected void startSessionTracker()
startSessionTracker
in class ZooKeeperServer
protected void setLocalSessionFlag(Request si)
ZooKeeperServer
setLocalSessionFlag
in class ZooKeeperServer
protected void validateSession(ServerCnxn cnxn, long sessionId) throws IOException
ZooKeeperServer
validateSession
in class ZooKeeperServer
IOException
protected void registerJMX()
registerJMX
in class ZooKeeperServer
public void registerJMX(ZooKeeperServerBean serverBean, LocalPeerBean localPeerBean)
protected void unregisterJMX()
unregisterJMX
in class ZooKeeperServer
protected void unregisterJMX(ZooKeeperServer zks)
public String getState()
getState
in interface ServerStats.Provider
getState
in class ZooKeeperServer
public long getServerId()
getServerId
in interface SessionTracker.SessionExpirer
getServerId
in class ZooKeeperServer
public void shutdown()
shutdown
in class ZooKeeperServer
public void dumpConf(PrintWriter pwriter)
dumpConf
in class ZooKeeperServer
protected void setState(ZooKeeperServer.State state)
ZooKeeperServer
The following are the server state transitions:
ZooKeeperServerListenerImpl
notifies any critical resource
error events, e.g., SyncRequestProcessor not being able to write a txn to
disk.setState
in class ZooKeeperServer
state
- new server state.Copyright © 2008–2022 The Apache Software Foundation. All rights reserved.