public class ClientConfiguration extends AbstractConfiguration<ClientConfiguration>
| Modifier and Type | Field and Description |
|---|---|
protected static java.lang.String |
ADD_ENTRY_QUORUM_TIMEOUT_SEC |
protected static java.lang.String |
ADD_ENTRY_TIMEOUT_SEC |
protected static java.lang.String |
BOOKIE_ERROR_THRESHOLD_PER_INTERVAL |
protected static java.lang.String |
BOOKIE_FAILURE_HISTORY_EXPIRATION_MS |
protected static java.lang.String |
BOOKIE_HEALTH_CHECK_ENABLED |
protected static java.lang.String |
BOOKIE_HEALTH_CHECK_INTERVAL_SECONDS |
protected static java.lang.String |
BOOKIE_MAX_MULTIPLE_FOR_WEIGHTED_PLACEMENT |
protected static java.lang.String |
BOOKIE_QUARANTINE_RATIO |
protected static java.lang.String |
BOOKIE_QUARANTINE_TIME_SECONDS |
protected static java.lang.String |
CLIENT_AUTH_PROVIDER_FACTORY_CLASS |
protected static java.lang.String |
CLIENT_CONNECT_BOOKIE_UNAVAILABLE_LOG_THROTTLING |
protected static java.lang.String |
CLIENT_CONNECT_TIMEOUT_MILLIS |
protected static java.lang.String |
CLIENT_RECEIVEBUFFER_SIZE |
protected static java.lang.String |
CLIENT_ROLE |
static java.lang.String |
CLIENT_ROLE_STANDARD
This client will act as a standard client.
|
static java.lang.String |
CLIENT_ROLE_SYSTEM
This client will act as a system client, like the
Auditor. |
protected static java.lang.String |
CLIENT_SENDBUFFER_SIZE |
protected static java.lang.String |
CLIENT_SOCK_KEEPALIVE |
protected static java.lang.String |
CLIENT_TCP_NODELAY |
protected static java.lang.String |
CLIENT_TLS_KEYSTORE
Deprecated.
|
protected static java.lang.String |
CLIENT_TLS_KEYSTORE_PASSWORD_PATH
Deprecated.
|
protected static java.lang.String |
CLIENT_TLS_KEYSTORE_TYPE
Deprecated.
|
protected static java.lang.String |
CLIENT_TLS_TRUSTSTORE
Deprecated.
|
protected static java.lang.String |
CLIENT_TLS_TRUSTSTORE_PASSWORD_PATH
Deprecated.
|
protected static java.lang.String |
CLIENT_TLS_TRUSTSTORE_TYPE
Deprecated.
|
protected static java.lang.String |
CLIENT_WRITEBUFFER_HIGH_WATER_MARK |
protected static java.lang.String |
CLIENT_WRITEBUFFER_LOW_WATER_MARK |
protected static java.lang.String |
DELAY_ENSEMBLE_CHANGE |
protected static java.lang.String |
DIGEST_TYPE |
protected static java.lang.String |
DISABLE_ENSEMBLE_CHANGE_FEATURE_NAME |
protected static java.lang.String |
DISK_WEIGHT_BASED_PLACEMENT_ENABLED |
protected static java.lang.String |
ENABLE_BOOKIE_FAILURE_TRACKING |
protected static java.lang.String |
ENABLE_DIGEST_TYPE_AUTODETECTION |
protected static java.lang.String |
ENABLE_PARALLEL_RECOVERY_READ |
protected static java.lang.String |
ENABLE_TASK_EXECUTION_STATS |
static java.lang.String |
ENSEMBLE_PLACEMENT_POLICY |
protected static java.lang.String |
ENSEMBLE_PLACEMENT_POLICY_ORDER_SLOW_BOOKIES |
protected static java.lang.String |
EXPLICIT_LAC_INTERVAL |
protected static java.lang.String |
FIRST_SPECULATIVE_READ_LAC_TIMEOUT |
protected static java.lang.String |
FIRST_SPECULATIVE_READ_TIMEOUT |
protected static java.lang.String |
FOLLOW_BOOKIE_ADDRESS_TRACKING |
protected static java.lang.String |
GET_BOOKIE_INFO_INTERVAL_SECONDS |
protected static java.lang.String |
GET_BOOKIE_INFO_RETRY_INTERVAL_SECONDS |
protected static java.lang.String |
GET_BOOKIE_INFO_TIMEOUT_SECS |
protected static java.lang.String |
MAX_ALLOWED_ENSEMBLE_CHANGES |
protected static java.lang.String |
MAX_SPECULATIVE_READ_LAC_TIMEOUT |
protected static java.lang.String |
MAX_SPECULATIVE_READ_TIMEOUT |
protected static java.lang.String |
NETTY_USE_POOLED_BUFFERS |
protected static java.lang.String |
NETWORK_TOPOLOGY_STABILIZE_PERIOD_SECONDS |
protected static java.lang.String |
NUM_CHANNELS_PER_BOOKIE |
protected static java.lang.String |
NUM_IO_THREADS |
protected static java.lang.String |
NUM_WORKER_THREADS |
protected static java.lang.String |
OPPORTUNISTIC_STRIPING |
protected static java.lang.String |
PASSWD |
protected static java.lang.String |
PCBC_TIMEOUT_TIMER_NUM_TICKS |
protected static java.lang.String |
PCBC_TIMEOUT_TIMER_TICK_DURATION_MS |
protected static java.lang.String |
READ_ENTRY_TIMEOUT_SEC |
protected static java.lang.String |
READ_REORDER_THRESHOLD_PENDING_REQUESTS |
protected static java.lang.String |
READ_TIMEOUT |
protected static java.lang.String |
RECOVERY_READ_BATCH_SIZE |
protected static java.lang.String |
REGISTRATION_CLIENT_CLASS |
protected static java.lang.String |
REORDER_READ_SEQUENCE_ENABLED |
protected static java.lang.String |
SPECULATIVE_READ_LAC_TIMEOUT_BACKOFF_MULTIPLIER |
protected static java.lang.String |
SPECULATIVE_READ_TIMEOUT |
protected static java.lang.String |
SPECULATIVE_READ_TIMEOUT_BACKOFF_MULTIPLIER |
protected static java.lang.String |
START_TLS_TIMEOUT_SECS |
protected static java.lang.String |
STICKY_READS_ENABLED |
protected static java.lang.String |
TASK_EXECUTION_WARN_TIME_MICROS |
protected static java.lang.String |
THROTTLE |
protected static java.lang.String |
TIMEOUT_MONITOR_INTERVAL_SEC |
protected static java.lang.String |
TIMEOUT_TASK_INTERVAL_MILLIS |
protected static java.lang.String |
TIMEOUT_TIMER_NUM_TICKS |
protected static java.lang.String |
TIMEOUT_TIMER_TICK_DURATION_MS |
protected static java.lang.String |
TLS_HOSTNAME_VERIFICATION_ENABLED |
protected static java.lang.String |
USE_V2_WIRE_PROTOCOL |
protected static java.lang.String |
WAIT_TIMEOUT_ON_BACKPRESSURE |
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, 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_SERVERS, ZK_TIMEOUT| Constructor and Description |
|---|
ClientConfiguration()
Construct a default client-side configuration.
|
ClientConfiguration(AbstractConfiguration conf)
Construct a client-side configuration using a base configuration.
|
| Modifier and Type | Method and Description |
|---|---|
ClientConfiguration |
enableBookieHealthCheck()
Enables the bookie health check.
|
int |
getAddEntryQuorumTimeout()
Get the timeout for top-level add request.
|
int |
getAddEntryTimeout()
Get the timeout for add request.
|
long |
getBookieErrorThresholdPerInterval()
Get the error threshold for a bookie to be quarantined.
|
int |
getBookieFailureHistoryExpirationMSec()
Get the bookie failure tracking expiration timeout.
|
int |
getBookieHealthCheckIntervalSeconds()
Get the bookie health check interval in seconds.
|
int |
getBookieInfoTimeout()
Return the timeout value for getBookieInfo request.
|
int |
getBookieMaxWeightMultipleForWeightBasedPlacement()
Returns the max multiple to use for nodes with very high weight.
|
double |
getBookieQuarantineRatio()
Get the bookie quarantine ratio.
|
int |
getBookieQuarantineTimeSeconds()
Get the time for which a bookie will be quarantined.
|
BookKeeper.DigestType |
getBookieRecoveryDigestType()
Get digest type used in bookkeeper admin.
|
byte[] |
getBookieRecoveryPasswd()
Get passwd used in bookkeeper admin.
|
long |
getClientConnectBookieUnavailableLogThrottlingMs()
Get the log frequency when a bookie is unavailable, in milliseconds.
|
int |
getClientConnectTimeoutMillis()
Get client netty connect timeout in millis.
|
int |
getClientReceiveBufferSize()
Get client netty channel receive buffer size.
|
java.lang.String |
getClientRole()
Get the role of the client.
|
int |
getClientSendBufferSize()
Get client netty channel send buffer size.
|
boolean |
getClientSockKeepalive()
get socket keepalive.
|
boolean |
getClientTcpNoDelay()
Is tcp connection no delay.
|
int |
getClientWriteBufferHighWaterMark()
Get client netty channel write buffer high water mark.
|
int |
getClientWriteBufferLowWaterMark()
Get client netty channel write buffer low water mark.
|
boolean |
getDelayEnsembleChange()
Whether to delay ensemble change or not?
|
java.lang.String |
getDisableEnsembleChangeFeatureName()
Get the name of the dynamic feature that disables ensemble change.
|
boolean |
getDiskWeightBasedPlacementEnabled()
Return whether disk weight based placement policy is enabled.
|
boolean |
getEnableBookieAddressTracking()
Whether to enable bookie address changes tracking.
|
boolean |
getEnableBookieFailureTracking()
Whether to enable bookie failure tracking.
|
boolean |
getEnableDigestTypeAutodetection()
Get autodetection of digest type.
|
boolean |
getEnableParallelRecoveryRead()
Whether to enable parallel reading in recovery read.
|
boolean |
getEnableTaskExecutionStats()
Whether to enable recording task execution stats.
|
java.lang.Class<? extends EnsemblePlacementPolicy> |
getEnsemblePlacementPolicy()
Get Ensemble Placement Policy Class.
|
boolean |
getEnsemblePlacementPolicySlowBookies()
Whether to order slow bookies in placement policy.
|
int |
getExplictLacInterval()
Get the configured interval between explicit LACs to bookies.
|
int |
getFirstSpeculativeReadLACTimeout()
Get the period of time after which the first speculative read last add confirmed and entry
should be triggered.
|
int |
getFirstSpeculativeReadTimeout()
Get the first speculative read timeout.
|
int |
getGetBookieInfoIntervalSeconds()
Get the time interval between successive calls for bookie get info.
|
int |
getGetBookieInfoRetryIntervalSeconds()
Get the time interval between retries on unsuccessful bookie info request.
|
boolean |
getHostnameVerificationEnabled()
Whether hostname verification enabled?
|
int |
getMaxAllowedEnsembleChanges()
Get the max allowed ensemble change number.
|
int |
getMaxSpeculativeReadLACTimeout()
Get the maximum interval between successive speculative read last add confirmed and entry
requests.
|
int |
getMaxSpeculativeReadTimeout()
Get the max speculative read timeout.
|
int |
getNetworkTopologyStabilizePeriodSeconds()
Get the network topology stabilize period in seconds.
|
int |
getNumChannelsPerBookie()
Get num channels per bookie.
|
int |
getNumIOThreads()
Get the number of IO threads.
|
int |
getNumWorkerThreads()
Get the number of worker threads.
|
boolean |
getOpportunisticStriping()
Whether to allow opportunistic striping.
|
int |
getPCBCTimeoutTimerNumTicks()
Deprecated.
|
long |
getPCBCTimeoutTimerTickDurationMs()
Deprecated.
|
int |
getReadEntryTimeout()
Get the timeout for read entry.
|
int |
getReadTimeout()
Deprecated.
use
getReadEntryTimeout() or getAddEntryTimeout() instead |
int |
getRecoveryReadBatchSize()
Get Recovery Read Batch Size.
|
java.lang.Class<? extends org.apache.bookkeeper.discover.RegistrationClient> |
getRegistrationClientClass()
Deprecated.
since 4.7.0
|
int |
getReorderThresholdPendingRequests()
Get the threshold for the number of pending requests beyond which to reorder
reads.
|
float |
getSpeculativeReadLACTimeoutBackoffMultiplier()
Multipler to use when determining time between successive speculative read LAC requests.
|
int |
getSpeculativeReadTimeout()
Get the period of time after which a speculative entry read should be triggered.
|
float |
getSpeculativeReadTimeoutBackoffMultiplier()
Multipler to use when determining time between successive speculative read requests.
|
int |
getStartTLSTimeout()
Return the timeout value for startTLS request.
|
boolean |
getStoreSystemtimeAsLedgerCreationTime()
Return the flag that indicates whether client is using system time as the ledger creation time when
creating ledgers.
|
long |
getTaskExecutionWarnTimeMicros()
Get task execution duration which triggers a warning.
|
protected ClientConfiguration |
getThis()
Trickery to allow inheritance with fluent style.
|
int |
getThrottleValue()
Get throttle value.
|
long |
getTimeoutMonitorIntervalSec()
Get the interval between successive executions of the operation timeout monitor.
|
long |
getTimeoutTaskIntervalMillis()
Deprecated.
|
int |
getTimeoutTimerNumTicks()
Get number of ticks that used for timeout timer.
|
long |
getTimeoutTimerTickDurationMs()
Get the tick duration in milliseconds that used for timeout timer.
|
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.
|
boolean |
getUseV2WireProtocol()
Use older Bookkeeper wire protocol (no protobuf).
|
long |
getWaitTimeoutOnBackpressureMillis()
Timeout controlling wait on request send in case of unresponsive bookie(s)
(i.e.
|
boolean |
isBookieHealthCheckEnabled()
Check if bookie health check is enabled.
|
boolean |
isNettyUsePooledBuffers()
Deprecated.
|
boolean |
isReorderReadSequenceEnabled()
If reorder read sequence enabled or not.
|
boolean |
isStickyReadsEnabled()
If read operation should be sticky to a single bookie or not.
|
ClientConfiguration |
setAddEntryQuorumTimeout(int timeout)
Set timeout for top-level add entry request.
|
ClientConfiguration |
setAddEntryTimeout(int timeout)
Set timeout for add entry request.
|
ClientConfiguration |
setBookieErrorThresholdPerInterval(long thresholdPerInterval)
Set the error threshold per interval (
getBookieHealthCheckIntervalSeconds()) for a bookie before it is
quarantined. |
ClientConfiguration |
setBookieFailureHistoryExpirationMSec(int expirationMSec)
Set the bookie failure tracking expiration timeout.
|
ClientConfiguration |
setBookieHealthCheckInterval(int interval,
java.util.concurrent.TimeUnit unit)
Set the bookie health check interval.
|
ClientConfiguration |
setBookieMaxWeightMultipleForWeightBasedPlacement(int multiple)
Set the max multiple to use for nodes with very high weight.
|
ClientConfiguration |
setBookieQuarantineRatio(double ratio)
set the bookie quarantine ratio.
|
ClientConfiguration |
setBookieQuarantineTime(int quarantineTime,
java.util.concurrent.TimeUnit unit)
Set the time for which a bookie will be quarantined.
|
ClientConfiguration |
setBookieRecoveryDigestType(BookKeeper.DigestType digestType)
Set digest type used in bookkeeper admin.
|
ClientConfiguration |
setBookieRecoveryPasswd(byte[] passwd)
Set passwd used in bookkeeper admin.
|
ClientConfiguration |
setClientConnectBookieUnavailableLogThrottling(int throttleValue,
java.util.concurrent.TimeUnit unit)
Set the log frequency when a bookie is unavailable, in order to limit log filesize.
|
ClientConfiguration |
setClientConnectTimeoutMillis(int connectTimeoutMillis)
Set client netty connect timeout in millis.
|
ClientConfiguration |
setClientReceiveBufferSize(int bufferSize)
Set client netty channel receive buffer size.
|
ClientConfiguration |
setClientRole(java.lang.String role)
Set the client role.
|
ClientConfiguration |
setClientSendBufferSize(int bufferSize)
Set client netty channel send buffer size.
|
ClientConfiguration |
setClientSockKeepalive(boolean keepalive)
Set socket keepalive setting.
|
ClientConfiguration |
setClientTcpNoDelay(boolean noDelay)
Set socket nodelay setting.
|
ClientConfiguration |
setClientWriteBufferHighWaterMark(int waterMark)
Set client netty channel write buffer high water mark.
|
ClientConfiguration |
setClientWriteBufferLowWaterMark(int waterMark)
Set client netty channel write buffer low water mark.
|
ClientConfiguration |
setDelayEnsembleChange(boolean enabled)
Enable/Disable delaying ensemble change.
|
ClientConfiguration |
setDisableEnsembleChangeFeatureName(java.lang.String disableEnsembleChangeFeatureName)
Set the name of the dynamic feature that disables ensemble change.
|
ClientConfiguration |
setDiskWeightBasedPlacementEnabled(boolean isEnabled)
Set whether or not disk weight based placement is enabled.
|
ClientConfiguration |
setEnableBookieAddressTracking(boolean value)
Enable/Disable bookie address changes tracking.
|
ClientConfiguration |
setEnableBookieFailureTracking(boolean enabled)
Enable/Disable bookie failure tracking.
|
ClientConfiguration |
setEnableDigestTypeAutodetection(boolean enable)
Enable autodetection of digest type.
|
ClientConfiguration |
setEnableParallelRecoveryRead(boolean enabled)
Enable/Disable parallel reading in recovery read.
|
ClientConfiguration |
setEnableTaskExecutionStats(boolean enabled)
Enable/Disable recording task execution stats.
|
ClientConfiguration |
setEnsemblePlacementPolicy(java.lang.Class<? extends EnsemblePlacementPolicy> policyClass)
Set Ensemble Placement Policy Class.
|
ClientConfiguration |
setEnsemblePlacementPolicySlowBookies(boolean enabled)
Enable/Disable ordering slow bookies in placement policy.
|
ClientConfiguration |
setExplictLacInterval(int interval)
Set the interval to check the need for sending an explicit LAC.
|
ClientConfiguration |
setFirstSpeculativeReadLACTimeout(int timeout)
Set the period of time after which the first speculative read last add confirmed and entry
should be triggered.
|
ClientConfiguration |
setFirstSpeculativeReadTimeout(int timeout)
Set the first speculative read timeout.
|
ClientConfiguration |
setGetBookieInfoIntervalSeconds(int pollInterval,
java.util.concurrent.TimeUnit unit)
Set the time interval between successive polls for bookie get info.
|
ClientConfiguration |
setGetBookieInfoRetryIntervalSeconds(int interval,
java.util.concurrent.TimeUnit unit)
Set the time interval between retries on unsuccessful GetInfo requests.
|
ClientConfiguration |
setGetBookieInfoTimeout(int timeoutSecs)
Set the timeout value in secs for the GET_BOOKIE_INFO request.
|
ClientConfiguration |
setHostnameVerificationEnabled(boolean enabled)
Enable/Disable hostname verification for tls connection.
|
ClientConfiguration |
setMaxAllowedEnsembleChanges(int num)
Set the max allowed ensemble change number.
|
ClientConfiguration |
setMaxSpeculativeReadLACTimeout(int timeout)
Set the maximum interval between successive speculative read last add confirmed and entry
requests.
|
ClientConfiguration |
setMaxSpeculativeReadTimeout(int timeout)
Set the max speculative read timeout.
|
ClientConfiguration |
setNettyMaxFrameSizeBytes(int maxSize)
Set the max number of bytes a single message can be that is read by the bookie.
|
ClientConfiguration |
setNettyUsePooledBuffers(boolean enabled)
Deprecated.
|
ClientConfiguration |
setNetworkTopologyStabilizePeriodSeconds(int seconds)
Set the network topology stabilize period in seconds.
|
ClientConfiguration |
setNumChannelsPerBookie(int numChannelsPerBookie)
Set num channels per bookie.
|
ClientConfiguration |
setNumIOThreads(int numThreads)
Set the number of IO threads.
|
ClientConfiguration |
setNumWorkerThreads(int numThreads)
Set the number of worker threads.
|
ClientConfiguration |
setOpportunisticStriping(boolean enabled)
Enable/Disable opportunistic striping.
|
ClientConfiguration |
setPCBCTimeoutTimerNumTicks(int numTicks)
Deprecated.
|
ClientConfiguration |
setPCBCTimeoutTimerTickDurationMs(long tickDuration)
Deprecated.
|
ClientConfiguration |
setReadEntryTimeout(int timeout)
Set the timeout for read entry request.
|
ClientConfiguration |
setReadTimeout(int timeout)
Deprecated.
use
setReadEntryTimeout(int) or setAddEntryTimeout(int) instead |
ClientConfiguration |
setRecoveryReadBatchSize(int batchSize)
Set Recovery Read Batch Size.
|
ClientConfiguration |
setRegistrationClientClass(java.lang.Class<? extends org.apache.bookkeeper.discover.RegistrationClient> regClientClass)
Deprecated.
since 4.7.0
|
ClientConfiguration |
setReorderReadSequenceEnabled(boolean enabled)
Enable/disable reordering read sequence on reading entries.
|
ClientConfiguration |
setReorderThresholdPendingRequests(int threshold)
Set the threshold for the number of pending requests beyond which to reorder
reads.
|
ClientConfiguration |
setSpeculativeReadLACTimeoutBackoffMultiplier(float speculativeReadLACTimeoutBackoffMultiplier)
Set the multipler to use when determining time between successive speculative read LAC requests.
|
ClientConfiguration |
setSpeculativeReadTimeout(int timeout)
Set the speculative read timeout.
|
ClientConfiguration |
setSpeculativeReadTimeoutBackoffMultiplier(float speculativeReadTimeoutBackoffMultiplier)
Set the multipler to use when determining time between successive speculative read requests.
|
ClientConfiguration |
setStartTLSTimeout(int timeoutSecs)
Set the timeout value in secs for the START_TLS request.
|
ClientConfiguration |
setStickyReadsEnabled(boolean enabled)
Enable/disable having read operations for a ledger to be sticky to
a single bookie.
|
ClientConfiguration |
setStoreSystemtimeAsLedgerCreationTime(boolean enabled)
Enable the client to use system time as the ledger creation time.
|
ClientConfiguration |
setTaskExecutionWarnTimeMicros(long warnTime)
Set task execution duration which triggers a warning.
|
ClientConfiguration |
setThrottleValue(int throttle)
Set throttle value.
|
ClientConfiguration |
setTimeoutMonitorIntervalSec(long timeoutInterval)
Set the interval between successive executions of the operation timeout monitor.
|
ClientConfiguration |
setTimeoutTaskIntervalMillis(long timeoutMillis)
Deprecated.
|
ClientConfiguration |
setTimeoutTimerNumTicks(int numTicks)
Set number of ticks that used for timeout timer.
|
ClientConfiguration |
setTimeoutTimerTickDurationMs(long tickDuration)
Set the tick duration in milliseconds that used for timeout timer.
|
ClientConfiguration |
setTLSCertificatePath(java.lang.String arg)
Set the path to file containing TLS Certificate.
|
ClientConfiguration |
setTLSKeyStore(java.lang.String arg)
Set the keystore path for the client.
|
ClientConfiguration |
setTLSKeyStorePasswordPath(java.lang.String arg)
Set the path to file containing keystore password, if the client keystore is password protected.
|
ClientConfiguration |
setTLSKeyStoreType(java.lang.String arg)
Set the keystore type for client.
|
ClientConfiguration |
setTLSTrustStore(java.lang.String arg)
Set the truststore path for the client.
|
ClientConfiguration |
setTLSTrustStorePasswordPath(java.lang.String arg)
Set the path to file containing truststore password, if the client truststore is password protected.
|
ClientConfiguration |
setTLSTrustStoreType(java.lang.String arg)
Set the truststore type for client.
|
ClientConfiguration |
setUseV2WireProtocol(boolean useV2WireProtocol)
Set whether or not to use older Bookkeeper wire protocol (no protobuf).
|
ClientConfiguration |
setWaitTimeoutOnBackpressureMillis(long value)
Timeout controlling wait on request send in case of unresponsive bookie(s)
(i.e.
|
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, getRereplicationEntryBatchSize, getShadedLedgerManagerFactoryClassPrefix, getStoreSystemTimeAsLedgerUnderreplicatedMarkTime, getTLSCertFilesRefreshDurationSeconds, getTLSClientAuthentication, getTLSEnabledCipherSuites, getTLSEnabledProtocols, getTLSProvider, getTLSProviderFactoryClass, getZkAvailableBookiesPath, getZkLedgersRootPath, getZkRequestRateLimit, 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, setRereplicationEntryBatchSize, setShadedLedgerManagerFactoryClassPrefix, setStoreSystemTimeAsLedgerUnderreplicatedMarkTime, setTLSCertFilesRefreshDurationSeconds, setTLSClientAuthentication, setTLSEnabledCipherSuites, setTLSEnabledProtocols, setTLSProvider, setTLSProviderFactoryClass, setZkEnableSecurity, setZkLedgersRootPath, setZkRequestRateLimit, 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 THROTTLE
protected static final java.lang.String DIGEST_TYPE
protected static final java.lang.String ENABLE_DIGEST_TYPE_AUTODETECTION
protected static final java.lang.String PASSWD
@Deprecated protected static final java.lang.String CLIENT_TLS_KEYSTORE_TYPE
AbstractConfiguration.TLS_KEYSTORE_TYPE@Deprecated protected static final java.lang.String CLIENT_TLS_KEYSTORE
AbstractConfiguration.TLS_KEYSTORE@Deprecated protected static final java.lang.String CLIENT_TLS_KEYSTORE_PASSWORD_PATH
AbstractConfiguration.TLS_KEYSTORE_PASSWORD_PATH@Deprecated protected static final java.lang.String CLIENT_TLS_TRUSTSTORE_TYPE
AbstractConfiguration.TLS_TRUSTSTORE_TYPE@Deprecated protected static final java.lang.String CLIENT_TLS_TRUSTSTORE
AbstractConfiguration.TLS_TRUSTSTORE@Deprecated protected static final java.lang.String CLIENT_TLS_TRUSTSTORE_PASSWORD_PATH
AbstractConfiguration.TLS_TRUSTSTORE_PASSWORD_PATHprotected static final java.lang.String CLIENT_TCP_NODELAY
protected static final java.lang.String CLIENT_SOCK_KEEPALIVE
protected static final java.lang.String CLIENT_SENDBUFFER_SIZE
protected static final java.lang.String CLIENT_RECEIVEBUFFER_SIZE
protected static final java.lang.String CLIENT_WRITEBUFFER_LOW_WATER_MARK
protected static final java.lang.String CLIENT_WRITEBUFFER_HIGH_WATER_MARK
protected static final java.lang.String CLIENT_CONNECT_TIMEOUT_MILLIS
protected static final java.lang.String NUM_CHANNELS_PER_BOOKIE
protected static final java.lang.String USE_V2_WIRE_PROTOCOL
protected static final java.lang.String NETTY_USE_POOLED_BUFFERS
protected static final java.lang.String READ_TIMEOUT
protected static final java.lang.String SPECULATIVE_READ_TIMEOUT
protected static final java.lang.String FIRST_SPECULATIVE_READ_TIMEOUT
protected static final java.lang.String MAX_SPECULATIVE_READ_TIMEOUT
protected static final java.lang.String SPECULATIVE_READ_TIMEOUT_BACKOFF_MULTIPLIER
protected static final java.lang.String FIRST_SPECULATIVE_READ_LAC_TIMEOUT
protected static final java.lang.String MAX_SPECULATIVE_READ_LAC_TIMEOUT
protected static final java.lang.String SPECULATIVE_READ_LAC_TIMEOUT_BACKOFF_MULTIPLIER
protected static final java.lang.String ENABLE_PARALLEL_RECOVERY_READ
protected static final java.lang.String RECOVERY_READ_BATCH_SIZE
protected static final java.lang.String REORDER_READ_SEQUENCE_ENABLED
protected static final java.lang.String STICKY_READS_ENABLED
protected static final java.lang.String OPPORTUNISTIC_STRIPING
protected static final java.lang.String DELAY_ENSEMBLE_CHANGE
protected static final java.lang.String MAX_ALLOWED_ENSEMBLE_CHANGES
protected static final java.lang.String ADD_ENTRY_TIMEOUT_SEC
protected static final java.lang.String ADD_ENTRY_QUORUM_TIMEOUT_SEC
protected static final java.lang.String READ_ENTRY_TIMEOUT_SEC
protected static final java.lang.String TIMEOUT_MONITOR_INTERVAL_SEC
protected static final java.lang.String TIMEOUT_TASK_INTERVAL_MILLIS
protected static final java.lang.String EXPLICIT_LAC_INTERVAL
protected static final java.lang.String PCBC_TIMEOUT_TIMER_TICK_DURATION_MS
protected static final java.lang.String PCBC_TIMEOUT_TIMER_NUM_TICKS
protected static final java.lang.String TIMEOUT_TIMER_TICK_DURATION_MS
protected static final java.lang.String TIMEOUT_TIMER_NUM_TICKS
protected static final java.lang.String WAIT_TIMEOUT_ON_BACKPRESSURE
protected static final java.lang.String BOOKIE_HEALTH_CHECK_ENABLED
protected static final java.lang.String BOOKIE_HEALTH_CHECK_INTERVAL_SECONDS
protected static final java.lang.String BOOKIE_ERROR_THRESHOLD_PER_INTERVAL
protected static final java.lang.String BOOKIE_QUARANTINE_TIME_SECONDS
protected static final java.lang.String BOOKIE_QUARANTINE_RATIO
protected static final java.lang.String DISK_WEIGHT_BASED_PLACEMENT_ENABLED
protected static final java.lang.String GET_BOOKIE_INFO_INTERVAL_SECONDS
protected static final java.lang.String GET_BOOKIE_INFO_RETRY_INTERVAL_SECONDS
protected static final java.lang.String BOOKIE_MAX_MULTIPLE_FOR_WEIGHTED_PLACEMENT
protected static final java.lang.String GET_BOOKIE_INFO_TIMEOUT_SECS
protected static final java.lang.String START_TLS_TIMEOUT_SECS
protected static final java.lang.String TLS_HOSTNAME_VERIFICATION_ENABLED
protected static final java.lang.String NUM_WORKER_THREADS
protected static final java.lang.String NUM_IO_THREADS
public static final java.lang.String ENSEMBLE_PLACEMENT_POLICY
protected static final java.lang.String NETWORK_TOPOLOGY_STABILIZE_PERIOD_SECONDS
protected static final java.lang.String READ_REORDER_THRESHOLD_PENDING_REQUESTS
protected static final java.lang.String ENSEMBLE_PLACEMENT_POLICY_ORDER_SLOW_BOOKIES
protected static final java.lang.String ENABLE_TASK_EXECUTION_STATS
protected static final java.lang.String TASK_EXECUTION_WARN_TIME_MICROS
protected static final java.lang.String ENABLE_BOOKIE_FAILURE_TRACKING
protected static final java.lang.String BOOKIE_FAILURE_HISTORY_EXPIRATION_MS
protected static final java.lang.String FOLLOW_BOOKIE_ADDRESS_TRACKING
protected static final java.lang.String DISABLE_ENSEMBLE_CHANGE_FEATURE_NAME
protected static final java.lang.String CLIENT_ROLE
public static final java.lang.String CLIENT_ROLE_STANDARD
public static final java.lang.String CLIENT_ROLE_SYSTEM
Auditor.protected static final java.lang.String CLIENT_AUTH_PROVIDER_FACTORY_CLASS
protected static final java.lang.String REGISTRATION_CLIENT_CLASS
protected static final java.lang.String CLIENT_CONNECT_BOOKIE_UNAVAILABLE_LOG_THROTTLING
public ClientConfiguration()
public ClientConfiguration(AbstractConfiguration conf)
conf - Base configurationpublic int getThrottleValue()
setThrottleValue(int)public ClientConfiguration setThrottleValue(int throttle)
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.
throttle - Throttle Valuepublic boolean getEnableDigestTypeAutodetection()
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.
public ClientConfiguration setEnableDigestTypeAutodetection(boolean enable)
public BookKeeper.DigestType getBookieRecoveryDigestType()
setBookieRecoveryDigestType(org.apache.bookkeeper.client.BookKeeper.DigestType)public ClientConfiguration setBookieRecoveryDigestType(BookKeeper.DigestType digestType)
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.
digestType - Digest Typepublic byte[] getBookieRecoveryPasswd()
setBookieRecoveryPasswd(byte[])public ClientConfiguration setBookieRecoveryPasswd(byte[] passwd)
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.
passwd - Passwordpublic boolean getClientTcpNoDelay()
setClientTcpNoDelay(boolean)public ClientConfiguration setClientTcpNoDelay(boolean noDelay)
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.
noDelay - NoDelay settingpublic boolean getClientSockKeepalive()
public ClientConfiguration setClientSockKeepalive(boolean keepalive)
This setting is used to send keep-alive messages on connection-oriented sockets.
keepalive - KeepAlive settingpublic int getClientSendBufferSize()
public ClientConfiguration setClientSendBufferSize(int bufferSize)
bufferSize - client netty channel send buffer size.public int getClientReceiveBufferSize()
public ClientConfiguration setClientReceiveBufferSize(int bufferSize)
bufferSize - netty channel receive buffer size.public int getClientWriteBufferLowWaterMark()
public ClientConfiguration setClientWriteBufferLowWaterMark(int waterMark)
waterMark - netty channel write buffer low water mark.public int getClientWriteBufferHighWaterMark()
public ClientConfiguration setClientWriteBufferHighWaterMark(int waterMark)
waterMark - netty channel write buffer high water mark.public long getTimeoutTimerTickDurationMs()
public ClientConfiguration setTimeoutTimerTickDurationMs(long tickDuration)
tickDuration - tick duration in milliseconds.public int getTimeoutTimerNumTicks()
public ClientConfiguration setTimeoutTimerNumTicks(int numTicks)
numTicks - number of ticks that used for timeout timer.public int getClientConnectTimeoutMillis()
public ClientConfiguration setClientConnectTimeoutMillis(int connectTimeoutMillis)
connectTimeoutMillis - client netty connect timeout in millis.public int getNumChannelsPerBookie()
public ClientConfiguration setNumChannelsPerBookie(int numChannelsPerBookie)
numChannelsPerBookie - num channels per bookie.public boolean getUseV2WireProtocol()
public ClientConfiguration setUseV2WireProtocol(boolean useV2WireProtocol)
useV2WireProtocol - whether or not to use older Bookkeeper wire protocol (no protobuf)@Deprecated public int getReadTimeout()
getReadEntryTimeout() or getAddEntryTimeout() insteadThe default is 5 seconds.
@Deprecated public ClientConfiguration setReadTimeout(int timeout)
setReadEntryTimeout(int) or setAddEntryTimeout(int) insteadtimeout - The new read timeout in secondsgetReadTimeout()public int getAddEntryTimeout()
The default value is 5 second for backwards compatibility.
public ClientConfiguration setAddEntryTimeout(int timeout)
timeout - The new add entry timeout in seconds.getAddEntryTimeout()public int getAddEntryQuorumTimeout()
public ClientConfiguration setAddEntryQuorumTimeout(int timeout)
timeout - The new add entry ack quorum timeout in seconds.getAddEntryQuorumTimeout()public int getReadEntryTimeout()
getReadTimeout().public ClientConfiguration setReadEntryTimeout(int timeout)
timeout - The new read entry timeout in seconds.getReadEntryTimeout()public long getTimeoutMonitorIntervalSec()
setTimeoutMonitorIntervalSec(long)public ClientConfiguration setTimeoutMonitorIntervalSec(long timeoutInterval)
This timeout should be set to a value which is a fraction of the values of
getAddEntryQuorumTimeout(), getAddEntryTimeout() and getReadEntryTimeout(),
so that these timeouts run in a timely fashion.
timeoutInterval - The timeout monitor interval, in seconds@Deprecated public long getTimeoutTaskIntervalMillis()
We do it more aggressive to not accumulate pending requests due to slow responses.
@Deprecated public ClientConfiguration setTimeoutTaskIntervalMillis(long timeoutMillis)
public int getExplictLacInterval()
public ClientConfiguration setExplictLacInterval(int interval)
interval - Number of milli seconds between checking the need for sending an explict LAC.@Deprecated public long getPCBCTimeoutTimerTickDurationMs()
@Deprecated public ClientConfiguration setPCBCTimeoutTimerTickDurationMs(long tickDuration)
tickDuration - tick duration in milliseconds.getPCBCTimeoutTimerTickDurationMs()@Deprecated public int getPCBCTimeoutTimerNumTicks()
@Deprecated public ClientConfiguration setPCBCTimeoutTimerNumTicks(int numTicks)
numTicks - number of ticks that used for timeout timer.getPCBCTimeoutTimerNumTicks()public long getWaitTimeoutOnBackpressureMillis()
public ClientConfiguration setWaitTimeoutOnBackpressureMillis(long value)
value - negative value disables the feature
0 to allow request to fail immediately
Default is -1 (disabled)public int getNumWorkerThreads()
public ClientConfiguration setNumWorkerThreads(int numThreads)
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.
numThreads - number of worker threads used for bookkeepergetNumWorkerThreads()public int getNumIOThreads()
public ClientConfiguration setNumIOThreads(int numThreads)
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.
numThreads - number of IO threads used for bookkeepergetNumIOThreads()public int getSpeculativeReadTimeout()
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.
LedgerHandle.asyncReadEntries(long, long, org.apache.bookkeeper.client.AsyncCallback.ReadCallback, java.lang.Object)public ClientConfiguration setSpeculativeReadTimeout(int timeout)
The default is 2000 milliseconds. A value of 0 will disable speculative reads completely.
timeout - the timeout value, in millisecondsgetSpeculativeReadTimeout()public int getFirstSpeculativeReadTimeout()
public ClientConfiguration setFirstSpeculativeReadTimeout(int timeout)
timeout - first speculative read timeout.public float getSpeculativeReadTimeoutBackoffMultiplier()
public ClientConfiguration setSpeculativeReadTimeoutBackoffMultiplier(float speculativeReadTimeoutBackoffMultiplier)
speculativeReadTimeoutBackoffMultiplier - multipler to use when determining time between successive speculative read requests.public float getSpeculativeReadLACTimeoutBackoffMultiplier()
public ClientConfiguration setSpeculativeReadLACTimeoutBackoffMultiplier(float speculativeReadLACTimeoutBackoffMultiplier)
speculativeReadLACTimeoutBackoffMultiplier - multipler to use when determining time between successive speculative read LAC requests.public int getMaxSpeculativeReadTimeout()
public ClientConfiguration setMaxSpeculativeReadTimeout(int timeout)
timeout - max speculative read timeout.public int getFirstSpeculativeReadLACTimeout()
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.
public int getMaxSpeculativeReadLACTimeout()
public ClientConfiguration setFirstSpeculativeReadLACTimeout(int timeout)
The default is 1500 milliseconds. A value of 0 will disable speculative reads completely.
timeout - the timeout value, in millisecondsgetSpeculativeReadTimeout()public ClientConfiguration setMaxSpeculativeReadLACTimeout(int timeout)
timeout - the timeout value, in millisecondspublic boolean getEnableParallelRecoveryRead()
public ClientConfiguration setEnableParallelRecoveryRead(boolean enabled)
enabled - flag to enable/disable parallel reading in recovery read.public int getRecoveryReadBatchSize()
public ClientConfiguration setRecoveryReadBatchSize(int batchSize)
batchSize - recovery read batch size.public boolean isReorderReadSequenceEnabled()
public ClientConfiguration setReorderReadSequenceEnabled(boolean enabled)
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 use
EnsemblePlacementPolicy#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.
enabled - the flag to enable/disable reorder read sequence.public boolean isStickyReadsEnabled()
public ClientConfiguration setStickyReadsEnabled(boolean enabled)
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.
enabled - the flag to enable/disable sticky reads.public java.lang.Class<? extends EnsemblePlacementPolicy> getEnsemblePlacementPolicy() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationExceptionpublic ClientConfiguration setEnsemblePlacementPolicy(java.lang.Class<? extends EnsemblePlacementPolicy> policyClass)
policyClass - Ensemble Placement Policy Class.public int getReorderThresholdPendingRequests()
public ClientConfiguration setReorderThresholdPendingRequests(int threshold)
threshold - The threshold for the number of pending requests beyond which to
reorder reads.public int getNetworkTopologyStabilizePeriodSeconds()
public ClientConfiguration setNetworkTopologyStabilizePeriodSeconds(int seconds)
seconds - stabilize period in secondsgetNetworkTopologyStabilizePeriodSeconds()public boolean getEnsemblePlacementPolicySlowBookies()
public ClientConfiguration setEnsemblePlacementPolicySlowBookies(boolean enabled)
enabled - flag to enable/disable ordering slow bookies in placement policy.public boolean getEnableTaskExecutionStats()
public ClientConfiguration setEnableTaskExecutionStats(boolean enabled)
enabled - flag to enable/disable recording task execution stats.public long getTaskExecutionWarnTimeMicros()
public ClientConfiguration setTaskExecutionWarnTimeMicros(long warnTime)
warnTime - time in microseconds which triggers a warning.public boolean isBookieHealthCheckEnabled()
public ClientConfiguration enableBookieHealthCheck()
If the number of read/write errors for a bookie exceeds getBookieErrorThresholdPerInterval() per
interval, that bookie is quarantined for getBookieQuarantineTimeSeconds() 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.
public int getBookieHealthCheckIntervalSeconds()
public ClientConfiguration setBookieHealthCheckInterval(int interval, java.util.concurrent.TimeUnit unit)
Note: Please enableBookieHealthCheck() to use this configuration.
interval - unit - public long getBookieErrorThresholdPerInterval()
public ClientConfiguration setBookieErrorThresholdPerInterval(long thresholdPerInterval)
getBookieHealthCheckIntervalSeconds()) for a bookie before it is
quarantined. Default is 100 errors per minute.
Note: Please enableBookieHealthCheck() to use this configuration.
thresholdPerInterval - public int getBookieQuarantineTimeSeconds()
public ClientConfiguration setBookieQuarantineTime(int quarantineTime, java.util.concurrent.TimeUnit unit)
Note: Please enableBookieHealthCheck() to use this configuration.
quarantineTime - unit - public double getBookieQuarantineRatio()
public ClientConfiguration setBookieQuarantineRatio(double ratio)
ratio - public ClientConfiguration setNettyMaxFrameSizeBytes(int maxSize)
setNettyMaxFrameSizeBytes in class AbstractConfiguration<ClientConfiguration>maxSize - the max size in bytespublic int getGetBookieInfoIntervalSeconds()
public int getGetBookieInfoRetryIntervalSeconds()
public boolean getDiskWeightBasedPlacementEnabled()
public int getBookieMaxWeightMultipleForWeightBasedPlacement()
public int getBookieInfoTimeout()
public int getStartTLSTimeout()
public ClientConfiguration setDiskWeightBasedPlacementEnabled(boolean isEnabled)
isEnabled - - boolean indicating enabled or notpublic ClientConfiguration setGetBookieInfoIntervalSeconds(int pollInterval, java.util.concurrent.TimeUnit unit)
pollInterval - unit - public ClientConfiguration setGetBookieInfoRetryIntervalSeconds(int interval, java.util.concurrent.TimeUnit unit)
interval - unit - public ClientConfiguration setBookieMaxWeightMultipleForWeightBasedPlacement(int multiple)
multiple - public ClientConfiguration setGetBookieInfoTimeout(int timeoutSecs)
timeoutSecs - public ClientConfiguration setStartTLSTimeout(int timeoutSecs)
timeoutSecs - public boolean getHostnameVerificationEnabled()
public ClientConfiguration setHostnameVerificationEnabled(boolean enabled)
enabled - flag to enable/disable tls hostname verification.public ClientConfiguration setClientRole(java.lang.String role)
role - defines how the client will actpublic java.lang.String getClientRole()
public java.lang.String getTLSKeyStoreType()
public ClientConfiguration setTLSKeyStoreType(java.lang.String arg)
public java.lang.String getTLSKeyStore()
public ClientConfiguration setTLSKeyStore(java.lang.String arg)
public java.lang.String getTLSKeyStorePasswordPath()
public ClientConfiguration setTLSKeyStorePasswordPath(java.lang.String arg)
public java.lang.String getTLSTrustStoreType()
public ClientConfiguration setTLSTrustStoreType(java.lang.String arg)
public java.lang.String getTLSTrustStore()
public ClientConfiguration setTLSTrustStore(java.lang.String arg)
public java.lang.String getTLSTrustStorePasswordPath()
public ClientConfiguration setTLSTrustStorePasswordPath(java.lang.String arg)
public java.lang.String getTLSCertificatePath()
public ClientConfiguration setTLSCertificatePath(java.lang.String arg)
public boolean getOpportunisticStriping()
public ClientConfiguration setOpportunisticStriping(boolean enabled)
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.
enabled - flag to enable/disable opportunistic striping.public boolean getDelayEnsembleChange()
public ClientConfiguration setDelayEnsembleChange(boolean enabled)
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.
enabled - flag to enable/disable delaying ensemble change.public boolean getEnableBookieAddressTracking()
public ClientConfiguration setEnableBookieAddressTracking(boolean value)
value - flag to enable/disable bookie address changes trackingpublic boolean getEnableBookieFailureTracking()
public ClientConfiguration setEnableBookieFailureTracking(boolean enabled)
enabled - flag to enable/disable bookie failure trackingpublic int getBookieFailureHistoryExpirationMSec()
public ClientConfiguration setBookieFailureHistoryExpirationMSec(int expirationMSec)
expirationMSec - bookie failure tracking expiration timeout.public java.lang.String getDisableEnsembleChangeFeatureName()
public ClientConfiguration setDisableEnsembleChangeFeatureName(java.lang.String disableEnsembleChangeFeatureName)
disableEnsembleChangeFeatureName - name of the dynamic feature that disables ensemble changepublic int getMaxAllowedEnsembleChanges()
public ClientConfiguration setMaxAllowedEnsembleChanges(int num)
num - value of MaxAllowedEnsembleChanges@Deprecated public boolean isNettyUsePooledBuffers()
BookKeeperBuilder.allocator(io.netty.buffer.ByteBufAllocator)public ClientConfiguration setNettyUsePooledBuffers(boolean enabled)
BookKeeperBuilder.allocator(io.netty.buffer.ByteBufAllocator)enabled - if enabled BookKeeper will use default Pooled Netty Buffer allocatorsetUseV2WireProtocol(boolean),
ReferenceCounted.release(),
LedgerHandle.readEntries(long, long)@Deprecated public ClientConfiguration setRegistrationClientClass(java.lang.Class<? extends org.apache.bookkeeper.discover.RegistrationClient> regClientClass)
regClientClass - ClientClass@Deprecated
public java.lang.Class<? extends org.apache.bookkeeper.discover.RegistrationClient> getRegistrationClientClass()
throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationExceptionpublic ClientConfiguration setStoreSystemtimeAsLedgerCreationTime(boolean enabled)
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.
enabled - flag to enable/disable client using system time as the ledger creation time.public boolean getStoreSystemtimeAsLedgerCreationTime()
public ClientConfiguration setClientConnectBookieUnavailableLogThrottling(int throttleValue, java.util.concurrent.TimeUnit unit)
throttleValue - unit - public long getClientConnectBookieUnavailableLogThrottlingMs()
protected ClientConfiguration getThis()
AbstractConfigurationgetThis in class AbstractConfiguration<ClientConfiguration>Copyright © 2011–2024 The Apache Software Foundation. All rights reserved.