server
ByteBufferInputStream
ByteBufferOutputStream
ConnectionBean
/**
* Implementation of connection MBean interface.
*/
ConnectionMXBean
/**
* This MBean represents a client connection.
*/
DatadirCleanupManager
/**
* This class manages the cleanup of snapshots and corresponding transaction
* logs by scheduling the auto purge task with the specified
* 'autopurge.purgeInterval'. It keeps the most recent
* 'autopurge.snapRetainCount' number of snapshots and corresponding transaction
* logs.
*/
DataNode
/**
* This class contains the data for a node in the data tree.
* <p>
* A data node contains a reference to its parent, a byte array as its data, an
* array of ACLs, a stat object, and a set of its children's paths.
*
*/
DataTree
/**
* This class maintains the tree data structure. It doesn't have any networking
* or client connection code in it so that it can be tested in a stand alone
* way.
* <p>
* The tree maintains two parallel data structures: a hashtable that maps from
* full paths to DataNodes and a tree of DataNodes. All accesses to a path is
* through the hashtable. The tree is traversed only when serializing to disk.
*/
DataTreeBean
/**
* This class implements the data tree MBean.
*/
DataTreeMXBean
/**
* Zookeeper data tree MBean.
*/
ExitCode
/**
* Exit code used to exit server
*/
FinalRequestProcessor
/**
* This Request processor actually applies any transaction associated with a
* request and services any queries. It is always at the end of a
* RequestProcessor chain (hence the name), so it does not have a nextProcessor
* member.
*
* This RequestProcessor counts on ZooKeeperServer to populate the
* outstandingRequests member of ZooKeeperServer.
*/
LogFormatter
NettyServerCnxn
NettyServerCnxnFactory
NIOServerCnxn
/**
* This class handles communication with clients using NIO. There is one per
* client, but only one thread doing the communication.
*/
NIOServerCnxnFactory
ObserverBean
/**
* ObserverBean
*
*/
PrepRequestProcessor
/**
* This request processor is generally at the start of a RequestProcessor
* change. It sets up any transactions associated with requests that change the
* state of the system. It counts on ZooKeeperServer to update
* outstandingRequests, so that it can take into account transactions that are
* in the queue to be applied when generating a transaction.
*/
PurgeTxnLog
/**
* this class is used to clean up the
* snapshot and data log dir's. This is usually
* run as a cronjob on the zookeeper server machine.
* Invocation of this class will clean up the datalogdir
* files and snapdir files keeping the last "-n" snapshot files
* and the corresponding logs.
*/
ReferenceCountedACLCache
Request
/**
* This is the structure that represents a request moving through a chain of
* RequestProcessors. There are various pieces of information that is tacked
* onto the request as it is processed.
*/
RequestProcessor
/**
* RequestProcessors are chained together to process transactions. Requests are
* always processed in order. The standalone server, follower, and leader all
* have slightly different RequestProcessors chained together.
*
* Requests always move forward through the chain of RequestProcessors. Requests
* are passed to a RequestProcessor through processRequest(). Generally method
* will always be invoked by a single thread.
*
* When shutdown is called, the request RequestProcessor should also shutdown
* any RequestProcessors that it is connected to.
*/
ServerCnxn
/**
* Interface to a Server connection - represents a connection from a client
* to the server.
*/
ServerCnxnFactory
ServerConfig
/**
* Server configuration storage.
*
* We use this instead of Properties as it's typed.
*
*/
ServerStats
/**
* Basic Server Statistics
*/
SessionTracker
/**
* This is the basic interface that ZooKeeperServer uses to track sessions. The
* standalone and leader ZooKeeperServer use the same SessionTracker. The
* FollowerZooKeeperServer uses a SessionTracker which is basically a simple
* shell to track information to be forwarded to the leader.
*/
SessionTrackerImpl
/**
* This is a full featured SessionTracker. It tracks session in grouped by tick
* interval. It always rounds up the tick interval to provide a sort of grace
* period. Sessions are thus expired in batches made up of sessions that expire
* in a given interval.
*/
SnapshotFormatter
/**
* Dump a snapshot file to stdout.
*/
Stats
/**
* Statistics on the ServerCnxn
*/
SyncRequestProcessor
/**
* This RequestProcessor logs requests to disk. It batches the requests to do
* the io efficiently. The request is not passed to the next RequestProcessor
* until its log has been synced to disk.
*
* SyncRequestProcessor is used in 3 different cases
* 1. Leader - Sync request to disk and forward it to AckRequestProcessor which
* send ack back to itself.
* 2. Follower - Sync request to disk and forward request to
* SendAckRequestProcessor which send the packets to leader.
* SendAckRequestProcessor is flushable which allow us to force
* push packets to leader.
* 3. Observer - Sync committed request to disk (received as INFORM packet).
* It never send ack back to the leader, so the nextProcessor will
* be null. This change the semantic of txnlog on the observer
* since it only contains committed txns.
*/
TraceFormatter
UnimplementedRequestProcessor
/**
* Manages the unknown requests (i.e. unknown OpCode), by:
* - sending back the KeeperException.UnimplementedException() error code to the client
* - closing the connection.
*/
WatchManager
/**
* This class manages watches. It allows watches to be associated with a string
* and removes watchers and their watches in addition to managing triggers.
*/
ZKDatabase
/**
* This class maintains the in memory database of zookeeper
* server states that includes the sessions, datatree and the
* committed logs. It is booted up after reading the logs
* and snapshots from the disk.
*/
ZooKeeperCriticalThread
/**
* Represents critical thread. When there is an uncaught exception thrown by the
* thread this will exit the system.
*/
ZooKeeperSaslServer
ZooKeeperServer
/**
* This class implements a simple standalone ZooKeeperServer. It sets up the
* following chain of RequestProcessors to process requests:
* PrepRequestProcessor -> SyncRequestProcessor -> FinalRequestProcessor
*/
ZooKeeperServerBean
/**
* This class implements the ZooKeeper server MBean interface.
*/
ZooKeeperServerListener
/**
* Listener for the critical resource events.
*/
ZooKeeperServerListenerImpl
/**
* Default listener implementation, which will be used to notify internal
* errors. For example, if some critical thread has stopped due to fatal errors,
* then it will get notifications and will change the state of ZooKeeper server
* to ERROR representing an error status.
*/
ZooKeeperServerMain
/**
* This class starts and runs a standalone ZooKeeperServer.
*/
ZooKeeperServerMXBean
/**
* ZooKeeper server MBean.
*/
ZooKeeperServerShutdownHandler
/**
* ZooKeeper server shutdown handler which will be used to handle ERROR or
* SHUTDOWN server state transitions, which in turn releases the associated
* shutdown latch.
*/
ZooKeeperThread
/**
* This is the main class for catching all the uncaught exceptions thrown by the
* threads.
*/
ZooTrace
/**
* This class encapsulates and centralizes tracing for the ZooKeeper server.
* Trace messages go to the log with TRACE level.
* <p>
* Log4j must be correctly configured to capture the TRACE messages.
*/