public class ServerConfiguration extends AbstractConfiguration<ServerConfiguration>
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ADVERTISED_ADDRESS |
protected static java.lang.String |
ALLOW_EPHEMERAL_PORTS |
protected static java.lang.String |
ALLOW_LOOPBACK |
protected static java.lang.String |
ALLOW_MULTIPLEDIRS_UNDER_SAME_DISKPARTITION |
protected static java.lang.String |
ALLOW_STORAGE_EXPANSION |
protected static java.lang.String |
AUDITOR_ACQUIRE_CONCURRENT_OPEN_LEDGER_OPERATIONS_TIMEOUT_MSEC |
protected static java.lang.String |
AUDITOR_LEDGER_VERIFICATION_PERCENTAGE |
protected static java.lang.String |
AUDITOR_MAX_NUMBER_OF_CONCURRENT_OPEN_LEDGER_OPERATIONS |
protected static java.lang.String |
AUDITOR_PERIODIC_BOOKIE_CHECK_INTERVAL |
protected static java.lang.String |
AUDITOR_PERIODIC_CHECK_INTERVAL |
protected static java.lang.String |
AUDITOR_PERIODIC_PLACEMENT_POLICY_CHECK_INTERVAL |
protected static java.lang.String |
AUDITOR_REPLICAS_CHECK_INTERVAL |
protected static java.lang.String |
AUTHORIZED_ROLES |
protected static java.lang.String |
AUTO_RECOVERY_DAEMON_ENABLED |
protected static java.lang.String |
BOOKIE_AUTH_PROVIDER_FACTORY_CLASS |
protected static java.lang.String |
BOOKIE_ID |
protected static java.lang.String |
BOOKIE_PORT |
protected static java.lang.String |
BYTEBUF_ALLOCATOR_SIZE_INITIAL |
protected static java.lang.String |
BYTEBUF_ALLOCATOR_SIZE_MAX |
protected static java.lang.String |
BYTEBUF_ALLOCATOR_SIZE_MIN |
protected static java.lang.String |
CLOSE_CHANNEL_ON_RESPONSE_TIMEOUT |
protected static java.lang.String |
COMPACTION_MAX_OUTSTANDING_REQUESTS |
protected static java.lang.String |
COMPACTION_RATE |
protected static java.lang.String |
COMPACTION_RATE_BY_BYTES |
protected static java.lang.String |
COMPACTION_RATE_BY_ENTRIES |
protected static java.lang.String |
DEATH_WATCH_INTERVAL |
protected static java.lang.String |
DISABLE_SERVER_SOCKET_BIND |
protected static java.lang.String |
DISK_CHECK_INTERVAL |
protected static java.lang.String |
DISK_USAGE_LWM_THRESHOLD |
protected static java.lang.String |
DISK_USAGE_THRESHOLD |
protected static java.lang.String |
DISK_USAGE_WARN_THRESHOLD |
protected static java.lang.String |
ENABLE_LOCAL_TRANSPORT |
protected static java.lang.String |
ENABLE_STATISTICS |
protected static java.lang.String |
ENABLE_TASK_EXECUTION_STATS |
protected static java.lang.String |
ENTRY_LOG_FILE_PREALLOCATION_ENABLED |
protected static java.lang.String |
ENTRY_LOG_PER_LEDGER_COUNTER_LIMITS_MULT_FACTOR |
protected static java.lang.String |
ENTRY_LOG_PER_LEDGER_ENABLED |
protected static java.lang.String |
ENTRY_LOG_SIZE_LIMIT |
protected static org.apache.bookkeeper.common.conf.ConfigKey |
ENTRY_LOG_SIZE_LIMIT_KEY |
protected static java.lang.String |
ENTRYLOGMAP_ACCESS_EXPIRYTIME_INSECONDS |
protected static java.lang.String |
EXTRA_SERVER_COMPONENTS |
protected static java.lang.String |
FILEINFO_CACHE_INITIAL_CAPACITY |
protected static java.lang.String |
FILEINFO_FORMAT_VERSION_TO_WRITE |
protected static java.lang.String |
FILEINFO_MAX_IDLE_TIME |
protected static java.lang.String |
FLUSH_ENTRYLOG_INTERVAL_BYTES |
protected static java.lang.String |
FLUSH_INTERVAL |
protected static java.lang.String |
FORCE_ALLOW_COMPACTION |
protected static java.lang.String |
FORCE_READ_ONLY_BOOKIE |
protected static java.lang.String |
GC_OVERREPLICATED_LEDGER_WAIT_TIME |
protected static java.lang.String |
GC_WAIT_TIME |
protected static java.lang.String |
HTTP_SERVER_ENABLED |
protected static java.lang.String |
HTTP_SERVER_PORT |
protected static java.lang.String |
IGNORE_EXTRA_SERVER_COMPONENTS_STARTUP_FAILURES |
protected static java.lang.String |
IN_FLIGHT_READ_ENTRY_NUM_IN_LEDGER_CHECKER |
protected static java.lang.String |
INDEX_DIRS |
protected static java.lang.String |
IS_FORCE_GC_ALLOW_WHEN_NO_SPACE |
protected static java.lang.String |
IS_THROTTLE_BY_BYTES |
protected static java.lang.String |
JOURNAL_ADAPTIVE_GROUP_WRITES |
protected static java.lang.String |
JOURNAL_ALIGNMENT_SIZE |
protected static java.lang.String |
JOURNAL_BUFFERED_ENTRIES_THRESHOLD |
protected static java.lang.String |
JOURNAL_BUFFERED_WRITES_THRESHOLD |
protected static java.lang.String |
JOURNAL_DIR |
protected static java.lang.String |
JOURNAL_DIRS |
protected static java.lang.String |
JOURNAL_FLUSH_WHEN_QUEUE_EMPTY |
protected static java.lang.String |
JOURNAL_FORMAT_VERSION_TO_WRITE |
protected static java.lang.String |
JOURNAL_MAX_GROUP_WAIT_MSEC |
protected static java.lang.String |
JOURNAL_MAX_MEMORY_SIZE_MB |
protected static java.lang.String |
JOURNAL_PAGECACHE_FLUSH_INTERVAL_MSEC |
protected static java.lang.String |
JOURNAL_PRE_ALLOC_SIZE |
protected static java.lang.String |
JOURNAL_QUEUE_SIZE |
protected static java.lang.String |
JOURNAL_REMOVE_FROM_PAGE_CACHE |
protected static java.lang.String |
JOURNAL_SYNC_DATA |
protected static java.lang.String |
JOURNAL_WRITE_BUFFER_SIZE |
protected static java.lang.String |
JOURNAL_WRITE_DATA |
protected static java.lang.String |
LEDGER_DIRS |
protected static java.lang.String |
LEDGER_STORAGE_CLASS |
protected static org.apache.bookkeeper.common.conf.ConfigKey |
LEDGER_STORAGE_CLASS_KEY |
protected static java.lang.String |
LISTENING_INTERFACE |
protected static java.lang.String |
LOCAL_CONSISTENCY_CHECK_ON_STARTUP |
protected static java.lang.String |
LOCAL_SCRUB_PERIOD |
protected static java.lang.String |
LOCAL_SCRUB_RATE_LIMIT |
protected static java.lang.String |
LOCK_RELEASE_OF_FAILED_LEDGER_GRACE_PERIOD |
protected static java.lang.String |
LOST_BOOKIE_RECOVERY_DELAY |
protected static java.lang.String |
MAJOR_COMPACTION_INTERVAL |
protected static java.lang.String |
MAJOR_COMPACTION_MAX_TIME_MILLIS |
protected static java.lang.String |
MAJOR_COMPACTION_THRESHOLD |
protected static java.lang.String |
MAX_ADDS_IN_PROGRESS_LIMIT |
protected static java.lang.String |
MAX_BACKUP_JOURNALS |
protected static java.lang.String |
MAX_JOURNAL_SIZE |
protected static java.lang.String |
MAX_PENDING_ADD_REQUESTS_PER_THREAD |
protected static java.lang.String |
MAX_PENDING_READ_REQUESTS_PER_THREAD |
protected static java.lang.String |
MAX_READS_IN_PROGRESS_LIMIT |
protected static java.lang.String |
MAXIMUM_NUMBER_OF_ACTIVE_ENTRYLOGS |
protected static java.lang.String |
MIN_USABLESIZE_FOR_ENTRYLOG_CREATION |
protected static java.lang.String |
MIN_USABLESIZE_FOR_HIGH_PRIORITY_WRITES |
protected static java.lang.String |
MIN_USABLESIZE_FOR_INDEXFILE_CREATION |
protected static java.lang.String |
MINOR_COMPACTION_INTERVAL |
protected static java.lang.String |
MINOR_COMPACTION_MAX_TIME_MILLIS |
protected static java.lang.String |
MINOR_COMPACTION_THRESHOLD |
protected static java.lang.String |
NUM_ADD_WORKER_THREADS |
protected static java.lang.String |
NUM_HIGH_PRIORITY_WORKER_THREADS |
protected static java.lang.String |
NUM_JOURNAL_CALLBACK_THREADS |
protected static java.lang.String |
NUM_LONG_POLL_WORKER_THREADS |
protected static java.lang.String |
NUM_READ_WORKER_THREADS |
protected static java.lang.String |
NUMBER_OF_MEMTABLE_FLUSH_THREADS |
protected static java.lang.String |
OPEN_FILE_LIMIT |
protected static java.lang.String |
OPEN_LEDGER_REREPLICATION_GRACE_PERIOD |
protected static java.lang.String |
PAGE_LIMIT |
protected static java.lang.String |
PAGE_SIZE |
protected static java.lang.String |
PERSIST_BOOKIE_STATUS_ENABLED |
protected static java.lang.String |
READ_BUFFER_SIZE |
protected static java.lang.String |
READ_ONLY_MODE_ENABLED |
protected static java.lang.String |
READ_WORKER_THREADS_THROTTLING_ENABLED |
protected static java.lang.String |
REGISTRATION_MANAGER_CLASS |
protected static java.lang.String |
REQUEST_TIMER_NO_OF_TICKS |
protected static java.lang.String |
REQUEST_TIMER_TICK_DURATION_MILLISEC |
protected static java.lang.String |
ROCKSDB_DELETE_ENTRIES_BATCH_SIZE |
protected static java.lang.String |
RW_REREPLICATE_BACKOFF_MS |
protected static java.lang.String |
SERVER_NUM_IO_THREADS |
protected static java.lang.String |
SERVER_SOCK_KEEPALIVE |
protected static java.lang.String |
SERVER_SOCK_LINGER |
protected static java.lang.String |
SERVER_TCP_NODELAY |
protected static java.lang.String |
SERVER_WRITEBUFFER_HIGH_WATER_MARK |
protected static java.lang.String |
SERVER_WRITEBUFFER_LOW_WATER_MARK |
protected static java.lang.String |
SKIP_LIST_CHUNK_SIZE_ENTRY |
protected static java.lang.String |
SKIP_LIST_MAX_ALLOC_ENTRY |
protected static java.lang.String |
SKIP_LIST_SIZE_LIMIT |
protected static java.lang.String |
SORTED_LEDGER_STORAGE_ENABLED |
protected static java.lang.String |
STATS_PROVIDER_CLASS |
protected static java.lang.String |
UNDERREPLICATED_LEDGER_RECOVERY_GRACE_PERIOD |
protected static java.lang.String |
USE_HOST_NAME_AS_BOOKIE_ID |
protected static java.lang.String |
USE_SHORT_HOST_NAME |
protected static java.lang.String |
USE_TRANSACTIONAL_COMPACTION |
protected static java.lang.String |
VERIFY_METADATA_ON_GC |
protected static java.lang.String |
WAIT_TIMEOUT_ON_RESPONSE_BACKPRESSURE |
protected static java.lang.String |
WRITE_BUFFER_SIZE |
protected static java.lang.String |
ZK_RETRY_BACKOFF_MAX_MS |
protected static java.lang.String |
ZK_RETRY_BACKOFF_START_MS |
ALLOCATOR_LEAK_DETECTION_POLICY, ALLOCATOR_OOM_POLICY, ALLOCATOR_POOLING_CONCURRENCY, ALLOCATOR_POOLING_POLICY, ALLOW_SHADED_LEDGER_MANAGER_FACTORY_CLASS, AVAILABLE_NODE, DEFAULT_ENTRY_FORMATTER, DEFAULT_LEDGERID_FORMATTER, DEFAULT_LOADER, DEFAULT_NETTY_MAX_FRAME_SIZE, DESIRED_NUM_ZONES_PER_WRITE_QUORUM, ENABLE_BUSY_WAIT, ENFORCE_MIN_NUM_FAULT_DOMAINS_FOR_WRITE, ENFORCE_MIN_NUM_RACKS_PER_WRITE_QUORUM, ENFORCE_STRICT_ZONEAWARE_PLACEMENT, ENTRY_FORMATTER_CLASS, IGNORE_LOCAL_NODE_IN_PLACEMENT_POLICY, LEDGER_MANAGER_FACTORY_CLASS, LEDGER_MANAGER_FACTORY_DISABLE_CLASS_CHECK, LEDGER_MANAGER_TYPE, LEDGERID_FORMATTER_CLASS, LIMIT_STATS_LOGGING, METADATA_SERVICE_URI, METASTORE_IMPL_CLASS, METASTORE_MAX_ENTRIES_PER_SCAN, MIN_NUM_RACKS_PER_WRITE_QUORUM, MIN_NUM_ZONES_PER_WRITE_QUORUM, NETTY_MAX_FRAME_SIZE, PERMITTED_STARTUP_USERS, PRESERVE_MDC_FOR_TASK_EXECUTION, READ_SYSTEM_PROPERTIES_PROPERTY, REPLICATION_RATE_BY_BYTES, REREPLICATION_ENTRY_BATCH_SIZE, SHADED_LEDGER_MANAGER_FACTORY_CLASS_PREFIX, STORE_SYSTEMTIME_AS_LEDGER_CREATION_TIME, STORE_SYSTEMTIME_AS_LEDGER_UNDERREPLICATED_MARK_TIME, TLS_CERT_FILES_REFRESH_DURATION_SECONDS, TLS_CERTIFICATE_PATH, TLS_CLIENT_AUTHENTICATION, TLS_ENABLED_CIPHER_SUITES, TLS_ENABLED_PROTOCOLS, TLS_KEYSTORE, TLS_KEYSTORE_PASSWORD_PATH, TLS_KEYSTORE_TYPE, TLS_PROVIDER, TLS_PROVIDER_FACTORY_CLASS, TLS_TRUSTSTORE, TLS_TRUSTSTORE_PASSWORD_PATH, TLS_TRUSTSTORE_TYPE, ZK_ENABLE_SECURITY, ZK_LEDGERS_ROOT_PATH, ZK_REQUEST_RATE_LIMIT, ZK_RETRY_BACKOFF_MAX_RETRIES, ZK_SERVERS, ZK_TIMEOUT| Constructor and Description |
|---|
ServerConfiguration()
Construct a default configuration object.
|
ServerConfiguration(AbstractConfiguration conf)
Construct a configuration based on other configuration.
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.String |
getAdvertisedAddress()
Get the configured advertised address for the bookie.
|
boolean |
getAllowEphemeralPorts()
Is the bookie allowed to use an ephemeral port (port 0) as its server port.
|
boolean |
getAllowLoopback()
Is the bookie allowed to use a loopback interface as its primary
interface(i.e.
|
boolean |
getAllowStorageExpansion()
Return whether we should allow addition of ledger/index dirs to an existing bookie.
|
int |
getAuditorAcquireConcurrentOpenLedgerOperationsTimeoutMSec()
Get the acquire concurrent open ledger operations timeout.
|
long |
getAuditorLedgerVerificationPercentage()
Get what percentage of a ledger (fragment)'s entries will be verified.
|
int |
getAuditorMaxNumberOfConcurrentOpenLedgerOperations()
Get the semaphore limit value of getting ledger from zookeeper in auto recovery.
|
long |
getAuditorPeriodicBookieCheckInterval()
Get the interval between auditor bookie check runs.
|
long |
getAuditorPeriodicCheckInterval()
Get the regularity at which the auditor checks all ledgers.
|
long |
getAuditorPeriodicPlacementPolicyCheckInterval()
Get the regularity at which the auditor does placement policy check of
all ledgers, which are closed.
|
long |
getAuditorPeriodicReplicasCheckInterval()
Get the interval at which the auditor does replicas check of all ledgers.
|
java.lang.String[] |
getAuthorizedRoles()
Get the authorized roles.
|
java.lang.String |
getBookieAuthProviderFactoryClass()
Get the bookie authentication provider factory class name.
|
java.lang.String |
getBookieId()
Get the configured BookieId for the bookie.
|
int |
getBookiePort()
Get bookie port that bookie server listen on.
|
boolean |
getCloseChannelOnResponseTimeout()
Configures action in case if server timed out sending response to the client.
|
int |
getCompactionMaxOutstandingRequests()
Get the maximum number of entries which can be compacted without flushing.
|
int |
getCompactionRate()
Deprecated.
replaced by
getCompactionRateByEntries() |
int |
getCompactionRateByBytes()
Get the rate of compaction adds.
|
int |
getCompactionRateByEntries()
Get the rate of compaction adds.
|
int |
getDeathWatchInterval()
Get bookie death watch interval.
|
int |
getDiskCheckInterval()
Get the disk checker interval.
|
float |
getDiskLowWaterMarkUsageThreshold()
Returns disk free space low water mark threshold.
|
float |
getDiskUsageThreshold()
Returns disk free space threshold.
|
float |
getDiskUsageWarnThreshold()
Returns the warning threshold for disk usage.
|
boolean |
getEnableTaskExecutionStats()
Whether to enable recording task execution stats.
|
int |
getEntrylogMapAccessExpiryTimeInSeconds() |
int |
getEntryLogPerLedgerCounterLimitsMultFactor() |
long |
getEntryLogSizeLimit()
Get entry logger size limitation.
|
java.lang.String[] |
getExtraServerComponents()
Get the extra list of server lifecycle components to enable on a bookie server.
|
int |
getFileInfoCacheInitialCapacity()
Get the minimum total size for the internal file info cache tables.
|
int |
getFileInfoFormatVersionToWrite()
Get fileinfo format version to write.
|
long |
getFileInfoMaxIdleTime()
Get the max idle time allowed for a open file info existed in file info cache.
|
int |
getFlushInterval()
Get flush interval.
|
long |
getFlushIntervalInBytes()
Set entry log flush interval in bytes.
|
long |
getGcOverreplicatedLedgerWaitTimeMillis()
Get wait time in millis for garbage collection of overreplicated ledgers.
|
long |
getGcWaitTime()
Get Garbage collection wait time.
|
int |
getHttpServerPort()
Get the http server port.
|
boolean |
getIgnoreExtraServerComponentsStartupFailures()
Return the flag whether to ignore startup failures on loading server components specified at
getExtraServerComponents(). |
java.lang.String[] |
getIndexDirNames()
Get dir name to store index files.
|
java.io.File[] |
getIndexDirs()
Get index dir to store ledger index files.
|
int |
getInFlightReadEntryNumInLedgerChecker()
Get in flight read entry number when ledger checker.
|
boolean |
getIsForceGCAllowWhenNoSpace()
Get whether force compaction is allowed when disk full or almost full.
|
boolean |
getIsThrottleByBytes()
Get whether use bytes to throttle garbage collector compaction or not.
|
boolean |
getJournalAdaptiveGroupWrites()
Should we group journal force writes.
|
int |
getJournalAlignmentSize()
All the journal writes and commits should be aligned to given size.
|
long |
getJournalBufferedEntriesThreshold()
Maximum entries to buffer to impose on a journal write to achieve grouping.
|
long |
getJournalBufferedWritesThreshold()
Maximum bytes to buffer to impose on a journal write to achieve grouping.
|
java.lang.String |
getJournalDirName()
Deprecated.
|
java.lang.String[] |
getJournalDirNames()
Get dir names to store journal files.
|
java.lang.String |
getJournalDirNameWithoutDefault()
Get dir name to store journal files.
|
java.io.File[] |
getJournalDirs()
Get dirs to store journal files.
|
boolean |
getJournalFlushWhenQueueEmpty()
Should we flush the journal when queue is empty.
|
int |
getJournalFormatVersionToWrite()
Get journal format version to write.
|
long |
getJournalMaxGroupWaitMSec()
Maximum latency to impose on a journal write to achieve grouping.
|
long |
getJournalMaxMemorySizeMb()
Get the max amount of memory that can be used by the journal.
|
long |
getJournalPageCacheFlushIntervalMSec()
Get journal pageCache flush interval.
|
int |
getJournalPreAllocSizeMB()
How much space should we pre-allocate at a time in the journal.
|
int |
getJournalQueueSize()
Get size of journal queue.
|
boolean |
getJournalRemovePagesFromCache()
Should we remove pages from page cache after force write.
|
boolean |
getJournalSyncData()
Should the data be fsynced on journal before acknowledgment.
|
int |
getJournalWriteBufferSizeKB()
Size of the write buffers used for the journal.
|
boolean |
getJournalWriteData()
Should the data be written to journal before acknowledgment.
|
java.lang.String[] |
getLedgerDirNames()
Get dir names to store ledger data.
|
java.io.File[] |
getLedgerDirs()
Get dirs that stores ledger data.
|
java.lang.String[] |
getLedgerDirWithoutDefault()
Get dir names to store ledger data.
|
java.lang.String |
getLedgerStorageClass() |
java.lang.String |
getListeningInterface()
Get the network interface that the bookie should
listen for connections on.
|
long |
getLocalScrubPeriod()
Get local scrub interval.
|
double |
getLocalScrubRateLimit()
Get local scrub rate limit (entries/second).
|
long |
getLockReleaseOfFailedLedgerGracePeriod()
Get the grace period, in milliseconds, which the replication worker has
to wait before releasing the lock after it failed to replicate a ledger.
|
int |
getLostBookieRecoveryDelay()
Get how long to delay the recovery of ledgers of a lost bookie.
|
long |
getMajorCompactionInterval()
Get interval to run major compaction, in seconds.
|
long |
getMajorCompactionMaxTimeMillis()
Get the maximum milliseconds to run major compaction.
|
double |
getMajorCompactionThreshold()
Get threshold of major compaction.
|
int |
getMaxAddsInProgressLimit()
Get max number of adds in progress.
|
int |
getMaxBackupJournals()
Max number of older journal files kept.
|
int |
getMaximumNumberOfActiveEntryLogs() |
long |
getMaxJournalSizeMB()
Max journal file size.
|
int |
getMaxPendingAddRequestPerThread()
If add workers threads are enabled, limit the number of pending requests, to avoid the executor queue to grow
indefinitely (default: 10000 entries).
|
int |
getMaxPendingReadRequestPerThread()
If read workers threads are enabled, limit the number of pending requests, to avoid the executor queue to grow
indefinitely (default: 10000 entries).
|
int |
getMaxReadsInProgressLimit()
Get max number of reads in progress.
|
long |
getMinorCompactionInterval()
Get interval to run minor compaction, in seconds.
|
long |
getMinorCompactionMaxTimeMillis()
Get the maximum milliseconds to run minor compaction.
|
double |
getMinorCompactionThreshold()
Get threshold of minor compaction.
|
long |
getMinUsableSizeForEntryLogCreation()
Gets the minimum safe usable size to be available in ledger directory for Bookie to create entry log files.
|
long |
getMinUsableSizeForHighPriorityWrites()
Gets the minimum safe usable size to be available in ledger directory for Bookie to accept high priority writes.
|
long |
getMinUsableSizeForIndexFileCreation()
Gets the minimum safe Usable size to be available in index directory for Bookie to create Index File while
replaying journal at the time of Bookie Start in Readonly Mode (in bytes).
|
int |
getNumAddWorkerThreads()
Get the number of threads that should handle write requests.
|
int |
getNumHighPriorityWorkerThreads()
Get the number of threads that should be used for high priority requests
(i.e.
|
int |
getNumJournalCallbackThreads()
Get the number of threads that should handle journal callbacks.
|
int |
getNumLongPollWorkerThreads()
Get the number of threads that should handle long poll requests.
|
int |
getNumOfMemtableFlushThreads() |
int |
getNumReadWorkerThreads()
Get the number of threads that should handle read requests.
|
int |
getOpenFileLimit()
Get open file limit.
|
long |
getOpenLedgerRereplicationGracePeriod()
Get the grace period which the rereplication worker to wait before
fencing and rereplicating a ledger fragment which is still being written
to, on bookie failure.
|
int |
getPageLimit()
Get limitation number of index pages in ledger cache.
|
int |
getPageSize()
Get page size.
|
int |
getReadBufferBytes()
Get the number of bytes we should use as capacity for
org.apache.bookkeeper.bookie.BufferedReadChannel.
|
int |
getRecvByteBufAllocatorSizeInitial()
Get Recv ByteBuf allocator initial buf size.
|
int |
getRecvByteBufAllocatorSizeMax()
Get Recv ByteBuf allocator max buf size.
|
int |
getRecvByteBufAllocatorSizeMin()
Get Recv ByteBuf allocator min buf size.
|
java.lang.Class<? extends org.apache.bookkeeper.discover.RegistrationManager> |
getRegistrationManagerClass()
Deprecated.
since 4.7.0, in favor of using
AbstractConfiguration.getMetadataServiceUri() |
int |
getRequestTimerNumTicks()
Get the number of ticks per wheel for the request timer.
|
int |
getRequestTimerTickDurationMs()
Get the tick duration in milliseconds.
|
int |
getRocksDBDeleteEntriesBatchSize()
Get entry log location index delete entries batch size from RocksDB.
|
int |
getRwRereplicateBackoffMs()
Get how long to backoff when encountering exception on rereplicating a ledger.
|
int |
getServerNumIOThreads()
Get the number of IO threads.
|
boolean |
getServerSockKeepalive()
Get socket keepalive.
|
int |
getServerSockLinger()
Timeout to drain the socket on close.
|
boolean |
getServerTcpNoDelay()
Is tcp connection no delay.
|
int |
getServerWriteBufferHighWaterMark()
Get server netty channel write buffer high water mark.
|
int |
getServerWriteBufferLowWaterMark()
Get server netty channel write buffer low water mark.
|
int |
getSkipListArenaChunkSize()
Get the number of bytes we should use as chunk allocation for
org.apache.bookkeeper.bookie.SkipListArena.
|
int |
getSkipListArenaMaxAllocSize()
Get the max size we should allocate from the skiplist arena.
|
long |
getSkipListSizeLimit()
Get skip list data size limitation (default 64MB).
|
boolean |
getSortedLedgerStorageEnabled()
Check if sorted-ledger storage enabled (default true).
|
java.lang.Class<? extends org.apache.bookkeeper.stats.StatsProvider> |
getStatsProviderClass()
Get the stats provider used by bookie.
|
protected ServerConfiguration |
getThis()
Trickery to allow inheritance with fluent style.
|
java.lang.String |
getTLSCertificatePath()
Get the path to file containing TLS Certificate.
|
java.lang.String |
getTLSKeyStore()
Get the keystore path for the client.
|
java.lang.String |
getTLSKeyStorePasswordPath()
Get the path to file containing keystore password if the client keystore is password protected.
|
java.lang.String |
getTLSKeyStoreType()
Get the keystore type for client.
|
java.lang.String |
getTLSTrustStore()
Get the truststore path for the client.
|
java.lang.String |
getTLSTrustStorePasswordPath()
Get the path to file containing truststore password if the client truststore is password protected.
|
java.lang.String |
getTLSTrustStoreType()
Get the truststore type for client.
|
long |
getUnderreplicatedLedgerRecoveryGracePeriod()
Gets the grace period (in seconds) for underreplicated ledgers recovery.
|
boolean |
getUseHostNameAsBookieID()
Get whether bookie is using hostname for registration and in ledger
metadata.
|
boolean |
getUseShortHostName()
If bookie is using hostname for registration and in ledger metadata then
whether to use short hostname or FQDN hostname.
|
boolean |
getUseTransactionalCompaction()
Get whether to use transactional compaction and using a separate log for compaction or not.
|
boolean |
getVerifyMetadataOnGC()
Get whether the bookie is configured to double check prior to gc.
|
long |
getWaitTimeoutOnResponseBackpressureMillis()
Timeout controlling wait on response send in case of unresponsive client
(i.e.
|
int |
getWriteBufferBytes()
Get the number of bytes used as capacity for the write buffer.
|
int |
getZkRetryBackoffMaxMs()
Get zookeeper client backoff retry max time in millis.
|
int |
getZkRetryBackoffStartMs()
Get zookeeper client backoff retry start time in millis.
|
boolean |
isAllowMultipleDirsUnderSameDiskPartition()
returns whether it is allowed to have multiple ledger/index/journal
Directories in the same filesystem diskpartition.
|
boolean |
isAutoRecoveryDaemonEnabled()
Get whether the Bookie itself can start auto-recovery service also or not.
|
boolean |
isDisableServerSocketBind()
Get whether to disable bind of server-side sockets.
|
boolean |
isEnableLocalTransport()
Get whether to listen for local JVM clients.
|
boolean |
isEntryLogFilePreAllocationEnabled()
Is entry log file preallocation enabled.
|
boolean |
isEntryLogPerLedgerEnabled() |
boolean |
isForceAllowCompaction()
The force compaction is allowed or not when disabling the entry log compaction.
|
boolean |
isForceReadOnlyBookie()
Get whether the Bookie is force started in read only mode or not.
|
boolean |
isHttpServerEnabled()
Get whether to start the http server or not.
|
boolean |
isLocalConsistencyCheckOnStartup()
True if a local consistency check should be performed on startup.
|
boolean |
isLocalScrubEnabled()
Get whether local scrub is enabled.
|
boolean |
isPersistBookieStatusEnabled()
Get whether to persist the bookie status so that when bookie server restarts,
it will continue using the previous status.
|
boolean |
isReadOnlyModeEnabled()
Get whether read-only mode is enabled.
|
boolean |
isReadWorkerThreadsThrottlingEnabled()
Get the auto-throttling status of the read-worker threads.
|
boolean |
isStatisticsEnabled()
Is statistics enabled.
|
ServerConfiguration |
setAdvertisedAddress(java.lang.String advertisedAddress)
Configure the bookie to advertise a specific address.
|
ServerConfiguration |
setAllowEphemeralPorts(boolean allow)
Configure the bookie to allow using an ephemeral port.
|
ServerConfiguration |
setAllowLoopback(boolean allow)
Configure the bookie to allow loopback interfaces to be used
as the primary bookie interface.
|
ServerConfiguration |
setAllowMultipleDirsUnderSameDiskPartition(boolean allow)
Configure the Bookie to allow/disallow multiple ledger/index/journal
directories in the same filesystem diskpartition.
|
ServerConfiguration |
setAllowStorageExpansion(boolean val)
Change the setting of whether or not we should allow ledger/index
dirs to be added to the current set of dirs.
|
void |
setAuditorAcquireConcurrentOpenLedgerOperationsTimeoutMSec(int timeoutMs)
Set the acquire concurrent open ledger operations timeout.
|
ServerConfiguration |
setAuditorLedgerVerificationPercentage(long auditorLedgerVerificationPercentage)
Set what percentage of a ledger (fragment)'s entries will be verified.
|
void |
setAuditorMaxNumberOfConcurrentOpenLedgerOperations(int semaphore)
Set the semaphore limit value for getting ledger from zookeeper in auto recovery.
|
void |
setAuditorPeriodicBookieCheckInterval(long interval)
Set the interval between auditor bookie checks.
|
void |
setAuditorPeriodicCheckInterval(long interval)
Set the regularity at which the auditor will run a check
of all ledgers.
|
void |
setAuditorPeriodicPlacementPolicyCheckInterval(long interval)
Sets the regularity/interval at which the auditor will run a placement
policy check of all ledgers, which are closed.
|
void |
setAuditorPeriodicReplicasCheckInterval(long interval)
Sets the interval at which the auditor will run a replicas check of all
ledgers.
|
ServerConfiguration |
setAuthorizedRoles(java.lang.String roles)
Set authorized roles.
|
ServerConfiguration |
setAutoRecoveryDaemonEnabled(boolean enabled)
Sets that whether the auto-recovery service can start along with Bookie
server itself or not.
|
void |
setBookieAuthProviderFactoryClass(java.lang.String factoryClass)
Set the bookie authentication provider factory class name.
|
ServerConfiguration |
setBookieId(java.lang.String bookieId)
Configure the bookie to advertise a specific BookieId.
|
ServerConfiguration |
setBookiePort(int port)
Set new bookie port that bookie server listen on.
|
ServerConfiguration |
setCloseChannelOnResponseTimeout(boolean value)
Configures action in case if server timed out sending response to the client.
|
ServerConfiguration |
setCompactionMaxOutstandingRequests(int maxOutstandingRequests)
Set the maximum number of entries which can be compacted without flushing.
|
ServerConfiguration |
setCompactionRate(int rate)
Set the rate of compaction adds.
|
ServerConfiguration |
setCompactionRateByBytes(int rate)
Set the rate of compaction adds.
|
ServerConfiguration |
setCompactionRateByEntries(int rate)
Set the rate of compaction adds.
|
ServerConfiguration |
setDisableServerSocketBind(boolean disableServerSocketBind)
Configure the bookie to disable bind on network interfaces,
this bookie will be available only to BookKeeper clients executed on the local JVM.
|
ServerConfiguration |
setDiskCheckInterval(int interval)
Set the disk checker interval to monitor ledger disk space.
|
ServerConfiguration |
setDiskLowWaterMarkUsageThreshold(float threshold)
Set the disk free space low water mark threshold.
|
ServerConfiguration |
setDiskUsageThreshold(float threshold)
Set the Disk free space threshold as a fraction of the total
after which disk will be considered as full during disk check.
|
ServerConfiguration |
setDiskUsageWarnThreshold(float threshold)
Set the warning threshold for disk usage.
|
ServerConfiguration |
setEnableLocalTransport(boolean enableLocalTransport)
Configure the bookie to listen for BookKeeper clients executed on the local JVM.
|
ServerConfiguration |
setEnableTaskExecutionStats(boolean enabled)
Enable/Disable recording task execution stats.
|
ServerConfiguration |
setEntryLogFilePreAllocationEnabled(boolean enabled)
Enable/disable entry log file preallocation.
|
ServerConfiguration |
setEntrylogMapAccessExpiryTimeInSeconds(int entrylogMapAccessExpiryTimeInSeconds) |
ServerConfiguration |
setEntryLogPerLedgerCounterLimitsMultFactor(int entryLogPerLedgerCounterLimitsMultFactor) |
ServerConfiguration |
setEntryLogPerLedgerEnabled(boolean entryLogPerLedgerEnabled) |
ServerConfiguration |
setEntryLogSizeLimit(long logSizeLimit)
Set entry logger size limitation.
|
ServerConfiguration |
setExtraServerComponents(java.lang.String[] componentClasses)
Set the extra list of server lifecycle components to enable on a bookie server.
|
ServerConfiguration |
setFileInfoCacheInitialCapacity(int initialCapacity)
Set the minimum total size for the internal file info cache tables for initialization.
|
ServerConfiguration |
setFileInfoFormatVersionToWrite(int version)
Set fileinfo format version to write.
|
ServerConfiguration |
setFileInfoMaxIdleTime(long idleTime)
Set the max idle time allowed for a open file info existed in file info cache.
|
ServerConfiguration |
setFlushInterval(int flushInterval)
Set flush interval.
|
ServerConfiguration |
setFlushIntervalInBytes(long flushInterval)
Set entry log flush interval in bytes.
|
ServerConfiguration |
setForceAllowCompaction(boolean enable)
Allow manually force compact the entry log or not.
|
ServerConfiguration |
setForceReadOnlyBookie(boolean enabled)
Sets that whether force start a bookie in readonly mode.
|
ServerConfiguration |
setGcOverreplicatedLedgerWaitTime(long gcWaitTime,
java.util.concurrent.TimeUnit unit)
Set wait time for garbage collection of overreplicated ledgers.
|
ServerConfiguration |
setGcWaitTime(long gcWaitTime)
Set garbage collection wait time.
|
ServerConfiguration |
setHttpServerEnabled(boolean enabled)
Set whether to start the http server or not.
|
ServerConfiguration |
setHttpServerPort(int port)
Set Http server port listening on.
|
ServerConfiguration |
setIgnoreExtraServerComponentsStartupFailures(boolean enabled)
Set the flag whether to ignore startup failures on loading server components specified at
getExtraServerComponents(). |
ServerConfiguration |
setIndexDirName(java.lang.String[] indexDirs)
Set dir name to store index files.
|
ServerConfiguration |
setIsForceGCAllowWhenNoSpace(boolean force)
Set whether force GC is allowed when disk full or almost full.
|
ServerConfiguration |
setIsThrottleByBytes(boolean byBytes)
Set whether use bytes to throttle garbage collector compaction or not.
|
ServerConfiguration |
setJournalAdaptiveGroupWrites(boolean enabled)
Enable/disable group journal force writes.
|
ServerConfiguration |
setJournalAlignmentSize(int size)
Set journal alignment size.
|
ServerConfiguration |
setJournalBufferedEntriesThreshold(int maxEntries)
Set maximum entries to buffer to impose on a journal write to achieve grouping.
|
ServerConfiguration |
setJournalBufferedWritesThreshold(long maxBytes)
Set maximum bytes to buffer to impose on a journal write to achieve grouping.
|
ServerConfiguration |
setJournalDirName(java.lang.String journalDir)
Set dir name to store journal files.
|
ServerConfiguration |
setJournalDirsName(java.lang.String[] journalDirs)
Set dir names to store journal files.
|
ServerConfiguration |
setJournalFlushWhenQueueEmpty(boolean enabled)
Set if we should flush the journal when queue is empty.
|
ServerConfiguration |
setJournalFormatVersionToWrite(int version)
Set journal format version to write.
|
ServerConfiguration |
setJournalMaxGroupWaitMSec(long journalMaxGroupWaitMSec)
Sets the maximum latency to impose on a journal write to achieve grouping.
|
ServerConfiguration |
setJournalMaxMemorySizeMb(long journalMaxMemorySizeMb)
Set the max amount of memory that can be used by the journal.
|
ServerConfiguration |
setJournalPageCacheFlushIntervalMSec(long journalPageCacheFlushIntervalMSec)
Set PageCache flush interval in second.
|
ServerConfiguration |
setJournalQueueSize(int journalQueueSize)
Set the size of the journal queue.
|
ServerConfiguration |
setJournalRemovePagesFromCache(boolean enabled)
Sets that whether should we remove pages from page cache after force write.
|
ServerConfiguration |
setJournalSyncData(boolean syncData)
Enable or disable journal syncs.
|
ServerConfiguration |
setJournalWriteBufferSizeKB(int bufferSizeKB)
Set the size of the write buffers used for the journal.
|
ServerConfiguration |
setJournalWriteData(boolean journalWriteData)
Should the data be written to journal before acknowledgment.
|
ServerConfiguration |
setLedgerDirNames(java.lang.String[] ledgerDirs)
Set dir names to store ledger data.
|
ServerConfiguration |
setLedgerStorageClass(java.lang.String ledgerStorageClass)
Set the
LedgerStorage implementation class name. |
ServerConfiguration |
setListeningInterface(java.lang.String iface)
Set the network interface that the bookie should listen on.
|
void |
setLocalScrubPeriod(long period)
Set local scrub period in seconds (<= 0 for disabled).
|
void |
setLocalScrubRateLimit(double scrubRateLimit)
Get local scrub rate limit (entries/second).
|
void |
setLockReleaseOfFailedLedgerGracePeriod(java.lang.String waitTime)
Set the grace period, in milliseconds, which the replication worker has
to wait before releasing the lock after it failed to replicate a ledger.
|
void |
setLostBookieRecoveryDelay(int interval)
Set the delay interval for starting recovery of a lost bookie.
|
ServerConfiguration |
setMajorCompactionInterval(long interval)
Set interval to run major compaction.
|
ServerConfiguration |
setMajorCompactionMaxTimeMillis(long majorCompactionMaxTimeMillis)
Set the maximum milliseconds to run major compaction.
|
ServerConfiguration |
setMajorCompactionThreshold(double threshold)
Set threshold of major compaction.
|
ServerConfiguration |
setMaxAddsInProgressLimit(int value)
Set max number of adds in progress.
|
ServerConfiguration |
setMaxBackupJournals(int maxBackupJournals)
Set max number of older journal files to kept.
|
ServerConfiguration |
setMaximumNumberOfActiveEntryLogs(int maximumNumberOfActiveEntryLogs) |
ServerConfiguration |
setMaxJournalSizeMB(long maxJournalSize)
Set new max journal file size.
|
ServerConfiguration |
setMaxPendingAddRequestPerThread(int maxPendingAddRequestsPerThread)
Set the max number of pending add requests for each add worker thread.
|
ServerConfiguration |
setMaxPendingReadRequestPerThread(int maxPendingReadRequestsPerThread)
Set the max number of pending read requests for each read worker thread.
|
ServerConfiguration |
setMaxReadsInProgressLimit(int value)
Set max number of reads in progress.
|
ServerConfiguration |
setMinorCompactionInterval(long interval)
Set interval to run minor compaction.
|
ServerConfiguration |
setMinorCompactionMaxTimeMillis(long minorCompactionMaxTimeMillis)
Set the maximum milliseconds to run minor compaction.
|
ServerConfiguration |
setMinorCompactionThreshold(double threshold)
Set threshold of minor compaction.
|
ServerConfiguration |
setMinUsableSizeForEntryLogCreation(long minUsableSizeForEntryLogCreation)
Sets the minimum safe usable size to be available in ledger directory for Bookie to create entry log files.
|
ServerConfiguration |
setMinUsableSizeForHighPriorityWrites(long minUsableSizeForHighPriorityWrites)
Sets the minimum safe usable size to be available in ledger directory for Bookie to accept high priority writes.
|
ServerConfiguration |
setMinUsableSizeForIndexFileCreation(long minUsableSizeForIndexFileCreation)
Sets the minimum safe Usable size to be available in index directory for Bookie to create Index File while
replaying journal at the time of Bookie Start in Readonly Mode (in bytes).
|
ServerConfiguration |
setNettyMaxFrameSizeBytes(int maxSize)
Set the max number of bytes a single message can be that is read by the bookie.
|
ServerConfiguration |
setNumAddWorkerThreads(int numThreads)
Set the number of threads that would handle write requests.
|
ServerConfiguration |
setNumHighPriorityWorkerThreads(int numThreads)
Set the number of threads that should be used for high priority requests
(i.e.
|
ServerConfiguration |
setNumJournalCallbackThreads(int numThreads)
Set the number of threads that would handle journal callbacks.
|
ServerConfiguration |
setNumLongPollWorkerThreads(int numThreads)
Set the number of threads that should handle long poll requests.
|
ServerConfiguration |
setNumOfMemtableFlushThreads(int numOfMemtableFlushThreads) |
ServerConfiguration |
setNumReadWorkerThreads(int numThreads)
Set the number of threads that would handle read requests.
|
ServerConfiguration |
setOpenFileLimit(int fileLimit)
Set limitation of number of open files.
|
void |
setOpenLedgerRereplicationGracePeriod(java.lang.String waitTime)
Set the grace period which the rereplication worker will wait before
fencing and rereplicating a ledger fragment which is still being written
to, on bookie failure.
|
ServerConfiguration |
setPageLimit(int pageLimit)
Set limitation number of index pages in ledger cache.
|
ServerConfiguration |
setPageSize(int pageSize)
Set page size.
|
ServerConfiguration |
setPersistBookieStatusEnabled(boolean enabled)
Whether to persist the bookie status so that when bookie server restarts,
it will continue using the previous status.
|
ServerConfiguration |
setReadBufferBytes(int readBufferSize)
Set the number of bytes we should use as capacity for
org.apache.bookkeeper.bookie.BufferedReadChannel.
|
ServerConfiguration |
setReadOnlyModeEnabled(boolean enabled)
Set whether the bookie is able to go into read-only mode.
|
ServerConfiguration |
setReadWorkerThreadsThrottlingEnabled(boolean throttle)
Use auto-throttling of the read-worker threads.
|
void |
setRecvByteBufAllocatorSizeInitial(int size)
Set Recv ByteBuf allocator initial buf size.
|
void |
setRecvByteBufAllocatorSizeMax(int size)
Set Recv ByteBuf allocator max buf size.
|
void |
setRecvByteBufAllocatorSizeMin(int size)
Set Recv ByteBuf allocator min buf size.
|
void |
setRegistrationManagerClass(java.lang.Class<? extends org.apache.bookkeeper.discover.RegistrationManager> regManagerClass)
Deprecated.
since 4.7.0, in favor of using
AbstractConfiguration.setMetadataServiceUri(String) |
ServerConfiguration |
setRequestTimerNumTicks(int tickCount)
Set the number of ticks per wheel for the request timer.
|
ServerConfiguration |
setRequestTimerTickDurationMs(int tickDuration)
Set the tick duration in milliseconds.
|
ServerConfiguration |
setRocksDBDeleteEntriesBatchSize(int rocksDBDeleteEntriesBatchSize)
Set entry log location index delete entries batch size from RocksDB.
|
void |
setRwRereplicateBackoffMs(int backoffMs)
Set how long to backoff when encountering exception on rereplicating a ledger.
|
ServerConfiguration |
setServerNumIOThreads(int numThreads)
Set the number of IO threads.
|
ServerConfiguration |
setServerSockKeepalive(boolean keepalive)
Set socket keepalive setting.
|
ServerConfiguration |
setServerSockLinger(int linger)
Set socket linger timeout on close.
|
ServerConfiguration |
setServerTcpNoDelay(boolean noDelay)
Set socket nodelay setting.
|
ServerConfiguration |
setServerWriteBufferHighWaterMark(int waterMark)
Set server netty channel write buffer high water mark.
|
ServerConfiguration |
setServerWriteBufferLowWaterMark(int waterMark)
Set server netty channel write buffer low water mark.
|
ServerConfiguration |
setSkipListArenaChunkSize(int size)
Set the number of bytes we used as chunk allocation for
org.apache.bookkeeper.bookie.SkipListArena.
|
ServerConfiguration |
setSkipListArenaMaxAllocSize(int size)
Set the max size we should allocate from the skiplist arena.
|
ServerConfiguration |
setSkipListSizeLimit(int size)
Set skip list size limit.
|
ServerConfiguration |
setSortedLedgerStorageEnabled(boolean enabled)
Deprecated.
Use
setLedgerStorageClass(String) to configure the implementation class |
ServerConfiguration |
setStatisticsEnabled(boolean enabled)
Turn on/off statistics.
|
ServerConfiguration |
setStatsProviderClass(java.lang.Class<? extends org.apache.bookkeeper.stats.StatsProvider> providerClass)
Set the stats provider used by bookie.
|
ServerConfiguration |
setTLSCertificatePath(java.lang.String arg)
Set the path to file containing TLS Certificate.
|
ServerConfiguration |
setTLSKeyStore(java.lang.String arg)
Set the keystore path for the client.
|
ServerConfiguration |
setTLSKeyStorePasswordPath(java.lang.String arg)
Set the path to file containing keystore password, if the client keystore is password protected.
|
ServerConfiguration |
setTLSKeyStoreType(java.lang.String arg)
Set the keystore type for client.
|
ServerConfiguration |
setTLSTrustStore(java.lang.String arg)
Set the truststore path for the client.
|
ServerConfiguration |
setTLSTrustStorePasswordPath(java.lang.String arg)
Set the path to file containing truststore password, if the client truststore is password protected.
|
ServerConfiguration |
setTLSTrustStoreType(java.lang.String arg)
Set the truststore type for client.
|
void |
setUnderreplicatedLedgerRecoveryGracePeriod(long gracePeriod)
Sets the grace period (in seconds) for underreplicated ledgers recovery.
|
ServerConfiguration |
setUseHostNameAsBookieID(boolean useHostName)
Configure the bookie to use its hostname to register with the
co-ordination service(eg: zookeeper) and in ledger metadata.
|
ServerConfiguration |
setUseShortHostName(boolean useShortHostName)
Configure the bookie to use its short hostname or FQDN hostname to
register with the co-ordination service(eg: zookeeper) and in ledger
metadata.
|
ServerConfiguration |
setUseTransactionalCompaction(boolean useTransactionalCompaction)
Set whether to use transactional compaction and using a separate log for compaction or not.
|
ServerConfiguration |
setVerifyMetadataOnGc(boolean verifyMetadataOnGC)
Set whether the bookie is configured to double check prior to gc.
|
ServerConfiguration |
setWaitTimeoutOnResponseBackpressureMillis(long value)
Timeout controlling wait on response send in case of unresponsive client
(i.e.
|
ServerConfiguration |
setWriteBufferBytes(int writeBufferBytes)
Set the number of bytes used as capacity for the write buffer.
|
ServerConfiguration |
setZkRetryBackoffMaxMs(int retryMs)
Set zookeeper client backoff retry max time in millis.
|
ServerConfiguration |
setZkRetryBackoffStartMs(int retryMs)
Set zookeeper client backoff retry start time in millis.
|
void |
validate()
Validate the configuration.
|
asJson, getAllocatorLeakDetectionPolicy, getAllocatorOutOfMemoryPolicy, getAllocatorPoolingConcurrency, getAllocatorPoolingPolicy, getClientAuthProviderFactoryClass, getDesiredNumZonesPerWriteQuorum, getEnforceMinNumFaultDomainsForWrite, getEnforceMinNumRacksPerWriteQuorum, getEnforceStrictZoneawarePlacement, getEntryFormatterClass, getFeature, getIgnoreLocalNodeInPlacementPolicy, getLedgerIdFormatterClass, getLedgerManagerFactoryClass, getLedgerManagerFactoryClassName, getLedgerManagerLayoutStringFromFactoryClass, getLedgerManagerType, getLimitStatsLogging, getMetadataServiceUri, getMetadataServiceUriUnchecked, getMetastoreImplClass, getMetastoreMaxEntriesPerScan, getMinNumRacksPerWriteQuorum, getMinNumZonesPerWriteQuorum, getNettyMaxFrameSizeBytes, getPermittedStartupUsers, getPreserveMdcForTaskExecution, getReplicationRateByBytes, getRereplicationEntryBatchSize, getShadedLedgerManagerFactoryClassPrefix, getStoreSystemTimeAsLedgerUnderreplicatedMarkTime, getTLSCertFilesRefreshDurationSeconds, getTLSClientAuthentication, getTLSEnabledCipherSuites, getTLSEnabledProtocols, getTLSProvider, getTLSProviderFactoryClass, getZkAvailableBookiesPath, getZkLedgersRootPath, getZkRequestRateLimit, getZkRetryBackoffMaxRetries, getZkServers, getZkTimeout, isBusyWaitEnabled, isShadedLedgerManagerFactoryClassAllowed, isZkEnableSecurity, loadConf, loadConf, setAllocatorLeakDetectionPolicy, setAllocatorOutOfMemoryPolicy, setAllocatorPoolingConcurrenncy, setAllocatorPoolingPolicy, setAllowShadedLedgerManagerFactoryClass, setBusyWaitEnabled, setClientAuthProviderFactoryClass, setDesiredNumZonesPerWriteQuorum, setEnforceMinNumFaultDomainsForWrite, setEnforceMinNumRacksPerWriteQuorum, setEnforceStrictZoneawarePlacement, setEntryFormatterClass, setFeature, setIgnoreLocalNodeInPlacementPolicy, setLedgerIdFormatterClass, setLedgerManagerFactoryClass, setLedgerManagerFactoryClassName, setLedgerManagerType, setLimitStatsLogging, setMetadataServiceUri, setMetastoreImplClass, setMetastoreMaxEntriesPerScan, setMinNumRacksPerWriteQuorum, setMinNumZonesPerWriteQuorum, setPermittedStartupUsers, setPreserveMdcForTaskExecution, setReplicationRateByBytes, setRereplicationEntryBatchSize, setShadedLedgerManagerFactoryClassPrefix, setStoreSystemTimeAsLedgerUnderreplicatedMarkTime, setTLSCertFilesRefreshDurationSeconds, setTLSClientAuthentication, setTLSEnabledCipherSuites, setTLSEnabledProtocols, setTLSProvider, setTLSProviderFactoryClass, setZkEnableSecurity, setZkLedgersRootPath, setZkRequestRateLimit, setZkRetryBackoffMaxRetries, setZkServers, setZkTimeoutaddConfiguration, addConfiguration, addPropertyDirect, clear, clearPropertyDirect, clone, containsKey, getConfiguration, getInMemoryConfiguration, getKeys, getKeys, getList, getNumberOfConfigurations, getProperty, getSource, getStringArray, isEmpty, removeConfiguration, setDelimiterParsingDisabled, setListDelimiteraddErrorLogListener, addProperty, append, clearProperty, copy, createInterpolator, getBigDecimal, getBigDecimal, getBigInteger, getBigInteger, getBoolean, getBoolean, getBoolean, getByte, getByte, getByte, getDefaultListDelimiter, getDelimiter, getDouble, getDouble, getDouble, getFloat, getFloat, getFloat, getInt, getInt, getInteger, getInterpolator, getList, getListDelimiter, getLogger, getLong, getLong, getLong, getProperties, getProperties, getShort, getShort, getShort, getString, getString, getSubstitutor, interpolate, interpolate, interpolatedConfiguration, interpolateHelper, isDelimiterParsingDisabled, isScalarValue, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setLogger, setProperty, setThrowExceptionOnMissing, subsetaddConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEventsprotected static final java.lang.String LEDGER_STORAGE_CLASS
protected static final org.apache.bookkeeper.common.conf.ConfigKey LEDGER_STORAGE_CLASS_KEY
protected static final java.lang.String ENTRY_LOG_SIZE_LIMIT
protected static final org.apache.bookkeeper.common.conf.ConfigKey ENTRY_LOG_SIZE_LIMIT_KEY
protected static final java.lang.String ENTRY_LOG_FILE_PREALLOCATION_ENABLED
protected static final java.lang.String FORCE_ALLOW_COMPACTION
protected static final java.lang.String MINOR_COMPACTION_INTERVAL
protected static final java.lang.String MINOR_COMPACTION_THRESHOLD
protected static final java.lang.String MINOR_COMPACTION_MAX_TIME_MILLIS
protected static final java.lang.String MAJOR_COMPACTION_INTERVAL
protected static final java.lang.String MAJOR_COMPACTION_THRESHOLD
protected static final java.lang.String MAJOR_COMPACTION_MAX_TIME_MILLIS
protected static final java.lang.String IS_THROTTLE_BY_BYTES
protected static final java.lang.String COMPACTION_MAX_OUTSTANDING_REQUESTS
protected static final java.lang.String COMPACTION_RATE
protected static final java.lang.String COMPACTION_RATE_BY_ENTRIES
protected static final java.lang.String COMPACTION_RATE_BY_BYTES
protected static final java.lang.String GC_WAIT_TIME
protected static final java.lang.String IS_FORCE_GC_ALLOW_WHEN_NO_SPACE
protected static final java.lang.String GC_OVERREPLICATED_LEDGER_WAIT_TIME
protected static final java.lang.String USE_TRANSACTIONAL_COMPACTION
protected static final java.lang.String VERIFY_METADATA_ON_GC
protected static final java.lang.String LOCAL_SCRUB_PERIOD
protected static final java.lang.String LOCAL_SCRUB_RATE_LIMIT
protected static final java.lang.String FLUSH_INTERVAL
protected static final java.lang.String FLUSH_ENTRYLOG_INTERVAL_BYTES
protected static final java.lang.String DEATH_WATCH_INTERVAL
protected static final java.lang.String OPEN_FILE_LIMIT
protected static final java.lang.String PAGE_LIMIT
protected static final java.lang.String PAGE_SIZE
protected static final java.lang.String FILEINFO_CACHE_INITIAL_CAPACITY
protected static final java.lang.String FILEINFO_MAX_IDLE_TIME
protected static final java.lang.String FILEINFO_FORMAT_VERSION_TO_WRITE
protected static final java.lang.String MAX_JOURNAL_SIZE
protected static final java.lang.String MAX_BACKUP_JOURNALS
protected static final java.lang.String JOURNAL_SYNC_DATA
protected static final java.lang.String JOURNAL_WRITE_DATA
protected static final java.lang.String JOURNAL_ADAPTIVE_GROUP_WRITES
protected static final java.lang.String JOURNAL_MAX_GROUP_WAIT_MSEC
protected static final java.lang.String JOURNAL_BUFFERED_WRITES_THRESHOLD
protected static final java.lang.String JOURNAL_BUFFERED_ENTRIES_THRESHOLD
protected static final java.lang.String JOURNAL_FLUSH_WHEN_QUEUE_EMPTY
protected static final java.lang.String JOURNAL_REMOVE_FROM_PAGE_CACHE
protected static final java.lang.String JOURNAL_PRE_ALLOC_SIZE
protected static final java.lang.String JOURNAL_WRITE_BUFFER_SIZE
protected static final java.lang.String JOURNAL_ALIGNMENT_SIZE
protected static final java.lang.String NUM_JOURNAL_CALLBACK_THREADS
protected static final java.lang.String JOURNAL_FORMAT_VERSION_TO_WRITE
protected static final java.lang.String JOURNAL_QUEUE_SIZE
protected static final java.lang.String JOURNAL_MAX_MEMORY_SIZE_MB
protected static final java.lang.String JOURNAL_PAGECACHE_FLUSH_INTERVAL_MSEC
protected static final java.lang.String MAX_ADDS_IN_PROGRESS_LIMIT
protected static final java.lang.String MAX_READS_IN_PROGRESS_LIMIT
protected static final java.lang.String CLOSE_CHANNEL_ON_RESPONSE_TIMEOUT
protected static final java.lang.String WAIT_TIMEOUT_ON_RESPONSE_BACKPRESSURE
protected static final java.lang.String BOOKIE_PORT
protected static final java.lang.String LISTENING_INTERFACE
protected static final java.lang.String ALLOW_LOOPBACK
protected static final java.lang.String ADVERTISED_ADDRESS
protected static final java.lang.String BOOKIE_ID
protected static final java.lang.String ALLOW_EPHEMERAL_PORTS
protected static final java.lang.String JOURNAL_DIR
protected static final java.lang.String JOURNAL_DIRS
protected static final java.lang.String LEDGER_DIRS
protected static final java.lang.String INDEX_DIRS
protected static final java.lang.String ALLOW_STORAGE_EXPANSION
protected static final java.lang.String SERVER_TCP_NODELAY
protected static final java.lang.String SERVER_SOCK_KEEPALIVE
protected static final java.lang.String SERVER_SOCK_LINGER
protected static final java.lang.String SERVER_WRITEBUFFER_LOW_WATER_MARK
protected static final java.lang.String SERVER_WRITEBUFFER_HIGH_WATER_MARK
protected static final java.lang.String SERVER_NUM_IO_THREADS
protected static final java.lang.String ZK_RETRY_BACKOFF_START_MS
protected static final java.lang.String ZK_RETRY_BACKOFF_MAX_MS
protected static final java.lang.String OPEN_LEDGER_REREPLICATION_GRACE_PERIOD
protected static final java.lang.String LOCK_RELEASE_OF_FAILED_LEDGER_GRACE_PERIOD
protected static final java.lang.String READ_ONLY_MODE_ENABLED
protected static final java.lang.String FORCE_READ_ONLY_BOOKIE
protected static final java.lang.String PERSIST_BOOKIE_STATUS_ENABLED
protected static final java.lang.String DISK_USAGE_THRESHOLD
protected static final java.lang.String DISK_USAGE_WARN_THRESHOLD
protected static final java.lang.String DISK_USAGE_LWM_THRESHOLD
protected static final java.lang.String DISK_CHECK_INTERVAL
protected static final java.lang.String AUDITOR_PERIODIC_CHECK_INTERVAL
protected static final java.lang.String AUDITOR_PERIODIC_BOOKIE_CHECK_INTERVAL
protected static final java.lang.String AUDITOR_PERIODIC_PLACEMENT_POLICY_CHECK_INTERVAL
protected static final java.lang.String AUDITOR_LEDGER_VERIFICATION_PERCENTAGE
protected static final java.lang.String AUTO_RECOVERY_DAEMON_ENABLED
protected static final java.lang.String LOST_BOOKIE_RECOVERY_DELAY
protected static final java.lang.String RW_REREPLICATE_BACKOFF_MS
protected static final java.lang.String UNDERREPLICATED_LEDGER_RECOVERY_GRACE_PERIOD
protected static final java.lang.String AUDITOR_REPLICAS_CHECK_INTERVAL
protected static final java.lang.String AUDITOR_MAX_NUMBER_OF_CONCURRENT_OPEN_LEDGER_OPERATIONS
protected static final java.lang.String AUDITOR_ACQUIRE_CONCURRENT_OPEN_LEDGER_OPERATIONS_TIMEOUT_MSEC
protected static final java.lang.String IN_FLIGHT_READ_ENTRY_NUM_IN_LEDGER_CHECKER
protected static final java.lang.String NUM_ADD_WORKER_THREADS
protected static final java.lang.String NUM_READ_WORKER_THREADS
protected static final java.lang.String MAX_PENDING_READ_REQUESTS_PER_THREAD
protected static final java.lang.String MAX_PENDING_ADD_REQUESTS_PER_THREAD
protected static final java.lang.String NUM_LONG_POLL_WORKER_THREADS
protected static final java.lang.String NUM_HIGH_PRIORITY_WORKER_THREADS
protected static final java.lang.String READ_WORKER_THREADS_THROTTLING_ENABLED
protected static final java.lang.String REQUEST_TIMER_TICK_DURATION_MILLISEC
protected static final java.lang.String REQUEST_TIMER_NO_OF_TICKS
protected static final java.lang.String READ_BUFFER_SIZE
protected static final java.lang.String WRITE_BUFFER_SIZE
protected static final java.lang.String USE_HOST_NAME_AS_BOOKIE_ID
protected static final java.lang.String USE_SHORT_HOST_NAME
protected static final java.lang.String ENABLE_LOCAL_TRANSPORT
protected static final java.lang.String DISABLE_SERVER_SOCKET_BIND
protected static final java.lang.String SORTED_LEDGER_STORAGE_ENABLED
protected static final java.lang.String SKIP_LIST_SIZE_LIMIT
protected static final java.lang.String SKIP_LIST_CHUNK_SIZE_ENTRY
protected static final java.lang.String SKIP_LIST_MAX_ALLOC_ENTRY
protected static final java.lang.String ENABLE_STATISTICS
protected static final java.lang.String STATS_PROVIDER_CLASS
protected static final java.lang.String BYTEBUF_ALLOCATOR_SIZE_INITIAL
protected static final java.lang.String BYTEBUF_ALLOCATOR_SIZE_MIN
protected static final java.lang.String BYTEBUF_ALLOCATOR_SIZE_MAX
protected static final java.lang.String BOOKIE_AUTH_PROVIDER_FACTORY_CLASS
protected static final java.lang.String MIN_USABLESIZE_FOR_INDEXFILE_CREATION
protected static final java.lang.String MIN_USABLESIZE_FOR_ENTRYLOG_CREATION
protected static final java.lang.String MIN_USABLESIZE_FOR_HIGH_PRIORITY_WRITES
protected static final java.lang.String ALLOW_MULTIPLEDIRS_UNDER_SAME_DISKPARTITION
protected static final java.lang.String HTTP_SERVER_ENABLED
protected static final java.lang.String HTTP_SERVER_PORT
protected static final java.lang.String EXTRA_SERVER_COMPONENTS
protected static final java.lang.String IGNORE_EXTRA_SERVER_COMPONENTS_STARTUP_FAILURES
protected static final java.lang.String REGISTRATION_MANAGER_CLASS
protected static final java.lang.String ENABLE_TASK_EXECUTION_STATS
protected static final java.lang.String ENTRY_LOG_PER_LEDGER_ENABLED
protected static final java.lang.String NUMBER_OF_MEMTABLE_FLUSH_THREADS
protected static final java.lang.String ENTRYLOGMAP_ACCESS_EXPIRYTIME_INSECONDS
protected static final java.lang.String MAXIMUM_NUMBER_OF_ACTIVE_ENTRYLOGS
protected static final java.lang.String ENTRY_LOG_PER_LEDGER_COUNTER_LIMITS_MULT_FACTOR
protected static final java.lang.String LOCAL_CONSISTENCY_CHECK_ON_STARTUP
protected static final java.lang.String AUTHORIZED_ROLES
protected static final java.lang.String ROCKSDB_DELETE_ENTRIES_BATCH_SIZE
public ServerConfiguration()
public ServerConfiguration(AbstractConfiguration conf)
conf - Other configurationpublic long getEntryLogSizeLimit()
public ServerConfiguration setEntryLogSizeLimit(long logSizeLimit)
logSizeLimit - new log size limitationpublic boolean isEntryLogFilePreAllocationEnabled()
public ServerConfiguration setEntryLogFilePreAllocationEnabled(boolean enabled)
enabled - enable/disable entry log file preallocation.public long getGcWaitTime()
public ServerConfiguration setGcWaitTime(long gcWaitTime)
gcWaitTime - gc wait timepublic long getGcOverreplicatedLedgerWaitTimeMillis()
public ServerConfiguration setGcOverreplicatedLedgerWaitTime(long gcWaitTime, java.util.concurrent.TimeUnit unit)
A ledger can be overreplicated under the following circumstances: 1. The ledger with few entries has bk1 and bk2 as its ensemble. 2. bk1 crashes. 3. bk3 replicates the ledger from bk2 and updates the ensemble to bk2 and bk3. 4. bk1 comes back up. 5. Now there are 3 copies of the ledger.
gcWaitTime - public boolean getUseTransactionalCompaction()
public ServerConfiguration setUseTransactionalCompaction(boolean useTransactionalCompaction)
useTransactionalCompaction - public boolean getVerifyMetadataOnGC()
public ServerConfiguration setVerifyMetadataOnGc(boolean verifyMetadataOnGC)
verifyMetadataOnGC - public boolean isLocalScrubEnabled()
public long getLocalScrubPeriod()
public void setLocalScrubPeriod(long period)
public double getLocalScrubRateLimit()
public void setLocalScrubRateLimit(double scrubRateLimit)
scrubRateLimit - Max number of entries per second to scan.public int getFlushInterval()
public ServerConfiguration setFlushInterval(int flushInterval)
flushInterval - Flush Intervalpublic long getFlushIntervalInBytes()
Default is 0. 0 or less disables this feature and effectively flush happens on log rotation.
Flushing in smaller chunks but more frequently reduces spikes in disk I/O. Flushing too frequently may also affect performance negatively.
public ServerConfiguration setFlushIntervalInBytes(long flushInterval)
flushInterval - in bytespublic int getDeathWatchInterval()
public int getOpenFileLimit()
public ServerConfiguration setOpenFileLimit(int fileLimit)
fileLimit - Limitation of number of open files.public int getPageLimit()
public ServerConfiguration setPageLimit(int pageLimit)
pageLimit - Limitation of number of index pages in ledger cache.public int getPageSize()
public ServerConfiguration setPageSize(int pageSize)
pageSize - Page SizegetPageSize()public int getFileInfoCacheInitialCapacity()
public ServerConfiguration setFileInfoCacheInitialCapacity(int initialCapacity)
initialCapacity - Initial capacity of file info cache table.public long getFileInfoMaxIdleTime()
getOpenFileLimit()public ServerConfiguration setFileInfoMaxIdleTime(long idleTime)
idleTime - Idle time, in seconds.getFileInfoMaxIdleTime()public int getFileInfoFormatVersionToWrite()
public ServerConfiguration setFileInfoFormatVersionToWrite(int version)
version - fileinfo format version to write.public long getMaxJournalSizeMB()
public ServerConfiguration setMaxJournalSizeMB(long maxJournalSize)
maxJournalSize - new max journal file sizepublic int getJournalPreAllocSizeMB()
public int getJournalWriteBufferSizeKB()
public ServerConfiguration setJournalWriteBufferSizeKB(int bufferSizeKB)
bufferSizeKB - the size of the write buffer used for the journal, in KB.public int getMaxBackupJournals()
public ServerConfiguration setMaxBackupJournals(int maxBackupJournals)
maxBackupJournals - Max number of older journal filespublic int getJournalAlignmentSize()
public ServerConfiguration setJournalAlignmentSize(int size)
size - journal alignment size.public int getJournalFormatVersionToWrite()
public ServerConfiguration setJournalFormatVersionToWrite(int version)
version - journal format version to write.public ServerConfiguration setJournalQueueSize(int journalQueueSize)
journalQueueSize - the max size of journal queuepublic int getJournalQueueSize()
public ServerConfiguration setJournalMaxMemorySizeMb(long journalMaxMemorySizeMb)
journalMaxMemorySizeMb - the max amount of memory for the journalpublic long getJournalMaxMemorySizeMb()
public ServerConfiguration setJournalPageCacheFlushIntervalMSec(long journalPageCacheFlushIntervalMSec)
public long getJournalPageCacheFlushIntervalMSec()
public int getMaxAddsInProgressLimit()
public ServerConfiguration setMaxAddsInProgressLimit(int value)
value - max number of adds in progress.public int getMaxReadsInProgressLimit()
public ServerConfiguration setMaxReadsInProgressLimit(int value)
value - max number of reads in progress.public boolean getCloseChannelOnResponseTimeout()
public ServerConfiguration setCloseChannelOnResponseTimeout(boolean value)
value - public long getWaitTimeoutOnResponseBackpressureMillis()
public ServerConfiguration setWaitTimeoutOnResponseBackpressureMillis(long value)
value - negative value disables the feature
0 to allow request to fail immediately
Default is -1 (disabled)public int getBookiePort()
public ServerConfiguration setBookiePort(int port)
port - Port to listen onpublic java.lang.String getListeningInterface()
public ServerConfiguration setListeningInterface(java.lang.String iface)
iface - the interface to listen onpublic boolean getAllowLoopback()
By default, loopback interfaces are not allowed as the primary interface.
Using a loopback interface as the primary interface usually indicates a configuration error. For example, its fairly common in some VPS setups to not configure a hostname, or to have the hostname resolve to 127.0.0.1. If this is the case, then all bookies in the cluster will establish their identities as 127.0.0.1:3181, and only one will be able to join the cluster. For VPSs configured like this, you should explicitly set the listening interface.
setListeningInterface(String)public ServerConfiguration setAllowLoopback(boolean allow)
allow - whether to allow loopback interfacesgetAllowLoopback()public java.lang.String getBookieId()
If present, this setting will take precedence over the automatic BookieId generation, based on Network Addresses.
setBookieId(java.lang.String),
getAdvertisedAddress()public ServerConfiguration setBookieId(java.lang.String bookieId)
By default, a bookie will advertise a BookieId computed from the primary network endpoint addresss.
bookieId - the bookie idgetBookieId(),
setAdvertisedAddress(java.lang.String)public java.lang.String getAdvertisedAddress()
If present, this setting will take precedence over the
setListeningInterface(String) and
setUseHostNameAsBookieID(boolean).
setAdvertisedAddress(String)public ServerConfiguration setAdvertisedAddress(java.lang.String advertisedAddress)
By default, a bookie will advertise either its own IP or hostname,
depending on the getUseHostNameAsBookieID() setting.
When the advertised is set to a non-empty string, the bookie will register and advertise using this address.
If present, this setting will take precedence over the
setListeningInterface(String) and
setUseHostNameAsBookieID(boolean).
advertisedAddress - whether to allow loopback interfacesgetAdvertisedAddress()public boolean getAllowEphemeralPorts()
By default, an ephemeral port is not allowed. Using an ephemeral port as the service port usually indicates a configuration error. However, in unit tests, using ephemeral port will address port conflicts problem and allow running tests in parallel.
public ServerConfiguration setAllowEphemeralPorts(boolean allow)
allow - whether to allow using an ephemeral port.public boolean getAllowStorageExpansion()
public ServerConfiguration setAllowStorageExpansion(boolean val)
val - - true if new ledger/index dirs can be added; false otherwise.public java.lang.String[] getJournalDirNames()
@Deprecated public java.lang.String getJournalDirName()
public java.lang.String getJournalDirNameWithoutDefault()
public ServerConfiguration setJournalDirName(java.lang.String journalDir)
journalDir - Dir to store journal filespublic ServerConfiguration setJournalDirsName(java.lang.String[] journalDirs)
journalDirs - Dir to store journal filespublic java.io.File[] getJournalDirs()
public java.lang.String[] getLedgerDirWithoutDefault()
public java.lang.String[] getLedgerDirNames()
public ServerConfiguration setLedgerDirNames(java.lang.String[] ledgerDirs)
ledgerDirs - Dir names to store ledger datapublic java.io.File[] getLedgerDirs()
public java.lang.String[] getIndexDirNames()
public ServerConfiguration setIndexDirName(java.lang.String[] indexDirs)
indexDirs - Index dir namespublic java.io.File[] getIndexDirs()
public boolean getServerTcpNoDelay()
public ServerConfiguration setServerTcpNoDelay(boolean noDelay)
noDelay - NoDelay settingpublic int getServerNumIOThreads()
public ServerConfiguration setServerNumIOThreads(int numThreads)
This is the number of threads used by Netty to handle TCP connections.
numThreads - number of IO threads used for bookkeepergetServerNumIOThreads()public int getServerSockLinger()
public ServerConfiguration setServerSockLinger(int linger)
When enabled, a close or shutdown will not return until all queued messages for the socket have been successfully sent or the linger timeout has been reached. Otherwise, the call returns immediately and the closing is done in the background.
linger - NoDelay settingpublic boolean getServerSockKeepalive()
public ServerConfiguration setServerSockKeepalive(boolean keepalive)
This setting is used to send keep-alive messages on connection-oriented sockets.
keepalive - KeepAlive settingpublic int getZkRetryBackoffStartMs()
public ServerConfiguration setZkRetryBackoffStartMs(int retryMs)
retryMs - backoff retry start time in millis.public int getZkRetryBackoffMaxMs()
public ServerConfiguration setZkRetryBackoffMaxMs(int retryMs)
retryMs - backoff retry max time in millis.public boolean isStatisticsEnabled()
public ServerConfiguration setStatisticsEnabled(boolean enabled)
enabled - Whether statistics enabled or not.public ServerConfiguration setForceAllowCompaction(boolean enable)
enable - whether allow manually force compact the entry log or not.public boolean isForceAllowCompaction()
public double getMinorCompactionThreshold()
For those entry log files whose remaining size percentage reaches below this threshold will be compacted in a minor compaction.
If it is set to less than zero, the minor compaction is disabled.
public ServerConfiguration setMinorCompactionThreshold(double threshold)
threshold - Threshold for minor compactiongetMinorCompactionThreshold()public double getMajorCompactionThreshold()
For those entry log files whose remaining size percentage reaches below this threshold will be compacted in a major compaction.
If it is set to less than zero, the major compaction is disabled.
public ServerConfiguration setMajorCompactionThreshold(double threshold)
threshold - Threshold of major compactiongetMajorCompactionThreshold()public long getMajorCompactionMaxTimeMillis()
public ServerConfiguration setMajorCompactionMaxTimeMillis(long majorCompactionMaxTimeMillis)
majorCompactionMaxTimeMillis - The number of milliseconds to run compaction.getMajorCompactionMaxTimeMillis()public long getMinorCompactionInterval()
If it is set to less than zero, the minor compaction is disabled.
public ServerConfiguration setMinorCompactionInterval(long interval)
interval - Interval to run minor compactiongetMinorCompactionInterval()public long getMajorCompactionInterval()
If it is set to less than zero, the major compaction is disabled.
public ServerConfiguration setMajorCompactionInterval(long interval)
interval - Interval to run major compactiongetMajorCompactionInterval()public long getMinorCompactionMaxTimeMillis()
public ServerConfiguration setMinorCompactionMaxTimeMillis(long minorCompactionMaxTimeMillis)
minorCompactionMaxTimeMillis - The number of milliseconds to run compaction.getMinorCompactionMaxTimeMillis()public boolean getIsForceGCAllowWhenNoSpace()
Force GC may get some space back, but may also fill up disk space more quickly. This is because new log files are created before GC, while old garbage log files deleted after GC.
public ServerConfiguration setIsForceGCAllowWhenNoSpace(boolean force)
force - true to allow force GC; false to suspend GCpublic void setOpenLedgerRereplicationGracePeriod(java.lang.String waitTime)
The grace period allows the writer to detect the bookie failure, and and start writing to another ledger fragment. If the writer writes nothing during the grace period, the rereplication worker assumes that it has crashed and therefore fences the ledger, preventing any further writes to that ledger.
waitTime - time to wait before replicating ledger fragmentBookKeeper.openLedger(long, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])public long getOpenLedgerRereplicationGracePeriod()
public void setLockReleaseOfFailedLedgerGracePeriod(java.lang.String waitTime)
On replication failure, instead of releasing the lock immediately after failed attempt, it will hold under replicated ledger lock for the grace period and then it will release the lock.
waitTime - public long getLockReleaseOfFailedLedgerGracePeriod()
public int getReadBufferBytes()
public ServerConfiguration setReadBufferBytes(int readBufferSize)
readBufferSize - Read Buffer Sizepublic ServerConfiguration setNumAddWorkerThreads(int numThreads)
numThreads - number of threads to handle write requests.public int getNumAddWorkerThreads()
public ServerConfiguration setNumLongPollWorkerThreads(int numThreads)
numThreads - number of threads to handle long poll requests.public int getNumLongPollWorkerThreads()
If the number of threads is zero or negative, bookie will fallback to
use read threads. If there is no read threads used, it will create a thread pool
with Runtime.availableProcessors() threads.
public ServerConfiguration setNumHighPriorityWorkerThreads(int numThreads)
numThreads - number of threads to handle high priority requests.public int getNumHighPriorityWorkerThreads()
public ServerConfiguration setReadWorkerThreadsThrottlingEnabled(boolean throttle)
throttle - whether to throttle the read workers threadspublic boolean isReadWorkerThreadsThrottlingEnabled()
public ServerConfiguration setNumReadWorkerThreads(int numThreads)
numThreads - Number of threads to handle read requests.public int getNumReadWorkerThreads()
public ServerConfiguration setRequestTimerTickDurationMs(int tickDuration)
tickDuration - tick duration in milliseconds.public ServerConfiguration setMaxPendingReadRequestPerThread(int maxPendingReadRequestsPerThread)
maxPendingReadRequestsPerThread - public int getMaxPendingReadRequestPerThread()
public ServerConfiguration setMaxPendingAddRequestPerThread(int maxPendingAddRequestsPerThread)
maxPendingAddRequestsPerThread - public int getMaxPendingAddRequestPerThread()
public int getRequestTimerTickDurationMs()
public ServerConfiguration setRequestTimerNumTicks(int tickCount)
tickCount - number of ticks per wheel for the request timer.public int getRequestTimerNumTicks()
public int getWriteBufferBytes()
public ServerConfiguration setWriteBufferBytes(int writeBufferBytes)
writeBufferBytes - Write Buffer Bytespublic ServerConfiguration setNumJournalCallbackThreads(int numThreads)
numThreads - number of threads to handle journal callbacks.public int getNumJournalCallbackThreads()
public ServerConfiguration setSortedLedgerStorageEnabled(boolean enabled)
setLedgerStorageClass(String) to configure the implementation classenabled - public boolean getSortedLedgerStorageEnabled()
public long getSkipListSizeLimit()
public ServerConfiguration setSkipListSizeLimit(int size)
size - skip list size limit.public int getSkipListArenaChunkSize()
public ServerConfiguration setSkipListArenaChunkSize(int size)
size - chunk size.public int getSkipListArenaMaxAllocSize()
public ServerConfiguration setSkipListArenaMaxAllocSize(int size)
size - max alloc size.public boolean getJournalSyncData()
Default is true
public boolean getJournalWriteData()
Default is true
public ServerConfiguration setJournalWriteData(boolean journalWriteData)
Default is true
public ServerConfiguration setJournalSyncData(boolean syncData)
By default, data sync is enabled to guarantee durability of writes.
Beware: while disabling data sync in the Bookie journal might improve the bookie write performance, it will also introduce the possibility of data loss. With no sync, the journal entries are written in the OS page cache but not flushed to disk. In case of power failure, the affected bookie might lose the unflushed data. If the ledger is replicated to multiple bookies, the chances of data loss are reduced though still present.
syncData - whether to sync data on disk before acknowledgementpublic boolean getJournalAdaptiveGroupWrites()
public ServerConfiguration setJournalAdaptiveGroupWrites(boolean enabled)
enabled - flag to enable/disable group journal force writespublic long getJournalMaxGroupWaitMSec()
public ServerConfiguration setJournalMaxGroupWaitMSec(long journalMaxGroupWaitMSec)
journalMaxGroupWaitMSec - maximum time to wait in milliseconds.public long getJournalBufferedWritesThreshold()
public ServerConfiguration setJournalBufferedWritesThreshold(long maxBytes)
maxBytes - maximum bytes to buffer to impose on a journal writepublic long getJournalBufferedEntriesThreshold()
getJournalBufferedWritesThreshold() if this is set to zero or
less than zero.public ServerConfiguration setJournalBufferedEntriesThreshold(int maxEntries)
getJournalBufferedWritesThreshold() set this to zero or less than
zero.maxEntries - maximum entries to buffer.public ServerConfiguration setJournalFlushWhenQueueEmpty(boolean enabled)
public boolean getJournalFlushWhenQueueEmpty()
public ServerConfiguration setReadOnlyModeEnabled(boolean enabled)
enabled - whether to enable read-only mode.public boolean isReadOnlyModeEnabled()
public ServerConfiguration setDiskUsageWarnThreshold(float threshold)
threshold - warning threshold to force gc.public float getDiskUsageWarnThreshold()
public ServerConfiguration setPersistBookieStatusEnabled(boolean enabled)
enabled - - true if persist the bookie status. Otherwise false.public boolean isPersistBookieStatusEnabled()
public ServerConfiguration setDiskUsageThreshold(float threshold)
threshold - threshold to declare a disk fullpublic float getDiskUsageThreshold()
public ServerConfiguration setDiskLowWaterMarkUsageThreshold(float threshold)
threshold - threshold to declare a disk fullpublic float getDiskLowWaterMarkUsageThreshold()
public ServerConfiguration setDiskCheckInterval(int interval)
interval - interval between disk checks for space.public int getDiskCheckInterval()
public void setAuditorPeriodicCheckInterval(long interval)
interval - The interval in seconds. e.g. 86400 = 1 day, 604800 = 1 weekpublic long getAuditorPeriodicCheckInterval()
public void setAuditorPeriodicBookieCheckInterval(long interval)
interval - The period in seconds.public long getAuditorPeriodicBookieCheckInterval()
setAuditorPeriodicBookieCheckInterval(long)public void setAuditorPeriodicPlacementPolicyCheckInterval(long interval)
interval - The interval in seconds. e.g. 86400 = 1 day, 604800 = 1 weekpublic long getAuditorPeriodicPlacementPolicyCheckInterval()
public void setUnderreplicatedLedgerRecoveryGracePeriod(long gracePeriod)
gracePeriod - The interval in seconds. e.g. 3600 = 1 hourpublic long getUnderreplicatedLedgerRecoveryGracePeriod()
public void setAuditorPeriodicReplicasCheckInterval(long interval)
interval - The interval in seconds. e.g. 86400 = 1 day, 604800 = 1 weekpublic long getAuditorPeriodicReplicasCheckInterval()
public int getAuditorMaxNumberOfConcurrentOpenLedgerOperations()
public void setAuditorMaxNumberOfConcurrentOpenLedgerOperations(int semaphore)
semaphore - public int getAuditorAcquireConcurrentOpenLedgerOperationsTimeoutMSec()
public void setAuditorAcquireConcurrentOpenLedgerOperationsTimeoutMSec(int timeoutMs)
timeoutMs - public ServerConfiguration setAuditorLedgerVerificationPercentage(long auditorLedgerVerificationPercentage)
auditorLedgerVerificationPercentage - The verification proportion as a percentagepublic long getAuditorLedgerVerificationPercentage()
setAuditorLedgerVerificationPercentage(long)public ServerConfiguration setAutoRecoveryDaemonEnabled(boolean enabled)
enabled - - true if need to start auto-recovery service. Otherwise
false.public boolean isAutoRecoveryDaemonEnabled()
public int getLostBookieRecoveryDelay()
public void setLostBookieRecoveryDelay(int interval)
public int getRwRereplicateBackoffMs()
public void setRwRereplicateBackoffMs(int backoffMs)
backoffMs - backoff time in millisecondspublic ServerConfiguration setForceReadOnlyBookie(boolean enabled)
enabled - - true if need to start a bookie in read only mode. Otherwise
false.public boolean isForceReadOnlyBookie()
public boolean getIsThrottleByBytes()
public ServerConfiguration setIsThrottleByBytes(boolean byBytes)
byBytes - true to use by bytes; false to use by entriespublic int getCompactionMaxOutstandingRequests()
public ServerConfiguration setCompactionMaxOutstandingRequests(int maxOutstandingRequests)
When compacting, the entries are written to the entrylog and the new offsets are cached in memory. Once the entrylog is flushed the index is updated with the new offsets. This parameter controls the number of entries added to the entrylog before a flush is forced. A higher value for this parameter means more memory will be used for offsets. Each offset consists of 3 longs.
This parameter should _not_ be modified unless you know what you're doing. The default is 100,000.
maxOutstandingRequests - number of entries to compact before flushing@Deprecated public int getCompactionRate()
getCompactionRateByEntries()public ServerConfiguration setCompactionRate(int rate)
rate - rate of compaction adds (adds entries per second)public int getCompactionRateByEntries()
public ServerConfiguration setCompactionRateByEntries(int rate)
rate - rate of compaction adds (adds entries per second)public int getCompactionRateByBytes()
public ServerConfiguration setCompactionRateByBytes(int rate)
rate - rate of compaction adds (adds bytes per second)@Beta public boolean getJournalRemovePagesFromCache()
public ServerConfiguration setJournalRemovePagesFromCache(boolean enabled)
enabled - - true if we need to remove pages from page cache. otherwise, falsepublic java.lang.String getLedgerStorageClass()
public ServerConfiguration setLedgerStorageClass(java.lang.String ledgerStorageClass)
LedgerStorage implementation class name.ledgerStorageClass - the class namepublic boolean getUseHostNameAsBookieID()
public ServerConfiguration setUseHostNameAsBookieID(boolean useHostName)
useHostName - whether to use hostname for registration and in ledgermetadatagetUseHostNameAsBookieID()public boolean getUseShortHostName()
public ServerConfiguration setUseShortHostName(boolean useShortHostName)
useShortHostName - whether to use short hostname for registration and in
ledgermetadatagetUseShortHostName()public boolean isEnableLocalTransport()
public ServerConfiguration setEnableLocalTransport(boolean enableLocalTransport)
enableLocalTransport - whether to use listen for local JVM clientsisEnableLocalTransport()public boolean isDisableServerSocketBind()
public ServerConfiguration setDisableServerSocketBind(boolean disableServerSocketBind)
disableServerSocketBind - whether to disable binding on network interfacesisDisableServerSocketBind()public java.lang.Class<? extends org.apache.bookkeeper.stats.StatsProvider> getStatsProviderClass()
throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationExceptionpublic ServerConfiguration setStatsProviderClass(java.lang.Class<? extends org.apache.bookkeeper.stats.StatsProvider> providerClass)
providerClass - stats provider classpublic void validate()
throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationExceptionpublic int getRecvByteBufAllocatorSizeInitial()
public void setRecvByteBufAllocatorSizeInitial(int size)
size - buffer sizepublic int getRecvByteBufAllocatorSizeMin()
public void setRecvByteBufAllocatorSizeMin(int size)
size - buffer sizepublic int getRecvByteBufAllocatorSizeMax()
public void setRecvByteBufAllocatorSizeMax(int size)
size - buffer sizepublic void setBookieAuthProviderFactoryClass(java.lang.String factoryClass)
factoryClass - the bookie authentication provider factory class namepublic java.lang.String getBookieAuthProviderFactoryClass()
public ServerConfiguration setNettyMaxFrameSizeBytes(int maxSize)
setNettyMaxFrameSizeBytes in class AbstractConfiguration<ServerConfiguration>maxSize - the max size in bytespublic java.lang.String getTLSTrustStoreType()
public ServerConfiguration setTLSKeyStoreType(java.lang.String arg)
public java.lang.String getTLSKeyStore()
public ServerConfiguration setTLSKeyStore(java.lang.String arg)
public java.lang.String getTLSKeyStorePasswordPath()
public ServerConfiguration setTLSKeyStorePasswordPath(java.lang.String arg)
public java.lang.String getTLSKeyStoreType()
public ServerConfiguration setTLSTrustStoreType(java.lang.String arg)
public java.lang.String getTLSTrustStore()
public ServerConfiguration setTLSTrustStore(java.lang.String arg)
public java.lang.String getTLSTrustStorePasswordPath()
public ServerConfiguration setTLSTrustStorePasswordPath(java.lang.String arg)
public java.lang.String getTLSCertificatePath()
public ServerConfiguration setTLSCertificatePath(java.lang.String arg)
public boolean getEnableTaskExecutionStats()
public ServerConfiguration setEnableTaskExecutionStats(boolean enabled)
enabled - flag to enable/disable recording task execution stats.public long getMinUsableSizeForIndexFileCreation()
setMinUsableSizeForIndexFileCreation(long)public ServerConfiguration setMinUsableSizeForIndexFileCreation(long minUsableSizeForIndexFileCreation)
This parameter allows creating index files when there are enough disk spaces, even when the bookie
is running at readonly mode because of the disk usage is exceeding getDiskUsageThreshold(). Because
compaction, journal replays can still write index files to disks when a bookie is readonly.
minUsableSizeForIndexFileCreation - min usable size for index file creationpublic long getMinUsableSizeForEntryLogCreation()
setMinUsableSizeForEntryLogCreation(long)public ServerConfiguration setMinUsableSizeForEntryLogCreation(long minUsableSizeForEntryLogCreation)
This parameter allows creating entry log files when there are enough disk spaces, even when the bookie
is running at readonly mode because of the disk usage is exceeding getDiskUsageThreshold(). Because
compaction, journal replays can still write data to disks when a bookie is readonly.
minUsableSizeForEntryLogCreation - minimum safe usable size to be available in ledger directorypublic long getMinUsableSizeForHighPriorityWrites()
If not set, it is the value of getMinUsableSizeForEntryLogCreation().
public ServerConfiguration setMinUsableSizeForHighPriorityWrites(long minUsableSizeForHighPriorityWrites)
minUsableSizeForHighPriorityWrites - minimum safe usable size per ledger directory for Bookie to accept
high priority writespublic boolean isAllowMultipleDirsUnderSameDiskPartition()
public ServerConfiguration setAllowMultipleDirsUnderSameDiskPartition(boolean allow)
allow - public boolean isHttpServerEnabled()
public ServerConfiguration setHttpServerEnabled(boolean enabled)
enabled - - true if we should start http serverpublic int getHttpServerPort()
public ServerConfiguration setHttpServerPort(int port)
port - Port to listen onpublic java.lang.String[] getExtraServerComponents()
public ServerConfiguration setExtraServerComponents(java.lang.String[] componentClasses)
componentClasses - the list of server lifecycle components to enable on a bookie server.public boolean getIgnoreExtraServerComponentsStartupFailures()
getExtraServerComponents().getExtraServerComponents(). The default value is false.public ServerConfiguration setIgnoreExtraServerComponentsStartupFailures(boolean enabled)
getExtraServerComponents().enabled - flag to enable/disable ignoring startup failures on loading server components.public int getServerWriteBufferLowWaterMark()
public ServerConfiguration setServerWriteBufferLowWaterMark(int waterMark)
waterMark - netty channel write buffer low water mark.public int getServerWriteBufferHighWaterMark()
public ServerConfiguration setServerWriteBufferHighWaterMark(int waterMark)
waterMark - netty channel write buffer high water mark.@Deprecated public void setRegistrationManagerClass(java.lang.Class<? extends org.apache.bookkeeper.discover.RegistrationManager> regManagerClass)
AbstractConfiguration.setMetadataServiceUri(String)regManagerClass - ManagerClass@Deprecated
public java.lang.Class<? extends org.apache.bookkeeper.discover.RegistrationManager> getRegistrationManagerClass()
throws org.apache.commons.configuration.ConfigurationException
AbstractConfiguration.getMetadataServiceUri()org.apache.commons.configuration.ConfigurationExceptionprotected ServerConfiguration getThis()
AbstractConfigurationgetThis in class AbstractConfiguration<ServerConfiguration>public boolean isEntryLogPerLedgerEnabled()
public ServerConfiguration setEntryLogPerLedgerEnabled(boolean entryLogPerLedgerEnabled)
public int getNumOfMemtableFlushThreads()
public ServerConfiguration setNumOfMemtableFlushThreads(int numOfMemtableFlushThreads)
public int getEntrylogMapAccessExpiryTimeInSeconds()
public ServerConfiguration setEntrylogMapAccessExpiryTimeInSeconds(int entrylogMapAccessExpiryTimeInSeconds)
public int getMaximumNumberOfActiveEntryLogs()
public ServerConfiguration setMaximumNumberOfActiveEntryLogs(int maximumNumberOfActiveEntryLogs)
public int getEntryLogPerLedgerCounterLimitsMultFactor()
public ServerConfiguration setEntryLogPerLedgerCounterLimitsMultFactor(int entryLogPerLedgerCounterLimitsMultFactor)
public boolean isLocalConsistencyCheckOnStartup()
public java.lang.String[] getAuthorizedRoles()
public ServerConfiguration setAuthorizedRoles(java.lang.String roles)
public int getInFlightReadEntryNumInLedgerChecker()
public int getRocksDBDeleteEntriesBatchSize()
public ServerConfiguration setRocksDBDeleteEntriesBatchSize(int rocksDBDeleteEntriesBatchSize)
rocksDBDeleteEntriesBatchSize - Copyright © 2011–2024 The Apache Software Foundation. All rights reserved.