public class ClientConfiguration extends AbstractConfiguration
AVAILABLE_NODE, DEFAULT_NETTY_MAX_FRAME_SIZE, defaultLoader, LEDGER_MANAGER_FACTORY_CLASS, LEDGER_MANAGER_FACTORY_DISABLE_CLASS_CHECK, LEDGER_MANAGER_TYPE, LOG, METASTORE_IMPL_CLASS, METASTORE_MAX_ENTRIES_PER_SCAN, NETTY_MAX_FRAME_SIZE, READ_SYSTEM_PROPERTIES_PROPERTY, REREPLICATION_ENTRY_BATCH_SIZE, TLS_CLIENT_AUTHENTICATION, TLS_ENABLED_CIPHER_SUITES, TLS_ENABLED_PROTOCOLS, TLS_PROVIDER, TLS_PROVIDER_FACTORY_CLASS, ZK_ENABLE_SECURITY, ZK_LEDGERS_ROOT_PATH, ZK_REQUEST_RATE_LIMIT
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
|
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
|
int |
getClientConnectTimeoutMillis()
Get client netty connect timeout in millis.
|
int |
getClientReceiveBufferSize()
Get client netty channel receive buffer size.
|
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?
|
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 |
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.
|
Class<? extends EnsemblePlacementPolicy> |
getEnsemblePlacementPolicy()
Get Ensemble Placement Policy Class.
|
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.
|
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 |
getNumWorkerThreads()
Get the number of worker threads.
|
int |
getPCBCTimeoutTimerNumTicks()
Get number of ticks that used for
org.jboss.netty.util.HashedWheelTimer that used by PCBC to timeout
requests. |
long |
getPCBCTimeoutTimerTickDurationMs()
Get the tick duration in milliseconds that used for the
org.jboss.netty.util.HashedWheelTimer that used by PCBC to timeout
requests. |
int |
getReadEntryTimeout()
Get the timeout for read entry.
|
int |
getReadTimeout()
Deprecated.
use
getReadEntryTimeout() or getAddEntryTimeout() instead |
int |
getRecoveryReadBatchSize()
Get Recovery Read Batch Size.
|
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
|
long |
getTaskExecutionWarnTimeMicros()
Get task execution duration which triggers a warning.
|
int |
getThrottleValue()
Get throttle value
|
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.
|
String |
getTLSKeyStore()
Get the keystore path for the client.
|
String |
getTLSKeyStorePasswordPath()
Get the path to file containing keystore password, if the client keystore is password protected.
|
String |
getTLSKeyStoreType()
Get the keystore type for client.
|
String |
getTLSTrustStore()
Get the truststore path for the client.
|
String |
getTLSTrustStorePasswordPath()
Get the path to file containing truststore password, if the client truststore is password protected.
|
String |
getTLSTrustStoreType()
Get the truststore type for client.
|
boolean |
getUseV2WireProtocol()
Use older Bookkeeper wire protocol (no protobuf)
|
String |
getZkServers()
Get zookeeper servers to connect
|
int |
getZkTimeout()
Get zookeeper timeout
|
boolean |
isBookieHealthCheckEnabled()
Check if bookie health check is enabled.
|
boolean |
isNettyUsePooledBuffers()
Option to use Netty Pooled ByteBufs
|
boolean |
isReorderReadSequenceEnabled()
If reorder read sequence enabled 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,
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 |
setBookieQuarantineTime(int quarantineTime,
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 |
setClientConnectTimeoutMillis(int connectTimeoutMillis)
Set client netty connect timeout in millis.
|
ClientConfiguration |
setClientReceiveBufferSize(int bufferSize)
Set client netty channel receive buffer size.
|
ClientConfiguration |
setClientRole(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(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 |
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(Class<? extends EnsemblePlacementPolicy> policyClass)
Set Ensemble Placement Policy Class.
|
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,
TimeUnit unit)
Set the time interval between successive polls for bookie get info.
|
ClientConfiguration |
setGetBookieInfoRetryIntervalSeconds(int interval,
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 |
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)
Enable/Disable the usage of Pooled Netty buffers.
|
ClientConfiguration |
setNetworkTopologyStabilizePeriodSeconds(int seconds)
Set the network topology stabilize period in seconds.
|
ClientConfiguration |
setNumChannelsPerBookie(int numChannelsPerBookie)
Set num channels per bookie.
|
ClientConfiguration |
setNumWorkerThreads(int numThreads)
Set the number of worker threads.
|
ClientConfiguration |
setPCBCTimeoutTimerNumTicks(int numTicks)
Set number of ticks that used for
org.jboss.netty.util.HashedWheelTimer that used by PCBC to timeout request. |
ClientConfiguration |
setPCBCTimeoutTimerTickDurationMs(long tickDuration)
Set the tick duration in milliseconds that used for
org.jboss.netty.util.HashedWheelTimer that used by PCBC to timeout
requests. |
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 |
setReorderReadSequenceEnabled(boolean enabled)
Enable/disable reordering read sequence on reading entries.
|
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 |
setTaskExecutionWarnTimeMicros(long warnTime)
Set task execution duration which triggers a warning.
|
ClientConfiguration |
setThrottleValue(int throttle)
Set throttle value.
|
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 |
setTLSKeyStore(String arg)
Set the keystore path for the client.
|
ClientConfiguration |
setTLSKeyStorePasswordPath(String arg)
Set the path to file containing keystore password, if the client keystore is password protected.
|
ClientConfiguration |
setTLSKeyStoreType(String arg)
Set the keystore type for client.
|
ClientConfiguration |
setTLSTrustStore(String arg)
Set the truststore path for the client.
|
ClientConfiguration |
setTLSTrustStorePasswordPath(String arg)
Set the path to file containing truststore password, if the client truststore is password protected.
|
ClientConfiguration |
setTLSTrustStoreType(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 |
setZkServers(String zkServers)
Set zookeeper servers to connect
|
ClientConfiguration |
setZkTimeout(int zkTimeout)
Set zookeeper timeout
|
getClientAuthProviderFactoryClass, getFeature, getLedgerManagerFactoryClass, getLedgerManagerType, getMetastoreImplClass, getMetastoreMaxEntriesPerScan, getNettyMaxFrameSizeBytes, getRereplicationEntryBatchSize, getTLSClientAuthentication, getTLSEnabledCipherSuites, getTLSEnabledProtocols, getTLSProvider, getTLSProviderFactoryClass, getZkAvailableBookiesPath, getZkLedgersRootPath, getZkRequestRateLimit, isZkEnableSecurity, loadConf, loadConf, setClientAuthProviderFactoryClass, setFeature, setLedgerManagerFactoryClass, setLedgerManagerFactoryClassName, setLedgerManagerType, setMetastoreImplClass, setMetastoreMaxEntriesPerScan, setRereplicationEntryBatchSize, setTLSClientAuthentication, setTLSEnabledCipherSuites, setTLSEnabledProtocols, setTLSProvider, setTLSProviderFactoryClass, setZkEnableSecurity, setZkLedgersRootPath, setZkRequestRateLimit
addConfiguration, addPropertyDirect, clear, clearPropertyDirect, clone, containsKey, getConfiguration, getInMemoryConfiguration, getKeys, getKeys, getList, getNumberOfConfigurations, getProperty, getSource, getStringArray, isEmpty, removeConfiguration, setDelimiterParsingDisabled, setListDelimiter
addErrorLogListener, 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, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setLogger, setProperty, setThrowExceptionOnMissing, subset
addConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents
protected static final String ZK_TIMEOUT
protected static final String ZK_SERVERS
protected static final String THROTTLE
protected static final String DIGEST_TYPE
protected static final String ENABLE_DIGEST_TYPE_AUTODETECTION
protected static final String PASSWD
protected static final String CLIENT_TCP_NODELAY
protected static final String CLIENT_SOCK_KEEPALIVE
protected static final String CLIENT_SENDBUFFER_SIZE
protected static final String CLIENT_RECEIVEBUFFER_SIZE
protected static final String CLIENT_WRITEBUFFER_LOW_WATER_MARK
protected static final String CLIENT_WRITEBUFFER_HIGH_WATER_MARK
protected static final String CLIENT_CONNECT_TIMEOUT_MILLIS
protected static final String NUM_CHANNELS_PER_BOOKIE
protected static final String USE_V2_WIRE_PROTOCOL
protected static final String NETTY_USE_POOLED_BUFFERS
protected static final String READ_TIMEOUT
protected static final String SPECULATIVE_READ_TIMEOUT
protected static final String FIRST_SPECULATIVE_READ_TIMEOUT
protected static final String MAX_SPECULATIVE_READ_TIMEOUT
protected static final String SPECULATIVE_READ_TIMEOUT_BACKOFF_MULTIPLIER
protected static final String FIRST_SPECULATIVE_READ_LAC_TIMEOUT
protected static final String MAX_SPECULATIVE_READ_LAC_TIMEOUT
protected static final String SPECULATIVE_READ_LAC_TIMEOUT_BACKOFF_MULTIPLIER
protected static final String ENABLE_PARALLEL_RECOVERY_READ
protected static final String RECOVERY_READ_BATCH_SIZE
protected static final String REORDER_READ_SEQUENCE_ENABLED
protected static final String DELAY_ENSEMBLE_CHANGE
protected static final String ADD_ENTRY_TIMEOUT_SEC
protected static final String ADD_ENTRY_QUORUM_TIMEOUT_SEC
protected static final String READ_ENTRY_TIMEOUT_SEC
protected static final String TIMEOUT_TASK_INTERVAL_MILLIS
protected static final String EXPLICIT_LAC_INTERVAL
protected static final String PCBC_TIMEOUT_TIMER_TICK_DURATION_MS
protected static final String PCBC_TIMEOUT_TIMER_NUM_TICKS
protected static final String TIMEOUT_TIMER_TICK_DURATION_MS
protected static final String TIMEOUT_TIMER_NUM_TICKS
protected static final String BOOKIE_HEALTH_CHECK_ENABLED
protected static final String BOOKIE_HEALTH_CHECK_INTERVAL_SECONDS
protected static final String BOOKIE_ERROR_THRESHOLD_PER_INTERVAL
protected static final String BOOKIE_QUARANTINE_TIME_SECONDS
protected static final String DISK_WEIGHT_BASED_PLACEMENT_ENABLED
protected static final String GET_BOOKIE_INFO_INTERVAL_SECONDS
protected static final String GET_BOOKIE_INFO_RETRY_INTERVAL_SECONDS
protected static final String BOOKIE_MAX_MULTIPLE_FOR_WEIGHTED_PLACEMENT
protected static final String GET_BOOKIE_INFO_TIMEOUT_SECS
protected static final String START_TLS_TIMEOUT_SECS
protected static final String NUM_WORKER_THREADS
protected static final String ENSEMBLE_PLACEMENT_POLICY
protected static final String NETWORK_TOPOLOGY_STABILIZE_PERIOD_SECONDS
protected static final String ENABLE_TASK_EXECUTION_STATS
protected static final String TASK_EXECUTION_WARN_TIME_MICROS
protected static final String ENABLE_BOOKIE_FAILURE_TRACKING
protected static final String BOOKIE_FAILURE_HISTORY_EXPIRATION_MS
protected static final String DISABLE_ENSEMBLE_CHANGE_FEATURE_NAME
protected static final String CLIENT_ROLE
public static final String CLIENT_ROLE_STANDARD
public static final String CLIENT_ROLE_SYSTEM
Auditor
protected static final String CLIENT_AUTH_PROVIDER_FACTORY_CLASS
protected static final String TLS_KEYSTORE_TYPE
protected static final String TLS_KEYSTORE
protected static final String TLS_KEYSTORE_PASSWORD_PATH
protected static final String TLS_TRUSTSTORE_TYPE
protected static final String TLS_TRUSTSTORE
protected static final String TLS_TRUSTSTORE_PASSWORD_PATH
public ClientConfiguration()
public ClientConfiguration(AbstractConfiguration conf)
conf
- Base configurationpublic int getThrottleValue()
setThrottleValue(int)
public ClientConfiguration setThrottleValue(int throttle)
throttle
- Throttle Valuepublic boolean getEnableDigestTypeAutodetection()
public ClientConfiguration setEnableDigestTypeAutodetection(boolean enable)
public BookKeeper.DigestType getBookieRecoveryDigestType()
setBookieRecoveryDigestType(org.apache.bookkeeper.client.BookKeeper.DigestType)
public ClientConfiguration setBookieRecoveryDigestType(BookKeeper.DigestType digestType)
digestType
- Digest Typepublic byte[] getBookieRecoveryPasswd()
setBookieRecoveryPasswd(byte[])
public ClientConfiguration setBookieRecoveryPasswd(byte[] passwd)
passwd
- Passwordpublic boolean getClientTcpNoDelay()
setClientTcpNoDelay(boolean)
public ClientConfiguration setClientTcpNoDelay(boolean noDelay)
noDelay
- NoDelay settingpublic boolean getClientSockKeepalive()
public ClientConfiguration setClientSockKeepalive(boolean keepalive)
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)public String getZkServers()
public ClientConfiguration setZkServers(String zkServers)
zkServers
- ZooKeeper servers to connectpublic int getZkTimeout()
public ClientConfiguration setZkTimeout(int zkTimeout)
zkTimeout
- ZooKeeper client timeout@Deprecated public int getReadTimeout()
getReadEntryTimeout()
or getAddEntryTimeout()
instead@Deprecated public ClientConfiguration setReadTimeout(int timeout)
setReadEntryTimeout(int)
or setAddEntryTimeout(int)
insteadtimeout
- The new read timeout in secondsgetReadTimeout()
public int getAddEntryTimeout()
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()
@Deprecated public long getTimeoutTaskIntervalMillis()
@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.public long getPCBCTimeoutTimerTickDurationMs()
org.jboss.netty.util.HashedWheelTimer
that used by PCBC to timeout
requests.org.jboss.netty.util.HashedWheelTimer
public ClientConfiguration setPCBCTimeoutTimerTickDurationMs(long tickDuration)
org.jboss.netty.util.HashedWheelTimer
that used by PCBC to timeout
requests. Be aware of org.jboss.netty.util.HashedWheelTimer
if you
are going to modify this setting.tickDuration
- tick duration in milliseconds.getPCBCTimeoutTimerTickDurationMs()
public int getPCBCTimeoutTimerNumTicks()
org.jboss.netty.util.HashedWheelTimer
that used by PCBC to timeout
requests.org.jboss.netty.util.HashedWheelTimer
public ClientConfiguration setPCBCTimeoutTimerNumTicks(int numTicks)
org.jboss.netty.util.HashedWheelTimer
that used by PCBC to timeout request.
Be aware of org.jboss.netty.util.HashedWheelTimer
if you are going to modify
this setting.numTicks
- number of ticks that used for timeout timer.getPCBCTimeoutTimerNumTicks()
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 getSpeculativeReadTimeout()
LedgerHandle.asyncReadEntries(long, long, org.apache.bookkeeper.client.AsyncCallback.ReadCallback, java.lang.Object)
public ClientConfiguration setSpeculativeReadTimeout(int timeout)
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()
public int getMaxSpeculativeReadLACTimeout()
public ClientConfiguration setFirstSpeculativeReadLACTimeout(int timeout)
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(ArrayList, List, Map)
to figure out a better read sequence to attempt reads from replicas and use
EnsemblePlacementPolicy.reorderReadLACSequence(ArrayList, List, Map)
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 Class<? extends EnsemblePlacementPolicy> getEnsemblePlacementPolicy() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public ClientConfiguration setEnsemblePlacementPolicy(Class<? extends EnsemblePlacementPolicy> policyClass)
policyClass
- Ensemble Placement Policy Class.public int getNetworkTopologyStabilizePeriodSeconds()
public ClientConfiguration setNetworkTopologyStabilizePeriodSeconds(int seconds)
seconds
- stabilize period in secondsgetNetworkTopologyStabilizePeriodSeconds()
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.
public int getBookieHealthCheckIntervalSeconds()
public ClientConfiguration setBookieHealthCheckInterval(int interval, 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.
threshold
- unit
- public int getBookieQuarantineTimeSeconds()
public ClientConfiguration setBookieQuarantineTime(int quarantineTime, TimeUnit unit)
Note: Please enableBookieHealthCheck()
to use this configuration.
quarantineTime
- unit
- public ClientConfiguration setNettyMaxFrameSizeBytes(int maxSize)
setNettyMaxFrameSizeBytes
in class AbstractConfiguration
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, TimeUnit unit)
pollInterval
- unit
- public ClientConfiguration setGetBookieInfoRetryIntervalSeconds(int interval, TimeUnit unit)
interval
- unit
- public ClientConfiguration setBookieMaxWeightMultipleForWeightBasedPlacement(int multiple)
multiple
- public ClientConfiguration setGetBookieInfoTimeout(int timeoutSecs)
timeout
- public ClientConfiguration setStartTLSTimeout(int timeoutSecs)
timeout
- public ClientConfiguration setClientRole(String role)
role
- defines how the client will actpublic String getClientRole()
public String getTLSKeyStoreType()
public ClientConfiguration setTLSKeyStoreType(String arg)
public String getTLSKeyStore()
public ClientConfiguration setTLSKeyStore(String arg)
public String getTLSKeyStorePasswordPath()
public ClientConfiguration setTLSKeyStorePasswordPath(String arg)
public String getTLSTrustStoreType()
public ClientConfiguration setTLSTrustStoreType(String arg)
public String getTLSTrustStore()
public ClientConfiguration setTLSTrustStore(String arg)
public String getTLSTrustStorePasswordPath()
public ClientConfiguration setTLSTrustStorePasswordPath(String arg)
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 getEnableBookieFailureTracking()
public ClientConfiguration setEnableBookieFailureTracking(boolean enabled)
enabled
- flag to enable/disable bookie failure trackingpublic int getBookieFailureHistoryExpirationMSec()
public ClientConfiguration setBookieFailureHistoryExpirationMSec(int expirationMSec)
timeout
- bookie failure tracking expiration timeout.public String getDisableEnsembleChangeFeatureName()
public ClientConfiguration setDisableEnsembleChangeFeatureName(String disableEnsembleChangeFeatureName)
disableEnsembleChangeFeatureName
- name of the dynamic feature that disables ensemble changepublic boolean isNettyUsePooledBuffers()
public ClientConfiguration setNettyUsePooledBuffers(boolean enabled)
enabled
- if enabled BookKeeper will use default Pooled Netty Buffer allocatorsetUseV2WireProtocol(boolean)
,
ReferenceCounted.release()
,
LedgerHandle.readEntries(long, long)
Copyright © 2011–2017 The Apache Software Foundation. All rights reserved.