Class ClientConfiguration
- java.lang.Object
- 
- org.apache.commons.configuration.event.EventSource
- 
- org.apache.commons.configuration.AbstractConfiguration
- 
- org.apache.commons.configuration.CompositeConfiguration
- 
- org.apache.bookkeeper.conf.AbstractConfiguration<ClientConfiguration>
- 
- org.apache.bookkeeper.conf.ClientConfiguration
 
 
 
 
 
- 
- All Implemented Interfaces:
- java.lang.Cloneable,- org.apache.commons.configuration.Configuration
 
 public class ClientConfiguration extends AbstractConfiguration<ClientConfiguration> Configuration settings for client side.
- 
- 
Field SummaryFields Modifier and Type Field Description protected static java.lang.StringADD_ENTRY_QUORUM_TIMEOUT_SECprotected static java.lang.StringADD_ENTRY_TIMEOUT_SECprotected static java.lang.StringBOOKIE_ERROR_THRESHOLD_PER_INTERVALprotected static java.lang.StringBOOKIE_FAILURE_HISTORY_EXPIRATION_MSprotected static java.lang.StringBOOKIE_HEALTH_CHECK_ENABLEDprotected static java.lang.StringBOOKIE_HEALTH_CHECK_INTERVAL_SECONDSprotected static java.lang.StringBOOKIE_MAX_MULTIPLE_FOR_WEIGHTED_PLACEMENTprotected static java.lang.StringBOOKIE_QUARANTINE_RATIOprotected static java.lang.StringBOOKIE_QUARANTINE_TIME_SECONDSprotected static java.lang.StringCLIENT_AUTH_PROVIDER_FACTORY_CLASSprotected static java.lang.StringCLIENT_CONNECT_BOOKIE_UNAVAILABLE_LOG_THROTTLINGprotected static java.lang.StringCLIENT_CONNECT_TIMEOUT_MILLISprotected static java.lang.StringCLIENT_RECEIVEBUFFER_SIZEprotected static java.lang.StringCLIENT_ROLEstatic java.lang.StringCLIENT_ROLE_STANDARDThis client will act as a standard client.static java.lang.StringCLIENT_ROLE_SYSTEMThis client will act as a system client, like theAuditor.protected static java.lang.StringCLIENT_SENDBUFFER_SIZEprotected static java.lang.StringCLIENT_SOCK_KEEPALIVEprotected static java.lang.StringCLIENT_TCP_NODELAYprotected static java.lang.StringCLIENT_TCP_USER_TIMEOUT_MILLISprotected static java.lang.StringCLIENT_TLS_KEYSTOREDeprecated.protected static java.lang.StringCLIENT_TLS_KEYSTORE_PASSWORD_PATHDeprecated.protected static java.lang.StringCLIENT_TLS_KEYSTORE_TYPEDeprecated.protected static java.lang.StringCLIENT_TLS_TRUSTSTOREDeprecated.protected static java.lang.StringCLIENT_TLS_TRUSTSTORE_PASSWORD_PATHDeprecated.protected static java.lang.StringCLIENT_TLS_TRUSTSTORE_TYPEDeprecated.protected static java.lang.StringCLIENT_WRITEBUFFER_HIGH_WATER_MARKprotected static java.lang.StringCLIENT_WRITEBUFFER_LOW_WATER_MARKprotected static java.lang.StringDELAY_ENSEMBLE_CHANGEprotected static java.lang.StringDIGEST_TYPEprotected static java.lang.StringDISABLE_ENSEMBLE_CHANGE_FEATURE_NAMEprotected static java.lang.StringDISK_WEIGHT_BASED_PLACEMENT_ENABLEDprotected static java.lang.StringENABLE_BOOKIE_FAILURE_TRACKINGprotected static java.lang.StringENABLE_DIGEST_TYPE_AUTODETECTIONprotected static java.lang.StringENABLE_PARALLEL_RECOVERY_READprotected static java.lang.StringENABLE_TASK_EXECUTION_STATSstatic java.lang.StringENSEMBLE_PLACEMENT_POLICYprotected static java.lang.StringENSEMBLE_PLACEMENT_POLICY_ORDER_SLOW_BOOKIESprotected static java.lang.StringEXPLICIT_LAC_INTERVALprotected static java.lang.StringFIRST_SPECULATIVE_READ_LAC_TIMEOUTprotected static java.lang.StringFIRST_SPECULATIVE_READ_TIMEOUTprotected static java.lang.StringFOLLOW_BOOKIE_ADDRESS_TRACKINGprotected static java.lang.StringGET_BOOKIE_INFO_INTERVAL_SECONDSprotected static java.lang.StringGET_BOOKIE_INFO_RETRY_INTERVAL_SECONDSprotected static java.lang.StringGET_BOOKIE_INFO_TIMEOUT_SECSprotected static java.lang.StringMAX_ALLOWED_ENSEMBLE_CHANGESprotected static java.lang.StringMAX_SPECULATIVE_READ_LAC_TIMEOUTprotected static java.lang.StringMAX_SPECULATIVE_READ_TIMEOUTprotected static java.lang.StringNETTY_USE_POOLED_BUFFERSprotected static java.lang.StringNETWORK_TOPOLOGY_STABILIZE_PERIOD_SECONDSprotected static java.lang.StringNUM_CHANNELS_PER_BOOKIEprotected static java.lang.StringNUM_IO_THREADSprotected static java.lang.StringNUM_WORKER_THREADSprotected static java.lang.StringOPPORTUNISTIC_STRIPINGprotected static java.lang.StringPASSWDprotected static java.lang.StringPCBC_TIMEOUT_TIMER_NUM_TICKSprotected static java.lang.StringPCBC_TIMEOUT_TIMER_TICK_DURATION_MSprotected static java.lang.StringREAD_ENTRY_TIMEOUT_SECprotected static java.lang.StringREAD_REORDER_THRESHOLD_PENDING_REQUESTSprotected static java.lang.StringREAD_TIMEOUTprotected static java.lang.StringRECOVERY_READ_BATCH_SIZEprotected static java.lang.StringREGISTRATION_CLIENT_CLASSprotected static java.lang.StringREORDER_READ_SEQUENCE_ENABLEDprotected static java.lang.StringSPECULATIVE_READ_LAC_TIMEOUT_BACKOFF_MULTIPLIERprotected static java.lang.StringSPECULATIVE_READ_TIMEOUTprotected static java.lang.StringSPECULATIVE_READ_TIMEOUT_BACKOFF_MULTIPLIERprotected static java.lang.StringSTART_TLS_TIMEOUT_SECSprotected static java.lang.StringSTICKY_READS_ENABLEDprotected static java.lang.StringTASK_EXECUTION_WARN_TIME_MICROSprotected static java.lang.StringTHROTTLEprotected static java.lang.StringTIMEOUT_MONITOR_INTERVAL_SECprotected static java.lang.StringTIMEOUT_TASK_INTERVAL_MILLISprotected static java.lang.StringTIMEOUT_TIMER_NUM_TICKSprotected static java.lang.StringTIMEOUT_TIMER_TICK_DURATION_MSprotected static java.lang.StringTLS_HOSTNAME_VERIFICATION_ENABLEDprotected static java.lang.StringUSE_V2_WIRE_PROTOCOLprotected static java.lang.StringWAIT_TIMEOUT_ON_BACKPRESSURE- 
Fields inherited from class org.apache.bookkeeper.conf.AbstractConfigurationALLOCATOR_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, ENABLE_HEALTH_CHECK, 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, LEDGER_METADATA_FORMAT_VERSION, 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 SummaryConstructors Constructor Description ClientConfiguration()Construct a default client-side configuration.ClientConfiguration(AbstractConfiguration conf)Construct a client-side configuration using a base configuration.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description ClientConfigurationenableBookieHealthCheck()Enables the bookie health check.intgetAddEntryQuorumTimeout()Get the timeout for top-level add request.intgetAddEntryTimeout()Get the timeout for add request.longgetBookieErrorThresholdPerInterval()Get the error threshold for a bookie to be quarantined.intgetBookieFailureHistoryExpirationMSec()Get the bookie failure tracking expiration timeout.intgetBookieHealthCheckIntervalSeconds()Get the bookie health check interval in seconds.intgetBookieInfoTimeout()Return the timeout value for getBookieInfo request.intgetBookieMaxWeightMultipleForWeightBasedPlacement()Returns the max multiple to use for nodes with very high weight.doublegetBookieQuarantineRatio()Get the bookie quarantine ratio.intgetBookieQuarantineTimeSeconds()Get the time for which a bookie will be quarantined.BookKeeper.DigestTypegetBookieRecoveryDigestType()Get digest type used in bookkeeper admin.byte[]getBookieRecoveryPasswd()Get passwd used in bookkeeper admin.longgetClientConnectBookieUnavailableLogThrottlingMs()Get the log frequency when a bookie is unavailable, in milliseconds.intgetClientConnectTimeoutMillis()Get client netty connect timeout in millis.intgetClientReceiveBufferSize()Get client netty channel receive buffer size.java.lang.StringgetClientRole()Get the role of the client.intgetClientSendBufferSize()Get client netty channel send buffer size.booleangetClientSockKeepalive()get socket keepalive.booleangetClientTcpNoDelay()Is tcp connection no delay.intgetClientWriteBufferHighWaterMark()Get client netty channel write buffer high water mark.intgetClientWriteBufferLowWaterMark()Get client netty channel write buffer low water mark.booleangetDelayEnsembleChange()Whether to delay ensemble change or not?java.lang.StringgetDisableEnsembleChangeFeatureName()Get the name of the dynamic feature that disables ensemble change.booleangetDiskWeightBasedPlacementEnabled()Return whether disk weight based placement policy is enabled.booleangetEnableBookieAddressTracking()Whether to enable bookie address changes tracking.booleangetEnableBookieFailureTracking()Whether to enable bookie failure tracking.booleangetEnableDigestTypeAutodetection()Get autodetection of digest type.booleangetEnableParallelRecoveryRead()Whether to enable parallel reading in recovery read.booleangetEnableTaskExecutionStats()Whether to enable recording task execution stats.java.lang.Class<? extends EnsemblePlacementPolicy>getEnsemblePlacementPolicy()Get Ensemble Placement Policy Class.booleangetEnsemblePlacementPolicySlowBookies()Whether to order slow bookies in placement policy.intgetExplictLacInterval()Get the configured interval between explicit LACs to bookies.intgetFirstSpeculativeReadLACTimeout()Get the period of time after which the first speculative read last add confirmed and entry should be triggered.intgetFirstSpeculativeReadTimeout()Get the first speculative read timeout.intgetGetBookieInfoIntervalSeconds()Get the time interval between successive calls for bookie get info.intgetGetBookieInfoRetryIntervalSeconds()Get the time interval between retries on unsuccessful bookie info request.booleangetHostnameVerificationEnabled()Whether hostname verification enabled?intgetMaxAllowedEnsembleChanges()Get the max allowed ensemble change number.intgetMaxSpeculativeReadLACTimeout()Get the maximum interval between successive speculative read last add confirmed and entry requests.intgetMaxSpeculativeReadTimeout()Get the max speculative read timeout.intgetNetworkTopologyStabilizePeriodSeconds()Get the network topology stabilize period in seconds.intgetNumChannelsPerBookie()Get num channels per bookie.intgetNumIOThreads()Get the number of IO threads.intgetNumWorkerThreads()Get the number of worker threads.booleangetOpportunisticStriping()Whether to allow opportunistic striping.intgetPCBCTimeoutTimerNumTicks()Deprecated.longgetPCBCTimeoutTimerTickDurationMs()Deprecated.intgetReadEntryTimeout()Get the timeout for read entry.intgetReadTimeout()Deprecated.usegetReadEntryTimeout()orgetAddEntryTimeout()insteadintgetRecoveryReadBatchSize()Get Recovery Read Batch Size.java.lang.Class<? extends RegistrationClient>getRegistrationClientClass()Deprecated.since 4.7.0intgetReorderThresholdPendingRequests()Get the threshold for the number of pending requests beyond which to reorder reads.floatgetSpeculativeReadLACTimeoutBackoffMultiplier()Multipler to use when determining time between successive speculative read LAC requests.intgetSpeculativeReadTimeout()Get the period of time after which a speculative entry read should be triggered.floatgetSpeculativeReadTimeoutBackoffMultiplier()Multipler to use when determining time between successive speculative read requests.intgetStartTLSTimeout()Return the timeout value for startTLS request.booleangetStoreSystemtimeAsLedgerCreationTime()Return the flag that indicates whether client is using system time as the ledger creation time when creating ledgers.longgetTaskExecutionWarnTimeMicros()Get task execution duration which triggers a warning.intgetTcpUserTimeoutMillis()Get client netty TCP user timeout in millis (only for Epoll channels).protected ClientConfigurationgetThis()Trickery to allow inheritance with fluent style.intgetThrottleValue()Get throttle value.longgetTimeoutMonitorIntervalSec()Get the interval between successive executions of the operation timeout monitor.longgetTimeoutTaskIntervalMillis()Deprecated.intgetTimeoutTimerNumTicks()Get number of ticks that used for timeout timer.longgetTimeoutTimerTickDurationMs()Get the tick duration in milliseconds that used for timeout timer.java.lang.StringgetTLSCertificatePath()Get the path to file containing TLS Certificate.java.lang.StringgetTLSKeyStore()Get the keystore path for the client.java.lang.StringgetTLSKeyStorePasswordPath()Get the path to file containing keystore password, if the client keystore is password protected.java.lang.StringgetTLSKeyStoreType()Get the keystore type for client.java.lang.StringgetTLSTrustStore()Get the truststore path for the client.java.lang.StringgetTLSTrustStorePasswordPath()Get the path to file containing truststore password, if the client truststore is password protected.java.lang.StringgetTLSTrustStoreType()Get the truststore type for client.booleangetUseV2WireProtocol()Use older Bookkeeper wire protocol (no protobuf).longgetWaitTimeoutOnBackpressureMillis()Timeout controlling wait on request send in case of unresponsive bookie(s) (i.e.booleanisBookieHealthCheckEnabled()Check if bookie health check is enabled.booleanisNettyUsePooledBuffers()Deprecated.booleanisReorderReadSequenceEnabled()If reorder read sequence enabled or not.booleanisStickyReadsEnabled()If read operation should be sticky to a single bookie or not.ClientConfigurationsetAddEntryQuorumTimeout(int timeout)Set timeout for top-level add entry request.ClientConfigurationsetAddEntryTimeout(int timeout)Set timeout for add entry request.ClientConfigurationsetBookieErrorThresholdPerInterval(long thresholdPerInterval)Set the error threshold per interval (getBookieHealthCheckIntervalSeconds()) for a bookie before it is quarantined.ClientConfigurationsetBookieFailureHistoryExpirationMSec(int expirationMSec)Set the bookie failure tracking expiration timeout.ClientConfigurationsetBookieHealthCheckInterval(int interval, java.util.concurrent.TimeUnit unit)Set the bookie health check interval.ClientConfigurationsetBookieMaxWeightMultipleForWeightBasedPlacement(int multiple)Set the max multiple to use for nodes with very high weight.ClientConfigurationsetBookieQuarantineRatio(double ratio)set the bookie quarantine ratio.ClientConfigurationsetBookieQuarantineTime(int quarantineTime, java.util.concurrent.TimeUnit unit)Set the time for which a bookie will be quarantined.ClientConfigurationsetBookieRecoveryDigestType(BookKeeper.DigestType digestType)Set digest type used in bookkeeper admin.ClientConfigurationsetBookieRecoveryPasswd(byte[] passwd)Set passwd used in bookkeeper admin.ClientConfigurationsetClientConnectBookieUnavailableLogThrottling(int throttleValue, java.util.concurrent.TimeUnit unit)Set the log frequency when a bookie is unavailable, in order to limit log filesize.ClientConfigurationsetClientConnectTimeoutMillis(int connectTimeoutMillis)Set client netty connect timeout in millis.ClientConfigurationsetClientReceiveBufferSize(int bufferSize)Set client netty channel receive buffer size.ClientConfigurationsetClientRole(java.lang.String role)Set the client role.ClientConfigurationsetClientSendBufferSize(int bufferSize)Set client netty channel send buffer size.ClientConfigurationsetClientSockKeepalive(boolean keepalive)Set socket keepalive setting.ClientConfigurationsetClientTcpNoDelay(boolean noDelay)Set socket nodelay setting.ClientConfigurationsetClientWriteBufferHighWaterMark(int waterMark)Set client netty channel write buffer high water mark.ClientConfigurationsetClientWriteBufferLowWaterMark(int waterMark)Set client netty channel write buffer low water mark.ClientConfigurationsetDelayEnsembleChange(boolean enabled)Enable/Disable delaying ensemble change.ClientConfigurationsetDisableEnsembleChangeFeatureName(java.lang.String disableEnsembleChangeFeatureName)Set the name of the dynamic feature that disables ensemble change.ClientConfigurationsetDiskWeightBasedPlacementEnabled(boolean isEnabled)Set whether or not disk weight based placement is enabled.ClientConfigurationsetEnableBookieAddressTracking(boolean value)Enable/Disable bookie address changes tracking.ClientConfigurationsetEnableBookieFailureTracking(boolean enabled)Enable/Disable bookie failure tracking.ClientConfigurationsetEnableDigestTypeAutodetection(boolean enable)Enable autodetection of digest type.ClientConfigurationsetEnableParallelRecoveryRead(boolean enabled)Enable/Disable parallel reading in recovery read.ClientConfigurationsetEnableTaskExecutionStats(boolean enabled)Enable/Disable recording task execution stats.ClientConfigurationsetEnsemblePlacementPolicy(java.lang.Class<? extends EnsemblePlacementPolicy> policyClass)Set Ensemble Placement Policy Class.ClientConfigurationsetEnsemblePlacementPolicySlowBookies(boolean enabled)Enable/Disable ordering slow bookies in placement policy.ClientConfigurationsetExplictLacInterval(int interval)Set the interval to check the need for sending an explicit LAC.ClientConfigurationsetFirstSpeculativeReadLACTimeout(int timeout)Set the period of time after which the first speculative read last add confirmed and entry should be triggered.ClientConfigurationsetFirstSpeculativeReadTimeout(int timeout)Set the first speculative read timeout.ClientConfigurationsetGetBookieInfoIntervalSeconds(int pollInterval, java.util.concurrent.TimeUnit unit)Set the time interval between successive polls for bookie get info.ClientConfigurationsetGetBookieInfoRetryIntervalSeconds(int interval, java.util.concurrent.TimeUnit unit)Set the time interval between retries on unsuccessful GetInfo requests.ClientConfigurationsetGetBookieInfoTimeout(int timeoutSecs)Set the timeout value in secs for the GET_BOOKIE_INFO request.ClientConfigurationsetHostnameVerificationEnabled(boolean enabled)Enable/Disable hostname verification for tls connection.ClientConfigurationsetMaxAllowedEnsembleChanges(int num)Set the max allowed ensemble change number.ClientConfigurationsetMaxSpeculativeReadLACTimeout(int timeout)Set the maximum interval between successive speculative read last add confirmed and entry requests.ClientConfigurationsetMaxSpeculativeReadTimeout(int timeout)Set the max speculative read timeout.ClientConfigurationsetNettyMaxFrameSizeBytes(int maxSize)Set the max number of bytes a single message can be that is read by the bookie.ClientConfigurationsetNettyUsePooledBuffers(boolean enabled)Deprecated.ClientConfigurationsetNetworkTopologyStabilizePeriodSeconds(int seconds)Set the network topology stabilize period in seconds.ClientConfigurationsetNumChannelsPerBookie(int numChannelsPerBookie)Set num channels per bookie.ClientConfigurationsetNumIOThreads(int numThreads)Set the number of IO threads.ClientConfigurationsetNumWorkerThreads(int numThreads)Set the number of worker threads.ClientConfigurationsetOpportunisticStriping(boolean enabled)Enable/Disable opportunistic striping.ClientConfigurationsetPCBCTimeoutTimerNumTicks(int numTicks)Deprecated.ClientConfigurationsetPCBCTimeoutTimerTickDurationMs(long tickDuration)Deprecated.ClientConfigurationsetReadEntryTimeout(int timeout)Set the timeout for read entry request.ClientConfigurationsetReadTimeout(int timeout)Deprecated.usesetReadEntryTimeout(int)orsetAddEntryTimeout(int)insteadClientConfigurationsetRecoveryReadBatchSize(int batchSize)Set Recovery Read Batch Size.ClientConfigurationsetRegistrationClientClass(java.lang.Class<? extends RegistrationClient> regClientClass)Deprecated.since 4.7.0ClientConfigurationsetReorderReadSequenceEnabled(boolean enabled)Enable/disable reordering read sequence on reading entries.ClientConfigurationsetReorderThresholdPendingRequests(int threshold)Set the threshold for the number of pending requests beyond which to reorder reads.ClientConfigurationsetSpeculativeReadLACTimeoutBackoffMultiplier(float speculativeReadLACTimeoutBackoffMultiplier)Set the multipler to use when determining time between successive speculative read LAC requests.ClientConfigurationsetSpeculativeReadTimeout(int timeout)Set the speculative read timeout.ClientConfigurationsetSpeculativeReadTimeoutBackoffMultiplier(float speculativeReadTimeoutBackoffMultiplier)Set the multipler to use when determining time between successive speculative read requests.ClientConfigurationsetStartTLSTimeout(int timeoutSecs)Set the timeout value in secs for the START_TLS request.ClientConfigurationsetStickyReadsEnabled(boolean enabled)Enable/disable having read operations for a ledger to be sticky to a single bookie.ClientConfigurationsetStoreSystemtimeAsLedgerCreationTime(boolean enabled)Enable the client to use system time as the ledger creation time.ClientConfigurationsetTaskExecutionWarnTimeMicros(long warnTime)Set task execution duration which triggers a warning.ClientConfigurationsetTcpUserTimeoutMillis(int tcpUserTimeoutMillis)Set client netty TCP user timeout in millis (only for Epoll channels).ClientConfigurationsetThrottleValue(int throttle)Set throttle value.ClientConfigurationsetTimeoutMonitorIntervalSec(long timeoutInterval)Set the interval between successive executions of the operation timeout monitor.ClientConfigurationsetTimeoutTaskIntervalMillis(long timeoutMillis)Deprecated.ClientConfigurationsetTimeoutTimerNumTicks(int numTicks)Set number of ticks that used for timeout timer.ClientConfigurationsetTimeoutTimerTickDurationMs(long tickDuration)Set the tick duration in milliseconds that used for timeout timer.ClientConfigurationsetTLSCertificatePath(java.lang.String arg)Set the path to file containing TLS Certificate.ClientConfigurationsetTLSKeyStore(java.lang.String arg)Set the keystore path for the client.ClientConfigurationsetTLSKeyStorePasswordPath(java.lang.String arg)Set the path to file containing keystore password, if the client keystore is password protected.ClientConfigurationsetTLSKeyStoreType(java.lang.String arg)Set the keystore type for client.ClientConfigurationsetTLSTrustStore(java.lang.String arg)Set the truststore path for the client.ClientConfigurationsetTLSTrustStorePasswordPath(java.lang.String arg)Set the path to file containing truststore password, if the client truststore is password protected.ClientConfigurationsetTLSTrustStoreType(java.lang.String arg)Set the truststore type for client.ClientConfigurationsetUseV2WireProtocol(boolean useV2WireProtocol)Set whether or not to use older Bookkeeper wire protocol (no protobuf).ClientConfigurationsetWaitTimeoutOnBackpressureMillis(long value)Timeout controlling wait on request send in case of unresponsive bookie(s) (i.e.- 
Methods inherited from class org.apache.bookkeeper.conf.AbstractConfigurationasJson, getAllocatorLeakDetectionPolicy, getAllocatorOutOfMemoryPolicy, getAllocatorPoolingConcurrency, getAllocatorPoolingPolicy, getClientAuthProviderFactoryClass, getDesiredNumZonesPerWriteQuorum, getEnforceMinNumFaultDomainsForWrite, getEnforceMinNumRacksPerWriteQuorum, getEnforceStrictZoneawarePlacement, getEntryFormatterClass, getFeature, getIgnoreLocalNodeInPlacementPolicy, getLedgerIdFormatterClass, getLedgerManagerFactoryClass, getLedgerManagerFactoryClassName, getLedgerManagerLayoutStringFromFactoryClass, getLedgerManagerType, getLedgerMetadataFormatVersion, 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, setLedgerMetadataFormatVersion, setLimitStatsLogging, setMetadataServiceUri, setMetastoreImplClass, setMetastoreMaxEntriesPerScan, setMinNumRacksPerWriteQuorum, setMinNumZonesPerWriteQuorum, setPermittedStartupUsers, setPreserveMdcForTaskExecution, setReplicationRateByBytes, setRereplicationEntryBatchSize, setShadedLedgerManagerFactoryClassPrefix, setStoreSystemTimeAsLedgerUnderreplicatedMarkTime, setTLSCertFilesRefreshDurationSeconds, setTLSClientAuthentication, setTLSEnabledCipherSuites, setTLSEnabledProtocols, setTLSProvider, setTLSProviderFactoryClass, setZkEnableSecurity, setZkLedgersRootPath, setZkRequestRateLimit, setZkRetryBackoffMaxRetries, setZkServers, setZkTimeout
 - 
Methods inherited from class org.apache.commons.configuration.CompositeConfigurationaddConfiguration, addConfiguration, addPropertyDirect, clear, clearPropertyDirect, clone, containsKey, getConfiguration, getInMemoryConfiguration, getKeys, getKeys, getList, getNumberOfConfigurations, getProperty, getSource, getStringArray, isEmpty, removeConfiguration, setDelimiterParsingDisabled, setListDelimiter
 - 
Methods inherited from class org.apache.commons.configuration.AbstractConfigurationaddErrorLogListener, 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, subset
 - 
Methods inherited from class org.apache.commons.configuration.event.EventSourceaddConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents
 
- 
 
- 
- 
- 
Field Detail- 
THROTTLEprotected static final java.lang.String THROTTLE - See Also:
- Constant Field Values
 
 - 
DIGEST_TYPEprotected static final java.lang.String DIGEST_TYPE - See Also:
- Constant Field Values
 
 - 
ENABLE_DIGEST_TYPE_AUTODETECTIONprotected static final java.lang.String ENABLE_DIGEST_TYPE_AUTODETECTION - See Also:
- Constant Field Values
 
 - 
PASSWDprotected static final java.lang.String PASSWD - See Also:
- Constant Field Values
 
 - 
CLIENT_TLS_KEYSTORE_TYPE@Deprecated protected static final java.lang.String CLIENT_TLS_KEYSTORE_TYPE Deprecated.- See Also:
- Constant Field Values
 
 - 
CLIENT_TLS_KEYSTORE@Deprecated protected static final java.lang.String CLIENT_TLS_KEYSTORE Deprecated.- See Also:
- Constant Field Values
 
 - 
CLIENT_TLS_KEYSTORE_PASSWORD_PATH@Deprecated protected static final java.lang.String CLIENT_TLS_KEYSTORE_PASSWORD_PATH Deprecated.- See Also:
- Constant Field Values
 
 - 
CLIENT_TLS_TRUSTSTORE_TYPE@Deprecated protected static final java.lang.String CLIENT_TLS_TRUSTSTORE_TYPE Deprecated.- See Also:
- Constant Field Values
 
 - 
CLIENT_TLS_TRUSTSTORE@Deprecated protected static final java.lang.String CLIENT_TLS_TRUSTSTORE Deprecated.- See Also:
- Constant Field Values
 
 - 
CLIENT_TLS_TRUSTSTORE_PASSWORD_PATH@Deprecated protected static final java.lang.String CLIENT_TLS_TRUSTSTORE_PASSWORD_PATH Deprecated.- See Also:
- Constant Field Values
 
 - 
CLIENT_TCP_NODELAYprotected static final java.lang.String CLIENT_TCP_NODELAY - See Also:
- Constant Field Values
 
 - 
CLIENT_SOCK_KEEPALIVEprotected static final java.lang.String CLIENT_SOCK_KEEPALIVE - See Also:
- Constant Field Values
 
 - 
CLIENT_SENDBUFFER_SIZEprotected static final java.lang.String CLIENT_SENDBUFFER_SIZE - See Also:
- Constant Field Values
 
 - 
CLIENT_RECEIVEBUFFER_SIZEprotected static final java.lang.String CLIENT_RECEIVEBUFFER_SIZE - See Also:
- Constant Field Values
 
 - 
CLIENT_WRITEBUFFER_LOW_WATER_MARKprotected static final java.lang.String CLIENT_WRITEBUFFER_LOW_WATER_MARK - See Also:
- Constant Field Values
 
 - 
CLIENT_WRITEBUFFER_HIGH_WATER_MARKprotected static final java.lang.String CLIENT_WRITEBUFFER_HIGH_WATER_MARK - See Also:
- Constant Field Values
 
 - 
CLIENT_CONNECT_TIMEOUT_MILLISprotected static final java.lang.String CLIENT_CONNECT_TIMEOUT_MILLIS - See Also:
- Constant Field Values
 
 - 
CLIENT_TCP_USER_TIMEOUT_MILLISprotected static final java.lang.String CLIENT_TCP_USER_TIMEOUT_MILLIS - See Also:
- Constant Field Values
 
 - 
NUM_CHANNELS_PER_BOOKIEprotected static final java.lang.String NUM_CHANNELS_PER_BOOKIE - See Also:
- Constant Field Values
 
 - 
USE_V2_WIRE_PROTOCOLprotected static final java.lang.String USE_V2_WIRE_PROTOCOL - See Also:
- Constant Field Values
 
 - 
NETTY_USE_POOLED_BUFFERSprotected static final java.lang.String NETTY_USE_POOLED_BUFFERS - See Also:
- Constant Field Values
 
 - 
READ_TIMEOUTprotected static final java.lang.String READ_TIMEOUT - See Also:
- Constant Field Values
 
 - 
SPECULATIVE_READ_TIMEOUTprotected static final java.lang.String SPECULATIVE_READ_TIMEOUT - See Also:
- Constant Field Values
 
 - 
FIRST_SPECULATIVE_READ_TIMEOUTprotected static final java.lang.String FIRST_SPECULATIVE_READ_TIMEOUT - See Also:
- Constant Field Values
 
 - 
MAX_SPECULATIVE_READ_TIMEOUTprotected static final java.lang.String MAX_SPECULATIVE_READ_TIMEOUT - See Also:
- Constant Field Values
 
 - 
SPECULATIVE_READ_TIMEOUT_BACKOFF_MULTIPLIERprotected static final java.lang.String SPECULATIVE_READ_TIMEOUT_BACKOFF_MULTIPLIER - See Also:
- Constant Field Values
 
 - 
FIRST_SPECULATIVE_READ_LAC_TIMEOUTprotected static final java.lang.String FIRST_SPECULATIVE_READ_LAC_TIMEOUT - See Also:
- Constant Field Values
 
 - 
MAX_SPECULATIVE_READ_LAC_TIMEOUTprotected static final java.lang.String MAX_SPECULATIVE_READ_LAC_TIMEOUT - See Also:
- Constant Field Values
 
 - 
SPECULATIVE_READ_LAC_TIMEOUT_BACKOFF_MULTIPLIERprotected static final java.lang.String SPECULATIVE_READ_LAC_TIMEOUT_BACKOFF_MULTIPLIER - See Also:
- Constant Field Values
 
 - 
ENABLE_PARALLEL_RECOVERY_READprotected static final java.lang.String ENABLE_PARALLEL_RECOVERY_READ - See Also:
- Constant Field Values
 
 - 
RECOVERY_READ_BATCH_SIZEprotected static final java.lang.String RECOVERY_READ_BATCH_SIZE - See Also:
- Constant Field Values
 
 - 
REORDER_READ_SEQUENCE_ENABLEDprotected static final java.lang.String REORDER_READ_SEQUENCE_ENABLED - See Also:
- Constant Field Values
 
 - 
STICKY_READS_ENABLEDprotected static final java.lang.String STICKY_READS_ENABLED - See Also:
- Constant Field Values
 
 - 
OPPORTUNISTIC_STRIPINGprotected static final java.lang.String OPPORTUNISTIC_STRIPING - See Also:
- Constant Field Values
 
 - 
DELAY_ENSEMBLE_CHANGEprotected static final java.lang.String DELAY_ENSEMBLE_CHANGE - See Also:
- Constant Field Values
 
 - 
MAX_ALLOWED_ENSEMBLE_CHANGESprotected static final java.lang.String MAX_ALLOWED_ENSEMBLE_CHANGES - See Also:
- Constant Field Values
 
 - 
ADD_ENTRY_TIMEOUT_SECprotected static final java.lang.String ADD_ENTRY_TIMEOUT_SEC - See Also:
- Constant Field Values
 
 - 
ADD_ENTRY_QUORUM_TIMEOUT_SECprotected static final java.lang.String ADD_ENTRY_QUORUM_TIMEOUT_SEC - See Also:
- Constant Field Values
 
 - 
READ_ENTRY_TIMEOUT_SECprotected static final java.lang.String READ_ENTRY_TIMEOUT_SEC - See Also:
- Constant Field Values
 
 - 
TIMEOUT_MONITOR_INTERVAL_SECprotected static final java.lang.String TIMEOUT_MONITOR_INTERVAL_SEC - See Also:
- Constant Field Values
 
 - 
TIMEOUT_TASK_INTERVAL_MILLISprotected static final java.lang.String TIMEOUT_TASK_INTERVAL_MILLIS - See Also:
- Constant Field Values
 
 - 
EXPLICIT_LAC_INTERVALprotected static final java.lang.String EXPLICIT_LAC_INTERVAL - See Also:
- Constant Field Values
 
 - 
PCBC_TIMEOUT_TIMER_TICK_DURATION_MSprotected static final java.lang.String PCBC_TIMEOUT_TIMER_TICK_DURATION_MS - See Also:
- Constant Field Values
 
 - 
PCBC_TIMEOUT_TIMER_NUM_TICKSprotected static final java.lang.String PCBC_TIMEOUT_TIMER_NUM_TICKS - See Also:
- Constant Field Values
 
 - 
TIMEOUT_TIMER_TICK_DURATION_MSprotected static final java.lang.String TIMEOUT_TIMER_TICK_DURATION_MS - See Also:
- Constant Field Values
 
 - 
TIMEOUT_TIMER_NUM_TICKSprotected static final java.lang.String TIMEOUT_TIMER_NUM_TICKS - See Also:
- Constant Field Values
 
 - 
WAIT_TIMEOUT_ON_BACKPRESSUREprotected static final java.lang.String WAIT_TIMEOUT_ON_BACKPRESSURE - See Also:
- Constant Field Values
 
 - 
BOOKIE_HEALTH_CHECK_ENABLEDprotected static final java.lang.String BOOKIE_HEALTH_CHECK_ENABLED - See Also:
- Constant Field Values
 
 - 
BOOKIE_HEALTH_CHECK_INTERVAL_SECONDSprotected static final java.lang.String BOOKIE_HEALTH_CHECK_INTERVAL_SECONDS - See Also:
- Constant Field Values
 
 - 
BOOKIE_ERROR_THRESHOLD_PER_INTERVALprotected static final java.lang.String BOOKIE_ERROR_THRESHOLD_PER_INTERVAL - See Also:
- Constant Field Values
 
 - 
BOOKIE_QUARANTINE_TIME_SECONDSprotected static final java.lang.String BOOKIE_QUARANTINE_TIME_SECONDS - See Also:
- Constant Field Values
 
 - 
BOOKIE_QUARANTINE_RATIOprotected static final java.lang.String BOOKIE_QUARANTINE_RATIO - See Also:
- Constant Field Values
 
 - 
DISK_WEIGHT_BASED_PLACEMENT_ENABLEDprotected static final java.lang.String DISK_WEIGHT_BASED_PLACEMENT_ENABLED - See Also:
- Constant Field Values
 
 - 
GET_BOOKIE_INFO_INTERVAL_SECONDSprotected static final java.lang.String GET_BOOKIE_INFO_INTERVAL_SECONDS - See Also:
- Constant Field Values
 
 - 
GET_BOOKIE_INFO_RETRY_INTERVAL_SECONDSprotected static final java.lang.String GET_BOOKIE_INFO_RETRY_INTERVAL_SECONDS - See Also:
- Constant Field Values
 
 - 
BOOKIE_MAX_MULTIPLE_FOR_WEIGHTED_PLACEMENTprotected static final java.lang.String BOOKIE_MAX_MULTIPLE_FOR_WEIGHTED_PLACEMENT - See Also:
- Constant Field Values
 
 - 
GET_BOOKIE_INFO_TIMEOUT_SECSprotected static final java.lang.String GET_BOOKIE_INFO_TIMEOUT_SECS - See Also:
- Constant Field Values
 
 - 
START_TLS_TIMEOUT_SECSprotected static final java.lang.String START_TLS_TIMEOUT_SECS - See Also:
- Constant Field Values
 
 - 
TLS_HOSTNAME_VERIFICATION_ENABLEDprotected static final java.lang.String TLS_HOSTNAME_VERIFICATION_ENABLED - See Also:
- Constant Field Values
 
 - 
NUM_WORKER_THREADSprotected static final java.lang.String NUM_WORKER_THREADS - See Also:
- Constant Field Values
 
 - 
NUM_IO_THREADSprotected static final java.lang.String NUM_IO_THREADS - See Also:
- Constant Field Values
 
 - 
ENSEMBLE_PLACEMENT_POLICYpublic static final java.lang.String ENSEMBLE_PLACEMENT_POLICY - See Also:
- Constant Field Values
 
 - 
NETWORK_TOPOLOGY_STABILIZE_PERIOD_SECONDSprotected static final java.lang.String NETWORK_TOPOLOGY_STABILIZE_PERIOD_SECONDS - See Also:
- Constant Field Values
 
 - 
READ_REORDER_THRESHOLD_PENDING_REQUESTSprotected static final java.lang.String READ_REORDER_THRESHOLD_PENDING_REQUESTS - See Also:
- Constant Field Values
 
 - 
ENSEMBLE_PLACEMENT_POLICY_ORDER_SLOW_BOOKIESprotected static final java.lang.String ENSEMBLE_PLACEMENT_POLICY_ORDER_SLOW_BOOKIES - See Also:
- Constant Field Values
 
 - 
ENABLE_TASK_EXECUTION_STATSprotected static final java.lang.String ENABLE_TASK_EXECUTION_STATS - See Also:
- Constant Field Values
 
 - 
TASK_EXECUTION_WARN_TIME_MICROSprotected static final java.lang.String TASK_EXECUTION_WARN_TIME_MICROS - See Also:
- Constant Field Values
 
 - 
ENABLE_BOOKIE_FAILURE_TRACKINGprotected static final java.lang.String ENABLE_BOOKIE_FAILURE_TRACKING - See Also:
- Constant Field Values
 
 - 
BOOKIE_FAILURE_HISTORY_EXPIRATION_MSprotected static final java.lang.String BOOKIE_FAILURE_HISTORY_EXPIRATION_MS - See Also:
- Constant Field Values
 
 - 
FOLLOW_BOOKIE_ADDRESS_TRACKINGprotected static final java.lang.String FOLLOW_BOOKIE_ADDRESS_TRACKING - See Also:
- Constant Field Values
 
 - 
DISABLE_ENSEMBLE_CHANGE_FEATURE_NAMEprotected static final java.lang.String DISABLE_ENSEMBLE_CHANGE_FEATURE_NAME - See Also:
- Constant Field Values
 
 - 
CLIENT_ROLEprotected static final java.lang.String CLIENT_ROLE - See Also:
- Constant Field Values
 
 - 
CLIENT_ROLE_STANDARDpublic static final java.lang.String CLIENT_ROLE_STANDARD This client will act as a standard client.- See Also:
- Constant Field Values
 
 - 
CLIENT_ROLE_SYSTEMpublic static final java.lang.String CLIENT_ROLE_SYSTEM This client will act as a system client, like theAuditor.- See Also:
- Constant Field Values
 
 - 
CLIENT_AUTH_PROVIDER_FACTORY_CLASSprotected static final java.lang.String CLIENT_AUTH_PROVIDER_FACTORY_CLASS - See Also:
- Constant Field Values
 
 - 
REGISTRATION_CLIENT_CLASSprotected static final java.lang.String REGISTRATION_CLIENT_CLASS - See Also:
- Constant Field Values
 
 - 
CLIENT_CONNECT_BOOKIE_UNAVAILABLE_LOG_THROTTLINGprotected static final java.lang.String CLIENT_CONNECT_BOOKIE_UNAVAILABLE_LOG_THROTTLING - See Also:
- Constant Field Values
 
 
- 
 - 
Constructor Detail- 
ClientConfigurationpublic ClientConfiguration() Construct a default client-side configuration.
 - 
ClientConfigurationpublic ClientConfiguration(AbstractConfiguration conf) Construct a client-side configuration using a base configuration.- Parameters:
- conf- Base configuration
 
 
- 
 - 
Method Detail- 
getThrottleValuepublic int getThrottleValue() Get throttle value.- Returns:
- throttle value
- See Also:
- setThrottleValue(int)
 
 - 
setThrottleValuepublic ClientConfiguration setThrottleValue(int throttle) Set throttle value.Since BookKeeper process requests in asynchronous way, it will holds those pending request in queue. You may easily run it out of memory if producing too many requests than the capability of bookie servers can handle. To prevent that from happening, you can set a throttle value here. Setting the throttle value to 0, will disable any throttling. - Parameters:
- throttle- Throttle Value
- Returns:
- client configuration
 
 - 
getEnableDigestTypeAutodetectionpublic boolean getEnableDigestTypeAutodetection() Get autodetection of digest type.Ignores provided digestType, if enabled and uses one from ledger metadata instead. Incompatible with ledger created by bookie versions < 4.2 It is turned on by default since 4.7. - Returns:
- flag to enable/disable autodetection of digest type.
 
 - 
setEnableDigestTypeAutodetectionpublic ClientConfiguration setEnableDigestTypeAutodetection(boolean enable) Enable autodetection of digest type. Ignores provided digestType, if enabled and uses one from ledger metadata instead. Incompatible with ledger created by bookie versions < 4.2- Returns:
- client configuration.
 
 - 
getBookieRecoveryDigestTypepublic BookKeeper.DigestType getBookieRecoveryDigestType() Get digest type used in bookkeeper admin.- Returns:
- digest type
- See Also:
- setBookieRecoveryDigestType(org.apache.bookkeeper.client.BookKeeper.DigestType)
 
 - 
setBookieRecoveryDigestTypepublic ClientConfiguration setBookieRecoveryDigestType(BookKeeper.DigestType digestType) Set digest type used in bookkeeper admin.Digest Type and Passwd used to open ledgers for admin tool For now, assume that all ledgers were created with the same DigestType and password. In the future, this admin tool will need to know for each ledger, what was the DigestType and password used to create it before it can open it. These values will come from System properties, though fixed defaults are defined here. - Parameters:
- digestType- Digest Type
- Returns:
- client configuration
 
 - 
getBookieRecoveryPasswdpublic byte[] getBookieRecoveryPasswd() Get passwd used in bookkeeper admin.- Returns:
- password
- See Also:
- setBookieRecoveryPasswd(byte[])
 
 - 
setBookieRecoveryPasswdpublic ClientConfiguration setBookieRecoveryPasswd(byte[] passwd) Set passwd used in bookkeeper admin.Digest Type and Passwd used to open ledgers for admin tool For now, assume that all ledgers were created with the same DigestType and password. In the future, this admin tool will need to know for each ledger, what was the DigestType and password used to create it before it can open it. These values will come from System properties, though fixed defaults are defined here. - Parameters:
- passwd- Password
- Returns:
- client configuration
 
 - 
getClientTcpNoDelaypublic boolean getClientTcpNoDelay() Is tcp connection no delay.- Returns:
- tcp socket nodelay setting
- See Also:
- setClientTcpNoDelay(boolean)
 
 - 
setClientTcpNoDelaypublic ClientConfiguration setClientTcpNoDelay(boolean noDelay) Set socket nodelay setting.This settings is used to enabled/disabled Nagle's algorithm, which is a means of improving the efficiency of TCP/IP networks by reducing the number of packets that need to be sent over the network. If you are sending many small messages, such that more than one can fit in a single IP packet, setting client.tcpnodelay to false to enable Nagle algorithm can provide better performance. 
 Default value is true.- Parameters:
- noDelay- NoDelay setting
- Returns:
- client configuration
 
 - 
getClientSockKeepalivepublic boolean getClientSockKeepalive() get socket keepalive.- Returns:
- socket keepalive setting
 
 - 
setClientSockKeepalivepublic ClientConfiguration setClientSockKeepalive(boolean keepalive) Set socket keepalive setting.This setting is used to send keep-alive messages on connection-oriented sockets. - Parameters:
- keepalive- KeepAlive setting
- Returns:
- client configuration
 
 - 
getClientSendBufferSizepublic int getClientSendBufferSize() Get client netty channel send buffer size.- Returns:
- client netty channel send buffer size
 
 - 
setClientSendBufferSizepublic ClientConfiguration setClientSendBufferSize(int bufferSize) Set client netty channel send buffer size.- Parameters:
- bufferSize- client netty channel send buffer size.
- Returns:
- client configuration.
 
 - 
getClientReceiveBufferSizepublic int getClientReceiveBufferSize() Get client netty channel receive buffer size.- Returns:
- client netty channel receive buffer size.
 
 - 
setClientReceiveBufferSizepublic ClientConfiguration setClientReceiveBufferSize(int bufferSize) Set client netty channel receive buffer size.- Parameters:
- bufferSize- netty channel receive buffer size.
- Returns:
- client configuration.
 
 - 
getClientWriteBufferLowWaterMarkpublic int getClientWriteBufferLowWaterMark() Get client netty channel write buffer low water mark.- Returns:
- netty channel write buffer low water mark.
 
 - 
setClientWriteBufferLowWaterMarkpublic ClientConfiguration setClientWriteBufferLowWaterMark(int waterMark) Set client netty channel write buffer low water mark.- Parameters:
- waterMark- netty channel write buffer low water mark.
- Returns:
- client configuration.
 
 - 
getClientWriteBufferHighWaterMarkpublic int getClientWriteBufferHighWaterMark() Get client netty channel write buffer high water mark.- Returns:
- netty channel write buffer high water mark.
 
 - 
setClientWriteBufferHighWaterMarkpublic ClientConfiguration setClientWriteBufferHighWaterMark(int waterMark) Set client netty channel write buffer high water mark.- Parameters:
- waterMark- netty channel write buffer high water mark.
- Returns:
- client configuration.
 
 - 
getTimeoutTimerTickDurationMspublic long getTimeoutTimerTickDurationMs() Get the tick duration in milliseconds that used for timeout timer.- Returns:
- tick duration in milliseconds
 
 - 
setTimeoutTimerTickDurationMspublic ClientConfiguration setTimeoutTimerTickDurationMs(long tickDuration) Set the tick duration in milliseconds that used for timeout timer.- Parameters:
- tickDuration- tick duration in milliseconds.
- Returns:
- client configuration.
 
 - 
getTimeoutTimerNumTickspublic int getTimeoutTimerNumTicks() Get number of ticks that used for timeout timer.- Returns:
- number of ticks that used for timeout timer.
 
 - 
setTimeoutTimerNumTickspublic ClientConfiguration setTimeoutTimerNumTicks(int numTicks) Set number of ticks that used for timeout timer.- Parameters:
- numTicks- number of ticks that used for timeout timer.
- Returns:
- client configuration.
 
 - 
getClientConnectTimeoutMillispublic int getClientConnectTimeoutMillis() Get client netty connect timeout in millis.- Returns:
- client netty connect timeout in millis.
 
 - 
setClientConnectTimeoutMillispublic ClientConfiguration setClientConnectTimeoutMillis(int connectTimeoutMillis) Set client netty connect timeout in millis.- Parameters:
- connectTimeoutMillis- client netty connect timeout in millis.
- Returns:
- client configuration.
 
 - 
getTcpUserTimeoutMillispublic int getTcpUserTimeoutMillis() Get client netty TCP user timeout in millis (only for Epoll channels).- Returns:
- client netty Epoll user tcp timeout in millis.
- Throws:
- java.util.NoSuchElementException- if the property is not set.
 
 - 
setTcpUserTimeoutMillispublic ClientConfiguration setTcpUserTimeoutMillis(int tcpUserTimeoutMillis) Set client netty TCP user timeout in millis (only for Epoll channels).- Parameters:
- tcpUserTimeoutMillis- client netty TCP user timeout in millis.
- Returns:
- client configuration.
 
 - 
getNumChannelsPerBookiepublic int getNumChannelsPerBookie() Get num channels per bookie.- Returns:
- num channels per bookie.
 
 - 
setNumChannelsPerBookiepublic ClientConfiguration setNumChannelsPerBookie(int numChannelsPerBookie) Set num channels per bookie.- Parameters:
- numChannelsPerBookie- num channels per bookie.
- Returns:
- client configuration.
 
 - 
getUseV2WireProtocolpublic boolean getUseV2WireProtocol() Use older Bookkeeper wire protocol (no protobuf).- Returns:
- whether or not to use older Bookkeeper wire protocol (no protobuf)
 
 - 
setUseV2WireProtocolpublic ClientConfiguration setUseV2WireProtocol(boolean useV2WireProtocol) Set whether or not to use older Bookkeeper wire protocol (no protobuf).- Parameters:
- useV2WireProtocol- whether or not to use older Bookkeeper wire protocol (no protobuf)
- Returns:
- client configuration.
 
 - 
getReadTimeout@Deprecated public int getReadTimeout() Deprecated.usegetReadEntryTimeout()orgetAddEntryTimeout()insteadGet the socket read timeout. This is the number of seconds we wait without hearing a response from a bookie before we consider it failed.The default is 5 seconds. - Returns:
- the current read timeout in seconds
 
 - 
setReadTimeout@Deprecated public ClientConfiguration setReadTimeout(int timeout) Deprecated.usesetReadEntryTimeout(int)orsetAddEntryTimeout(int)insteadSet the socket read timeout.- Parameters:
- timeout- The new read timeout in seconds
- Returns:
- client configuration
- See Also:
- getReadTimeout()
 
 - 
getAddEntryTimeoutpublic int getAddEntryTimeout() Get the timeout for add request. This is the number of seconds we wait without hearing a response for add request from a bookie before we consider it failed.The default value is 5 second for backwards compatibility. - Returns:
- add entry timeout.
 
 - 
setAddEntryTimeoutpublic ClientConfiguration setAddEntryTimeout(int timeout) Set timeout for add entry request.- Parameters:
- timeout- The new add entry timeout in seconds.
- Returns:
- client configuration.
- See Also:
- getAddEntryTimeout()
 
 - 
getAddEntryQuorumTimeoutpublic int getAddEntryQuorumTimeout() Get the timeout for top-level add request. That is, the amount of time we should spend waiting for ack quorum.- Returns:
- add entry ack quorum timeout.
 
 - 
setAddEntryQuorumTimeoutpublic ClientConfiguration setAddEntryQuorumTimeout(int timeout) Set timeout for top-level add entry request.- Parameters:
- timeout- The new add entry ack quorum timeout in seconds.
- Returns:
- client configuration.
- See Also:
- getAddEntryQuorumTimeout()
 
 - 
getReadEntryTimeoutpublic int getReadEntryTimeout() Get the timeout for read entry. This is the number of seconds we wait without hearing a response for read entry request from a bookie before we consider it failed. By default, we use socket timeout specified atgetReadTimeout().- Returns:
- read entry timeout.
 
 - 
setReadEntryTimeoutpublic ClientConfiguration setReadEntryTimeout(int timeout) Set the timeout for read entry request.- Parameters:
- timeout- The new read entry timeout in seconds.
- Returns:
- client configuration.
- See Also:
- getReadEntryTimeout()
 
 - 
getTimeoutMonitorIntervalSecpublic long getTimeoutMonitorIntervalSec() Get the interval between successive executions of the operation timeout monitor. This value is in seconds.- Returns:
- the interval at which request timeouts will be checked
- See Also:
- setTimeoutMonitorIntervalSec(long)
 
 - 
setTimeoutMonitorIntervalSecpublic ClientConfiguration setTimeoutMonitorIntervalSec(long timeoutInterval) Set the interval between successive executions of the operation timeout monitor. The value in seconds. Every X seconds, all outstanding add and read operations are checked to see if they have been running for longer than their configured timeout. Any that have been will be errored out.This timeout should be set to a value which is a fraction of the values of getAddEntryQuorumTimeout(),getAddEntryTimeout()andgetReadEntryTimeout(), so that these timeouts run in a timely fashion.- Parameters:
- timeoutInterval- The timeout monitor interval, in seconds
- Returns:
- client configuration
 
 - 
getTimeoutTaskIntervalMillis@Deprecated public long getTimeoutTaskIntervalMillis() Deprecated.Get the interval between successive executions of the PerChannelBookieClient's TimeoutTask. This value is in milliseconds. Every X milliseconds, the timeout task will be executed and it will error out entries that have timed out.We do it more aggressive to not accumulate pending requests due to slow responses. - Returns:
- the interval at which request timeouts will be checked
 
 - 
setTimeoutTaskIntervalMillis@Deprecated public ClientConfiguration setTimeoutTaskIntervalMillis(long timeoutMillis) Deprecated.
 - 
getExplictLacIntervalpublic int getExplictLacInterval() Get the configured interval between explicit LACs to bookies. Generally LACs are piggy-backed on writes, and user can configure the interval between these protocol messages. A value of '0' disables sending any explicit LACs.- Returns:
- interval between explicit LACs
 
 - 
setExplictLacIntervalpublic ClientConfiguration setExplictLacInterval(int interval) Set the interval to check the need for sending an explicit LAC.- Parameters:
- interval- Number of milli seconds between checking the need for sending an explict LAC.
- Returns:
- Client configuration.
 
 - 
getPCBCTimeoutTimerTickDurationMs@Deprecated public long getPCBCTimeoutTimerTickDurationMs() Deprecated.Get the tick duration in milliseconds that used for the HashedWheelTimer that used by PCBC to timeout requests.- Returns:
- tick duration in milliseconds
 
 - 
setPCBCTimeoutTimerTickDurationMs@Deprecated public ClientConfiguration setPCBCTimeoutTimerTickDurationMs(long tickDuration) Deprecated.Set the tick duration in milliseconds that used for HashedWheelTimer that used by PCBC to timeout requests. Be aware of HashedWheelTimer if you are going to modify this setting.- Parameters:
- tickDuration- tick duration in milliseconds.
- Returns:
- client configuration.
- See Also:
- getPCBCTimeoutTimerTickDurationMs()
 
 - 
getPCBCTimeoutTimerNumTicks@Deprecated public int getPCBCTimeoutTimerNumTicks() Deprecated.Get number of ticks that used for HashedWheelTimer that used by PCBC to timeout requests.- Returns:
- number of ticks that used for timeout timer.
 
 - 
setPCBCTimeoutTimerNumTicks@Deprecated public ClientConfiguration setPCBCTimeoutTimerNumTicks(int numTicks) Deprecated.Set number of ticks that used for HashedWheelTimer that used by PCBC to timeout request. Be aware of HashedWheelTimer if you are going to modify this setting.- Parameters:
- numTicks- number of ticks that used for timeout timer.
- Returns:
- client configuration.
- See Also:
- getPCBCTimeoutTimerNumTicks()
 
 - 
getWaitTimeoutOnBackpressureMillispublic long getWaitTimeoutOnBackpressureMillis() Timeout controlling wait on request send in case of unresponsive bookie(s) (i.e. bookie in long GC etc.)- Returns:
- timeout value negative value disables the feature 0 to allow request to fail immediately Default is -1 (disabled)
 
 - 
setWaitTimeoutOnBackpressureMillispublic ClientConfiguration setWaitTimeoutOnBackpressureMillis(long value) Timeout controlling wait on request send in case of unresponsive bookie(s) (i.e. bookie in long GC etc.)- Parameters:
- value- negative value disables the feature 0 to allow request to fail immediately Default is -1 (disabled)
- Returns:
- client configuration.
 
 - 
getNumWorkerThreadspublic int getNumWorkerThreads() Get the number of worker threads. This is the number of worker threads used by bookkeeper client to submit operations.- Returns:
- the number of worker threads
 
 - 
setNumWorkerThreadspublic ClientConfiguration setNumWorkerThreads(int numThreads) Set the number of worker threads.NOTE: setting the number of worker threads after BookKeeper object is constructed will not take any effect on the number of threads in the pool. - Parameters:
- numThreads- number of worker threads used for bookkeeper
- Returns:
- client configuration
- See Also:
- getNumWorkerThreads()
 
 - 
getNumIOThreadspublic int getNumIOThreads() Get the number of IO threads. This is the number of threads used by Netty to handle TCP connections.- Returns:
- the number of IO threads
 
 - 
setNumIOThreadspublic ClientConfiguration setNumIOThreads(int numThreads) Set the number of IO threads.This is the number of threads used by Netty to handle TCP connections. NOTE: setting the number of IO threads after BookKeeper object is constructed will not take any effect on the number of threads in the pool. - Parameters:
- numThreads- number of IO threads used for bookkeeper
- Returns:
- client configuration
- See Also:
- getNumIOThreads()
 
 - 
getSpeculativeReadTimeoutpublic int getSpeculativeReadTimeout() Get the period of time after which a speculative entry read should be triggered. A speculative entry read is sent to the next replica bookie before an error or response has been received for the previous entry read request.A speculative entry read is only sent if we have not heard from the current replica bookie during the entire read operation which may comprise of many entries. Speculative reads allow the client to avoid having to wait for the connect timeout in the case that a bookie has failed. It induces higher load on the network and on bookies. This should be taken into account before changing this configuration value. - Returns:
- the speculative read timeout in milliseconds. Default 2000.
- See Also:
- LedgerHandle.asyncReadEntries(long, long, org.apache.bookkeeper.client.AsyncCallback.ReadCallback, java.lang.Object)
 
 - 
setSpeculativeReadTimeoutpublic ClientConfiguration setSpeculativeReadTimeout(int timeout) Set the speculative read timeout. A lower timeout will reduce read latency in the case of a failed bookie, while increasing the load on bookies and the network.The default is 2000 milliseconds. A value of 0 will disable speculative reads completely. - Parameters:
- timeout- the timeout value, in milliseconds
- Returns:
- client configuration
- See Also:
- getSpeculativeReadTimeout()
 
 - 
getFirstSpeculativeReadTimeoutpublic int getFirstSpeculativeReadTimeout() Get the first speculative read timeout.- Returns:
- first speculative read timeout.
 
 - 
setFirstSpeculativeReadTimeoutpublic ClientConfiguration setFirstSpeculativeReadTimeout(int timeout) Set the first speculative read timeout.- Parameters:
- timeout- first speculative read timeout.
- Returns:
- client configuration.
 
 - 
getSpeculativeReadTimeoutBackoffMultiplierpublic float getSpeculativeReadTimeoutBackoffMultiplier() Multipler to use when determining time between successive speculative read requests.- Returns:
- speculative read timeout backoff multiplier.
 
 - 
setSpeculativeReadTimeoutBackoffMultiplierpublic ClientConfiguration setSpeculativeReadTimeoutBackoffMultiplier(float speculativeReadTimeoutBackoffMultiplier) Set the multipler to use when determining time between successive speculative read requests.- Parameters:
- speculativeReadTimeoutBackoffMultiplier- multipler to use when determining time between successive speculative read requests.
- Returns:
- client configuration.
 
 - 
getSpeculativeReadLACTimeoutBackoffMultiplierpublic float getSpeculativeReadLACTimeoutBackoffMultiplier() Multipler to use when determining time between successive speculative read LAC requests.- Returns:
- speculative read LAC timeout backoff multiplier.
 
 - 
setSpeculativeReadLACTimeoutBackoffMultiplierpublic ClientConfiguration setSpeculativeReadLACTimeoutBackoffMultiplier(float speculativeReadLACTimeoutBackoffMultiplier) Set the multipler to use when determining time between successive speculative read LAC requests.- Parameters:
- speculativeReadLACTimeoutBackoffMultiplier- multipler to use when determining time between successive speculative read LAC requests.
- Returns:
- client configuration.
 
 - 
getMaxSpeculativeReadTimeoutpublic int getMaxSpeculativeReadTimeout() Get the max speculative read timeout.- Returns:
- max speculative read timeout.
 
 - 
setMaxSpeculativeReadTimeoutpublic ClientConfiguration setMaxSpeculativeReadTimeout(int timeout) Set the max speculative read timeout.- Parameters:
- timeout- max speculative read timeout.
- Returns:
- client configuration.
 
 - 
getFirstSpeculativeReadLACTimeoutpublic int getFirstSpeculativeReadLACTimeout() Get the period of time after which the first speculative read last add confirmed and entry should be triggered. A speculative entry request is sent to the next replica bookie before an error or response has been received for the previous entry read request.A speculative entry read is only sent if we have not heard from the current replica bookie during the entire read operation which may comprise of many entries. Speculative requests allow the client to avoid having to wait for the connect timeout in the case that a bookie has failed. It induces higher load on the network and on bookies. This should be taken into account before changing this configuration value. - Returns:
- the speculative request timeout in milliseconds. Default 1500.
 
 - 
getMaxSpeculativeReadLACTimeoutpublic int getMaxSpeculativeReadLACTimeout() Get the maximum interval between successive speculative read last add confirmed and entry requests.- Returns:
- the max speculative request timeout in milliseconds. Default 5000.
 
 - 
setFirstSpeculativeReadLACTimeoutpublic ClientConfiguration setFirstSpeculativeReadLACTimeout(int timeout) Set the period of time after which the first speculative read last add confirmed and entry should be triggered. A lower timeout will reduce read latency in the case of a failed bookie, while increasing the load on bookies and the network.The default is 1500 milliseconds. A value of 0 will disable speculative reads completely. - Parameters:
- timeout- the timeout value, in milliseconds
- Returns:
- client configuration
- See Also:
- getSpeculativeReadTimeout()
 
 - 
setMaxSpeculativeReadLACTimeoutpublic ClientConfiguration setMaxSpeculativeReadLACTimeout(int timeout) Set the maximum interval between successive speculative read last add confirmed and entry requests.- Parameters:
- timeout- the timeout value, in milliseconds
- Returns:
- client configuration
 
 - 
getEnableParallelRecoveryReadpublic boolean getEnableParallelRecoveryRead() Whether to enable parallel reading in recovery read.- Returns:
- true if enable parallel reading in recovery read. otherwise, return false.
 
 - 
setEnableParallelRecoveryReadpublic ClientConfiguration setEnableParallelRecoveryRead(boolean enabled) Enable/Disable parallel reading in recovery read.- Parameters:
- enabled- flag to enable/disable parallel reading in recovery read.
- Returns:
- client configuration.
 
 - 
getRecoveryReadBatchSizepublic int getRecoveryReadBatchSize() Get Recovery Read Batch Size.- Returns:
- recovery read batch size.
 
 - 
setRecoveryReadBatchSizepublic ClientConfiguration setRecoveryReadBatchSize(int batchSize) Set Recovery Read Batch Size.- Parameters:
- batchSize- recovery read batch size.
- Returns:
- client configuration.
 
 - 
isReorderReadSequenceEnabledpublic boolean isReorderReadSequenceEnabled() If reorder read sequence enabled or not.- Returns:
- true if reorder read sequence is enabled, otherwise false.
 
 - 
setReorderReadSequenceEnabledpublic ClientConfiguration setReorderReadSequenceEnabled(boolean enabled) Enable/disable reordering read sequence on reading entries.If this flag is enabled, the client will use EnsemblePlacementPolicy#reorderReadSequence(java.util.ArrayList, org.apache.bookkeeper.client.BookiesHealthInfo, org.apache.bookkeeper.client.DistributionSchedule.WriteSet)to figure out a better read sequence to attempt reads from replicas and useEnsemblePlacementPolicy#reorderReadLACSequence(java.util.ArrayList, org.apache.bookkeeper.client.BookiesHealthInfo, org.apache.bookkeeper.client.DistributionSchedule.WriteSet)to figure out a better read sequence to attempt long poll reads from replicas.The order of read sequence is determined by the placement policy implementations. - Parameters:
- enabled- the flag to enable/disable reorder read sequence.
- Returns:
- client configuration instance.
 
 - 
isStickyReadsEnabledpublic boolean isStickyReadsEnabled() If read operation should be sticky to a single bookie or not.- Returns:
- true if reorder read sequence is enabled, otherwise false.
 
 - 
setStickyReadsEnabledpublic ClientConfiguration setStickyReadsEnabled(boolean enabled) Enable/disable having read operations for a ledger to be sticky to a single bookie.If this flag is enabled, the client will use one single bookie (by preference) to read all entries for a ledger. Having all the read to one bookie will increase the chances that a read request will be fullfilled by Bookie read cache (or OS file system cache) when doing sequential reads. - Parameters:
- enabled- the flag to enable/disable sticky reads.
- Returns:
- client configuration instance.
 
 - 
getEnsemblePlacementPolicypublic java.lang.Class<? extends EnsemblePlacementPolicy> getEnsemblePlacementPolicy() throws org.apache.commons.configuration.ConfigurationException Get Ensemble Placement Policy Class.- Returns:
- ensemble placement policy class.
- Throws:
- org.apache.commons.configuration.ConfigurationException
 
 - 
setEnsemblePlacementPolicypublic ClientConfiguration setEnsemblePlacementPolicy(java.lang.Class<? extends EnsemblePlacementPolicy> policyClass) Set Ensemble Placement Policy Class.- Parameters:
- policyClass- Ensemble Placement Policy Class.
 
 - 
getReorderThresholdPendingRequestspublic int getReorderThresholdPendingRequests() Get the threshold for the number of pending requests beyond which to reorder reads. If <= zero, this feature is turned off.- Returns:
- the threshold for the number of pending requests beyond which to reorder reads.
 
 - 
setReorderThresholdPendingRequestspublic ClientConfiguration setReorderThresholdPendingRequests(int threshold) Set the threshold for the number of pending requests beyond which to reorder reads. If zero, this feature is turned off.- Parameters:
- threshold- The threshold for the number of pending requests beyond which to reorder reads.
 
 - 
getNetworkTopologyStabilizePeriodSecondspublic int getNetworkTopologyStabilizePeriodSeconds() Get the network topology stabilize period in seconds. if it is zero, this feature is turned off.- Returns:
- network topology stabilize period in seconds.
 
 - 
setNetworkTopologyStabilizePeriodSecondspublic ClientConfiguration setNetworkTopologyStabilizePeriodSeconds(int seconds) Set the network topology stabilize period in seconds.- Parameters:
- seconds- stabilize period in seconds
- Returns:
- client configuration.
- See Also:
- getNetworkTopologyStabilizePeriodSeconds()
 
 - 
getEnsemblePlacementPolicySlowBookiespublic boolean getEnsemblePlacementPolicySlowBookies() Whether to order slow bookies in placement policy.- Returns:
- flag of whether to order slow bookies in placement policy or not.
 
 - 
setEnsemblePlacementPolicySlowBookiespublic ClientConfiguration setEnsemblePlacementPolicySlowBookies(boolean enabled) Enable/Disable ordering slow bookies in placement policy.- Parameters:
- enabled- flag to enable/disable ordering slow bookies in placement policy.
- Returns:
- client configuration.
 
 - 
getEnableTaskExecutionStatspublic boolean getEnableTaskExecutionStats() Whether to enable recording task execution stats.- Returns:
- flag to enable/disable recording task execution stats.
 
 - 
setEnableTaskExecutionStatspublic ClientConfiguration setEnableTaskExecutionStats(boolean enabled) Enable/Disable recording task execution stats.- Parameters:
- enabled- flag to enable/disable recording task execution stats.
- Returns:
- client configuration.
 
 - 
getTaskExecutionWarnTimeMicrospublic long getTaskExecutionWarnTimeMicros() Get task execution duration which triggers a warning.- Returns:
- time in microseconds which triggers a warning.
 
 - 
setTaskExecutionWarnTimeMicrospublic ClientConfiguration setTaskExecutionWarnTimeMicros(long warnTime) Set task execution duration which triggers a warning.- Parameters:
- warnTime- time in microseconds which triggers a warning.
- Returns:
- client configuration.
 
 - 
isBookieHealthCheckEnabledpublic boolean isBookieHealthCheckEnabled() Check if bookie health check is enabled.- Returns:
 
 - 
enableBookieHealthCheckpublic ClientConfiguration enableBookieHealthCheck() Enables the bookie health check.If the number of read/write errors for a bookie exceeds getBookieErrorThresholdPerInterval()per interval, that bookie is quarantined forgetBookieQuarantineTimeSeconds()seconds. During this quarantined period, the client will try not to use this bookie when creating new ensembles.By default, the bookie health check is disabled. - Returns:
- client configuration
 
 - 
getBookieHealthCheckIntervalSecondspublic int getBookieHealthCheckIntervalSeconds() Get the bookie health check interval in seconds.- Returns:
 
 - 
setBookieHealthCheckIntervalpublic ClientConfiguration setBookieHealthCheckInterval(int interval, java.util.concurrent.TimeUnit unit) Set the bookie health check interval. Default is 60 seconds.Note: Please enableBookieHealthCheck()to use this configuration.- Parameters:
- interval-
- unit-
- Returns:
- client configuration
 
 - 
getBookieErrorThresholdPerIntervalpublic long getBookieErrorThresholdPerInterval() Get the error threshold for a bookie to be quarantined.- Returns:
 
 - 
setBookieErrorThresholdPerIntervalpublic ClientConfiguration setBookieErrorThresholdPerInterval(long thresholdPerInterval) Set the error threshold per interval (getBookieHealthCheckIntervalSeconds()) for a bookie before it is quarantined. Default is 100 errors per minute.Note: Please enableBookieHealthCheck()to use this configuration.- Parameters:
- thresholdPerInterval-
- Returns:
- client configuration
 
 - 
getBookieQuarantineTimeSecondspublic int getBookieQuarantineTimeSeconds() Get the time for which a bookie will be quarantined.- Returns:
 
 - 
setBookieQuarantineTimepublic ClientConfiguration setBookieQuarantineTime(int quarantineTime, java.util.concurrent.TimeUnit unit) Set the time for which a bookie will be quarantined. Default is 30 minutes.Note: Please enableBookieHealthCheck()to use this configuration.- Parameters:
- quarantineTime-
- unit-
- Returns:
- client configuration
 
 - 
getBookieQuarantineRatiopublic double getBookieQuarantineRatio() Get the bookie quarantine ratio.- Returns:
 
 - 
setBookieQuarantineRatiopublic ClientConfiguration setBookieQuarantineRatio(double ratio) set the bookie quarantine ratio. default is 1.0.- Parameters:
- ratio-
- Returns:
- client configuration
 
 - 
setNettyMaxFrameSizeBytespublic ClientConfiguration setNettyMaxFrameSizeBytes(int maxSize) Set the max number of bytes a single message can be that is read by the bookie. Any message larger than that size will be rejected.- Overrides:
- setNettyMaxFrameSizeBytesin class- AbstractConfiguration<ClientConfiguration>
- Parameters:
- maxSize- the max size in bytes
- Returns:
- server configuration
 
 - 
getGetBookieInfoIntervalSecondspublic int getGetBookieInfoIntervalSeconds() Get the time interval between successive calls for bookie get info. Default is 24 hours.- Returns:
 
 - 
getGetBookieInfoRetryIntervalSecondspublic int getGetBookieInfoRetryIntervalSeconds() Get the time interval between retries on unsuccessful bookie info request. Default is 60s.- Returns:
 
 - 
getDiskWeightBasedPlacementEnabledpublic boolean getDiskWeightBasedPlacementEnabled() Return whether disk weight based placement policy is enabled.- Returns:
 
 - 
getBookieMaxWeightMultipleForWeightBasedPlacementpublic int getBookieMaxWeightMultipleForWeightBasedPlacement() Returns the max multiple to use for nodes with very high weight.- Returns:
- max multiple
 
 - 
getBookieInfoTimeoutpublic int getBookieInfoTimeout() Return the timeout value for getBookieInfo request.- Returns:
 
 - 
getStartTLSTimeoutpublic int getStartTLSTimeout() Return the timeout value for startTLS request.- Returns:
 
 - 
setDiskWeightBasedPlacementEnabledpublic ClientConfiguration setDiskWeightBasedPlacementEnabled(boolean isEnabled) Set whether or not disk weight based placement is enabled.- Parameters:
- isEnabled- - boolean indicating enabled or not
- Returns:
- client configuration
 
 - 
setGetBookieInfoIntervalSecondspublic ClientConfiguration setGetBookieInfoIntervalSeconds(int pollInterval, java.util.concurrent.TimeUnit unit) Set the time interval between successive polls for bookie get info.- Parameters:
- pollInterval-
- unit-
- Returns:
- client configuration
 
 - 
setGetBookieInfoRetryIntervalSecondspublic ClientConfiguration setGetBookieInfoRetryIntervalSeconds(int interval, java.util.concurrent.TimeUnit unit) Set the time interval between retries on unsuccessful GetInfo requests.- Parameters:
- interval-
- unit-
- Returns:
- client configuration
 
 - 
setBookieMaxWeightMultipleForWeightBasedPlacementpublic ClientConfiguration setBookieMaxWeightMultipleForWeightBasedPlacement(int multiple) Set the max multiple to use for nodes with very high weight.- Parameters:
- multiple-
- Returns:
- client configuration
 
 - 
setGetBookieInfoTimeoutpublic ClientConfiguration setGetBookieInfoTimeout(int timeoutSecs) Set the timeout value in secs for the GET_BOOKIE_INFO request.- Parameters:
- timeoutSecs-
- Returns:
- client configuration
 
 - 
setStartTLSTimeoutpublic ClientConfiguration setStartTLSTimeout(int timeoutSecs) Set the timeout value in secs for the START_TLS request.- Parameters:
- timeoutSecs-
- Returns:
- client configuration
 
 - 
getHostnameVerificationEnabledpublic boolean getHostnameVerificationEnabled() Whether hostname verification enabled?- Returns:
- true if hostname verification enabled, otherwise false.
 
 - 
setHostnameVerificationEnabledpublic ClientConfiguration setHostnameVerificationEnabled(boolean enabled) Enable/Disable hostname verification for tls connection.- Parameters:
- enabled- flag to enable/disable tls hostname verification.
- Returns:
- client configuration.
 
 - 
setClientRolepublic ClientConfiguration setClientRole(java.lang.String role) Set the client role.- Parameters:
- role- defines how the client will act
- Returns:
- client configuration
 
 - 
getClientRolepublic java.lang.String getClientRole() Get the role of the client.- Returns:
- the type of client
 
 - 
getTLSKeyStoreTypepublic java.lang.String getTLSKeyStoreType() Get the keystore type for client. Default is JKS.- Returns:
 
 - 
setTLSKeyStoreTypepublic ClientConfiguration setTLSKeyStoreType(java.lang.String arg) Set the keystore type for client.- Returns:
 
 - 
getTLSKeyStorepublic java.lang.String getTLSKeyStore() Get the keystore path for the client.- Returns:
 
 - 
setTLSKeyStorepublic ClientConfiguration setTLSKeyStore(java.lang.String arg) Set the keystore path for the client.- Returns:
 
 - 
getTLSKeyStorePasswordPathpublic java.lang.String getTLSKeyStorePasswordPath() Get the path to file containing keystore password, if the client keystore is password protected. Default is null.- Returns:
 
 - 
setTLSKeyStorePasswordPathpublic ClientConfiguration setTLSKeyStorePasswordPath(java.lang.String arg) Set the path to file containing keystore password, if the client keystore is password protected.- Returns:
 
 - 
getTLSTrustStoreTypepublic java.lang.String getTLSTrustStoreType() Get the truststore type for client. Default is JKS.- Returns:
 
 - 
setTLSTrustStoreTypepublic ClientConfiguration setTLSTrustStoreType(java.lang.String arg) Set the truststore type for client.- Returns:
 
 - 
getTLSTrustStorepublic java.lang.String getTLSTrustStore() Get the truststore path for the client.- Returns:
 
 - 
setTLSTrustStorepublic ClientConfiguration setTLSTrustStore(java.lang.String arg) Set the truststore path for the client.- Returns:
 
 - 
getTLSTrustStorePasswordPathpublic java.lang.String getTLSTrustStorePasswordPath() Get the path to file containing truststore password, if the client truststore is password protected. Default is null.- Returns:
 
 - 
setTLSTrustStorePasswordPathpublic ClientConfiguration setTLSTrustStorePasswordPath(java.lang.String arg) Set the path to file containing truststore password, if the client truststore is password protected.- Returns:
 
 - 
getTLSCertificatePathpublic java.lang.String getTLSCertificatePath() Get the path to file containing TLS Certificate.- Returns:
 
 - 
setTLSCertificatePathpublic ClientConfiguration setTLSCertificatePath(java.lang.String arg) Set the path to file containing TLS Certificate.- Returns:
 
 - 
getOpportunisticStripingpublic boolean getOpportunisticStriping() Whether to allow opportunistic striping.- Returns:
- true if opportunistic striping is enabled
 
 - 
setOpportunisticStripingpublic ClientConfiguration setOpportunisticStriping(boolean enabled) Enable/Disable opportunistic striping.If set to true, when you are creating a ledger with a given ensemble size, the system will automatically handle the lack of enough bookies, reducing ensemble size up to the write quorum size. This way in little clusters you can try to use striping (ensemble size > write quorum size) in case that you have enough bookies up and running, and degrade automatically to the minimum requested replication count. - Parameters:
- enabled- flag to enable/disable opportunistic striping.
- Returns:
- client configuration.
 
 - 
getDelayEnsembleChangepublic boolean getDelayEnsembleChange() Whether to delay ensemble change or not?- Returns:
- true if to delay ensemble change, otherwise false.
 
 - 
setDelayEnsembleChangepublic ClientConfiguration setDelayEnsembleChange(boolean enabled) Enable/Disable delaying ensemble change.If set to true, ensemble change only happens when it can't meet ack quorum requirement. If set to false, ensemble change happens immediately when it received a failed write. - Parameters:
- enabled- flag to enable/disable delaying ensemble change.
- Returns:
- client configuration.
 
 - 
getEnableBookieAddressTrackingpublic boolean getEnableBookieAddressTracking() Whether to enable bookie address changes tracking.- Returns:
- flag to enable/disable bookie address changes tracking
 
 - 
setEnableBookieAddressTrackingpublic ClientConfiguration setEnableBookieAddressTracking(boolean value) Enable/Disable bookie address changes tracking.- Parameters:
- value- flag to enable/disable bookie address changes tracking
- Returns:
- client configuration.
 
 - 
getEnableBookieFailureTrackingpublic boolean getEnableBookieFailureTracking() Whether to enable bookie failure tracking.- Returns:
- flag to enable/disable bookie failure tracking
 
 - 
setEnableBookieFailureTrackingpublic ClientConfiguration setEnableBookieFailureTracking(boolean enabled) Enable/Disable bookie failure tracking.- Parameters:
- enabled- flag to enable/disable bookie failure tracking
- Returns:
- client configuration.
 
 - 
getBookieFailureHistoryExpirationMSecpublic int getBookieFailureHistoryExpirationMSec() Get the bookie failure tracking expiration timeout.- Returns:
- bookie failure tracking expiration timeout.
 
 - 
setBookieFailureHistoryExpirationMSecpublic ClientConfiguration setBookieFailureHistoryExpirationMSec(int expirationMSec) Set the bookie failure tracking expiration timeout.- Parameters:
- expirationMSec- bookie failure tracking expiration timeout.
- Returns:
- client configuration.
 
 - 
getDisableEnsembleChangeFeatureNamepublic java.lang.String getDisableEnsembleChangeFeatureName() Get the name of the dynamic feature that disables ensemble change.- Returns:
- name of the dynamic feature that disables ensemble change
 
 - 
setDisableEnsembleChangeFeatureNamepublic ClientConfiguration setDisableEnsembleChangeFeatureName(java.lang.String disableEnsembleChangeFeatureName) Set the name of the dynamic feature that disables ensemble change.- Parameters:
- disableEnsembleChangeFeatureName- name of the dynamic feature that disables ensemble change
- Returns:
- client configuration.
 
 - 
getMaxAllowedEnsembleChangespublic int getMaxAllowedEnsembleChanges() Get the max allowed ensemble change number.- Returns:
- value of MaxAllowedEnsembleChanges, default MAX_VALUE, indicating feature is disable.
 
 - 
setMaxAllowedEnsembleChangespublic ClientConfiguration setMaxAllowedEnsembleChanges(int num) Set the max allowed ensemble change number.- Parameters:
- num- value of MaxAllowedEnsembleChanges
- Returns:
- client configuration.
 
 - 
isNettyUsePooledBuffers@Deprecated public boolean isNettyUsePooledBuffers() Deprecated.Option to use Netty Pooled ByteBufs.- Returns:
- the value of the option
 
 - 
setNettyUsePooledBufferspublic ClientConfiguration setNettyUsePooledBuffers(boolean enabled) Deprecated.Enable/Disable the usage of Pooled Netty buffers. While using v2 wire protocol the application will be responsible for releasing ByteBufs returned by BookKeeper.- Parameters:
- enabled- if enabled BookKeeper will use default Pooled Netty Buffer allocator
- See Also:
- setUseV2WireProtocol(boolean),- ReferenceCounted.release(),- LedgerHandle.readEntries(long, long)
 
 - 
setRegistrationClientClass@Deprecated public ClientConfiguration setRegistrationClientClass(java.lang.Class<? extends RegistrationClient> regClientClass) Deprecated.since 4.7.0Set registration manager class.- Parameters:
- regClientClass- ClientClass
 
 - 
getRegistrationClientClass@Deprecated public java.lang.Class<? extends RegistrationClient> getRegistrationClientClass() throws org.apache.commons.configuration.ConfigurationException Deprecated.since 4.7.0Get Registration Client Class.- Returns:
- registration manager class.
- Throws:
- org.apache.commons.configuration.ConfigurationException
 
 - 
setStoreSystemtimeAsLedgerCreationTimepublic ClientConfiguration setStoreSystemtimeAsLedgerCreationTime(boolean enabled) Enable the client to use system time as the ledger creation time.If this is enabled, the client will write a ctime field into the ledger metadata. Otherwise, nothing will be written. The creation time of this ledger will be the ctime of the metadata record in metadata store. - Parameters:
- enabled- flag to enable/disable client using system time as the ledger creation time.
 
 - 
getStoreSystemtimeAsLedgerCreationTimepublic boolean getStoreSystemtimeAsLedgerCreationTime() Return the flag that indicates whether client is using system time as the ledger creation time when creating ledgers.- Returns:
- the flag that indicates whether client is using system time as the ledger creation time when creating ledgers.
 
 - 
setClientConnectBookieUnavailableLogThrottlingpublic ClientConfiguration setClientConnectBookieUnavailableLogThrottling(int throttleValue, java.util.concurrent.TimeUnit unit) Set the log frequency when a bookie is unavailable, in order to limit log filesize.- Parameters:
- throttleValue-
- unit-
- Returns:
- client configuration.
 
 - 
getClientConnectBookieUnavailableLogThrottlingMspublic long getClientConnectBookieUnavailableLogThrottlingMs() Get the log frequency when a bookie is unavailable, in milliseconds.- Returns:
- log frequency when a bookie is unavailable, in milliseconds.
 
 - 
getThisprotected ClientConfiguration getThis() Description copied from class:AbstractConfigurationTrickery to allow inheritance with fluent style.- Specified by:
- getThisin class- AbstractConfiguration<ClientConfiguration>
 
 
- 
 
-