Provides a Bookie server that stores entries for clients.
Interface Summary Interface Description AbstractLogCompactor.LogRemovalListener BookieInterface for the bookie. BookieException.CodeAn exception code indicates the failure reason. BookieFileChannelA FileChannel for the JournalChannel read and write, we can use this interface to extend the FileChannel which we use in the JournalChannel. BookieShell.CommandBookieShell command. BookieShell.UpdateLedgerNotifierA facility for reporting update ledger progress. BookKeeperServerStatsA utility class used for managing the stats constants used in server side. CacheCallbackInterface plugged into caching to receive callback notifications. CheckpointerThe instance that is responsible for checkpointing ledger storage. CheckpointSourceInterface to communicate checkpoint progress. CheckpointSource.CheckpointA checkpoint presented a time point. CompactableLedgerStorageInterface that identifies LedgerStorage implementations using EntryLogger and running periodic entries compaction. CookieValidationInterface for cookie validation. DefaultEntryLogger.EntryLogListenerEntry Log Listener. EntryLogManager EntryLogMetadataMapMap-store to store Entrylogger metadata. FileChannelProviderAn interface of the FileChannelProvider. FileInfoBackingCache.FileLoader GarbageCollectorThis is the garbage collector interface, garbage collector implementers need to extends this class to remove the deleted ledgers. GarbageCollector.GarbageCleanerA interface used to define customised garbage cleaner. HandleFactory Journal.BufferedChannelBuilderFor testability. Journal.JournalIdFilterFilter to pickup journals. Journal.JournalScannerScanner used to scan a journal. LedgerCacheThis class maps a ledger entry number into a location (entrylogid, offset) in an entry log file. LedgerCache.PageEntriesRepresents a page of the index. LedgerCache.PageEntriesIterableIterable over index pages -- returns PageEntries rather than individual entries because getEntries() above needs to be able to throw an IOException. LedgerDirsManager.LedgerDirsListenerListener for the disk check events will be notified from the
LedgerDirsManagerwhenever disk full/failure detected.
LedgerEntryPage.EntryVisitorInterface for getEntries to propagate entry, pos pairs. LedgerStorageInterface for storing ledger data on persistent storage. LedgerStorage.LedgerDeletionListenerSignals that a ledger is deleted by the garbage collection thread. LEPStateChangeCallbackCallback interface when state of ledger entry page changed. SkipListFlusherFlush entries from skip list. StateManagerState management of Bookie, including register, turn bookie to w/r mode. StateManager.ShutdownHandlerShutdownHandler used to shutdown bookie. UncleanShutdownDetectionAn interface for unclean shutdown detection.
Class Summary Class Description AbstractLogCompactorAbstract entry log compactor used for compaction. AbstractLogCompactor.Throttlerclass Throttler. BookieCriticalThreadThread is marked as critical and will exit, when there is an uncaught exception occurred in thread. BookieImplImplements a bookie. BookieImpl.NopWriteCallback BookieResourcesCentralizes the creation of injected resources. BookieShellBookie Shell is to provide utilities for users to administer a bookkeeper cluster. BookieStateManagerAn implementation of StateManager. BookieStatusThe status object represents the current status of a bookie instance. BookieThreadWrapper that wraps bookie threads. BufferedChannelProvides a buffering layer in front of a FileChannel. BufferedChannelBaseA
BufferedChannelBaseadds functionality to an existing file channel, the ability to buffer the input and output data.
BufferedReadChannelA Buffered channel without a write buffer. CheckpointSourceListA
CheckpointSourceListmanages a list of
CookieWhen a bookie starts for the first time it generates a cookie, and stores the cookie in registration manager as well as in the each of the local filesystem directories it uses. Cookie.BuilderCookie builder. DefaultEntryLoggerThis class manages the writing of the bookkeeper entries. DefaultEntryLogger.BufferedLogChannel DefaultEntryLogger.RecentEntryLogsStatusDatastructure which maintains the status of logchannels. DefaultFileChannel DefaultFileChannelProviderA wrapper of FileChannel. EntryKeyAn
EntryKeyrepresents an entry in a ledger, identified by
EntryKeyValueAn entry Key/Value. EntryLocationAn
EntryLocationrepresents the location where an entry is stored.
EntryLogCompactorThis is the basic entry log compactor to compact entry logs. EntryLoggerAllocatorAn allocator pre-allocates entry log files. EntryLogManagerBase EntryLogManagerForEntryLogPerLedger EntryLogManagerForEntryLogPerLedger.BufferedLogChannelWithDirInfo EntryLogManagerForSingleEntryLog EntryLogMetadataRecords the total size, remaining size and the set of ledgers that comprise a entry log. EntryLogMetadata.EntryLogMetadataRecyclableRecyclable
EntryMemTableThe EntryMemTable holds in-memory representation to the entries not-yet flushed. EntryMemTable.EntrySkipListEntry skip list. EntryMemTableWithParallelFlusherEntryMemTableWithParallelFlusher. ExitCodeExit code used to exit bookie server. FileInfoThis is the file handle for a ledger's index file that maps entry ids to location. FileInfoBackingCache FileSystemUpgradeApplication for upgrading the bookkeeper filesystem between versions. GarbageCollectionStatusThis is the garbage collection thread status. GarbageCollectionStatus.GarbageCollectionStatusBuilder GarbageCollectorThreadThis is the garbage collector thread that runs in the background to remove any entry log files that no longer contains any active ledger. HandleFactoryImpl IndexInMemPageMgr IndexPersistenceMgrA
IndexPersistenceMgris responsible for managing the persistence state for the index in a bookie.
InMemoryEntryLogMetadataMapIn-memory metadata-store to store entry-log metadata-map in memory-map. InterleavedLedgerStorageInterleave ledger storage. InterleavedStorageRegenerateIndexOpScan all entries in the entry log and rebuild the index file for one ledger. InterleavedStorageRegenerateIndexOp.DryRunLedgerCache InterleavedStorageRegenerateIndexOp.RecoveryStats JournalProvide journal related management. Journal.QueueEntryJournal Entry to Record. JournalChannelSimple wrapper around FileChannel to add versioning information to the file. KeyComparatorCompare EntryKey. LastAddConfirmedUpdateNotificationA signal object is used for notifying the observers when the
LedgerCache.LedgerIndexMetadataRepresents summary of ledger metadata. LedgerCacheImplImplementation of LedgerCache interface. LedgerDescriptorImplements a ledger inside a bookie. LedgerDescriptorImplImplements a ledger inside a bookie. LedgerDescriptorReadOnlyImplImplements a ledger inside a bookie. LedgerDirsManagerThis class manages ledger directories used by the bookie. LedgerDirsMonitorThread to monitor the disk space periodically. LedgerEntryPageThis is a page in the LedgerCache. LedgerStorage.DetectedInconsistencyClass for describing location of a generic inconsistency. LedgerStorageFactoryA factory that creates
LegacyCookieValidationLegacy implementation of CookieValidation. LocalBookieEnsemblePlacementPolicySpecial ensemble placement policy that always return local bookie. LogMarkJournal stream position. ReadOnlyBookieImplements a read only bookie. ReadOnlyDefaultEntryLoggerRead Only Entry Logger. ReadOnlyFileInfoProvide a readonly file info. ScanAndCompareGarbageCollectorGarbage collector implementation using scan and compare. ScrubberStatsStats associated with the consistency checker. SkipListArenaSkipList allocation buffer to reduce memory fragment. SkipListArena.MemorySliceThe result of a single allocation. SlowBufferedChannelStrictly for testing. SortedLedgerStorageA
SortedLedgerStorageis an extension of
SyncThreadSyncThread is a background thread which help checkpointing ledger storage when a checkpoint is requested. TransactionalEntryLogCompactorThis class is used for compaction. TransactionalEntryLogCompactor.CompactionPhaseAn abstract class that would be extended to be the actual transactional phases for compaction. UncleanShutdownDetectionImplUsed to determine if the prior shutdown was unclean or not.
Enum Summary Enum Description BookieStatus.BookieMode LedgerStorage.StorageStateStorageState flags.
Exception Summary Exception Description Bookie.NoEntryExceptionException is thrown when no such an entry is found in this bookie. Bookie.NoLedgerExceptionException is thrown when no such a ledger is found in this bookie. BookieExceptionSignals that a Bookie exception of some sort has occurred. BookieException.BookieIllegalOpExceptionSignals that an illegal operation attempts to access the data in a bookie. BookieException.BookieUnauthorizedAccessExceptionSignals that an unauthorized operation attempts to access the data in a bookie. BookieException.CookieExistExceptionSignal that cookie already exists when creating a new cookie. BookieException.CookieNotFoundExceptionSignal that no cookie is found when starting a bookie. BookieException.DataUnknownExceptionSignal when a ledger is in a limbo state and certain operations cannot be performed on it. BookieException.DiskPartitionDuplicationExceptionSignals when multiple ledger/journal directories are mounted in same disk partition. BookieException.EntryLogMetadataMapExceptionSignal that error while accessing entry-log metadata map. BookieException.InvalidCookieExceptionSignal that an invalid cookie is found when starting a bookie. BookieException.LedgerFencedExceptionSignals that a ledger has been fenced in a bookie. BookieException.MetadataStoreExceptionSignal when bookie has problems on accessing metadata store. BookieException.OperationRejectedExceptionSignals that a ledger's operation has been rejected by an internal component because of the resource saturation. BookieException.UnknownBookieIdExceptionSignal when bookie has problems on accessing metadata store. BookieException.UpgradeExceptionSignals that an exception occurs on upgrading a bookie. BufferedChannelBase.BufferedChannelClosedException DefaultEntryLogger.EntryLookupExceptionException type for representing lookup errors. DefaultEntryLogger.EntryLookupException.InvalidEntryLengthExceptionRepresents case where log is present, but encoded entry length header is invalid. DefaultEntryLogger.EntryLookupException.MissingEntryExceptionRepresents case where entry log is present, but does not contain the specified entry. DefaultEntryLogger.EntryLookupException.MissingLogFileExceptionRepresents case where log file is missing. DefaultEntryLogger.EntryLookupException.WrongEntryExceptionRepresents case where the entry at pos is wrong. FileInfo.FileInfoDeletedException LedgerCache.NoIndexForLedgerExceptionSpecific exception to encode the case where the index is not present. LedgerDirsManager.NoWritableLedgerDirExceptionIndicates All configured ledger directories are full. ShortReadExceptionShort Read Exception.