public class ClientConfiguration extends AbstractConfiguration
Modifier and Type | Field and Description |
---|---|
protected static String |
ADD_ENTRY_TIMEOUT_SEC |
protected static String |
CLIENT_TCP_NODELAY |
protected static String |
DIGEST_TYPE |
protected static String |
ENSEMBLE_PLACEMENT_POLICY |
protected static String |
NUM_CHANNELS_PER_BOOKIE |
protected static String |
NUM_WORKER_THREADS |
protected static String |
PASSWD |
protected static String |
PCBC_TIMEOUT_TIMER_NUM_TICKS |
protected static String |
PCBC_TIMEOUT_TIMER_TICK_DURATION_MS |
protected static String |
READ_ENTRY_TIMEOUT_SEC |
protected static String |
READ_TIMEOUT |
protected static String |
SPECULATIVE_READ_TIMEOUT |
protected static String |
THROTTLE |
protected static String |
TIMEOUT_TASK_INTERVAL_MILLIS |
protected static String |
ZK_SERVERS |
protected static String |
ZK_TIMEOUT |
AVAILABLE_NODE, defaultLoader, LEDGER_MANAGER_FACTORY_CLASS, LEDGER_MANAGER_TYPE, METASTORE_IMPL_CLASS, METASTORE_MAX_ENTRIES_PER_SCAN, REREPLICATION_ENTRY_BATCH_SIZE, ZK_LEDGERS_ROOT_PATH
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 |
---|---|
int |
getAddEntryTimeout()
Get the timeout for add request.
|
BookKeeper.DigestType |
getBookieRecoveryDigestType()
Get digest type used in bookkeeper admin
|
byte[] |
getBookieRecoveryPasswd()
Get passwd used in bookkeeper admin
|
boolean |
getClientTcpNoDelay()
Is tcp connection no delay.
|
Class<? extends EnsemblePlacementPolicy> |
getEnsemblePlacementPolicy()
Get Ensemble Placement Policy Class.
|
int |
getNumChannelsPerBookie()
Get num channels per bookie.
|
int |
getNumWorkerThreads()
Get the number of worker threads.
|
int |
getPCBCTimeoutTimerNumTicks()
Get number of ticks that used for
HashedWheelTimer that used by PCBC to timeout
requests. |
long |
getPCBCTimeoutTimerTickDurationMs()
Get the tick duration in milliseconds that used for the
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 |
getSpeculativeReadTimeout()
Get the period of time after which a speculative entry read should be triggered.
|
int |
getThrottleValue()
Get throttle value
|
long |
getTimeoutTaskIntervalMillis()
Deprecated.
|
String |
getZkServers()
Get zookeeper servers to connect
|
int |
getZkTimeout()
Get zookeeper timeout
|
ClientConfiguration |
setAddEntryTimeout(int timeout)
Set timeout for add entry request.
|
ClientConfiguration |
setBookieRecoveryDigestType(BookKeeper.DigestType digestType)
Set digest type used in bookkeeper admin.
|
ClientConfiguration |
setBookieRecoveryPasswd(byte[] passwd)
Set passwd used in bookkeeper admin.
|
ClientConfiguration |
setClientTcpNoDelay(boolean noDelay)
Set socket nodelay setting.
|
ClientConfiguration |
setEnsemblePlacementPolicy(Class<? extends EnsemblePlacementPolicy> policyClass)
Set Ensemble Placement Policy Class.
|
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
HashedWheelTimer that used by PCBC to timeout request. |
ClientConfiguration |
setPCBCTimeoutTimerTickDurationMs(long tickDuration)
Set the tick duration in milliseconds that used for
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 |
setSpeculativeReadTimeout(int timeout)
Set the speculative read timeout.
|
ClientConfiguration |
setThrottleValue(int throttle)
Set throttle value.
|
ClientConfiguration |
setTimeoutTaskIntervalMillis(long timeoutMillis)
Deprecated.
|
ClientConfiguration |
setZkServers(String zkServers)
Set zookeeper servers to connect
|
ClientConfiguration |
setZkTimeout(int zkTimeout)
Set zookeeper timeout
|
getLedgerManagerFactoryClass, getLedgerManagerType, getMetastoreImplClass, getMetastoreMaxEntriesPerScan, getRereplicationEntryBatchSize, getZkAvailableBookiesPath, getZkLedgersRootPath, loadConf, loadConf, loadConf, setLedgerManagerFactoryClass, setLedgerManagerFactoryClassName, setLedgerManagerType, setMetastoreImplClass, setMetastoreMaxEntriesPerScan, setRereplicationEntryBatchSize, setZkLedgersRootPath
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 PASSWD
protected static final String CLIENT_TCP_NODELAY
protected static final String NUM_CHANNELS_PER_BOOKIE
protected static final String READ_TIMEOUT
protected static final String SPECULATIVE_READ_TIMEOUT
protected static final String ADD_ENTRY_TIMEOUT_SEC
protected static final String READ_ENTRY_TIMEOUT_SEC
protected static final String TIMEOUT_TASK_INTERVAL_MILLIS
protected static final String PCBC_TIMEOUT_TIMER_TICK_DURATION_MS
protected static final String PCBC_TIMEOUT_TIMER_NUM_TICKS
protected static final String NUM_WORKER_THREADS
protected static final String ENSEMBLE_PLACEMENT_POLICY
public ClientConfiguration()
public ClientConfiguration(AbstractConfiguration conf)
conf
- Base configurationpublic int getThrottleValue()
setThrottleValue(int)
public ClientConfiguration setThrottleValue(int throttle)
throttle
- Throttle Valuepublic 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 int getNumChannelsPerBookie()
public ClientConfiguration setNumChannelsPerBookie(int numChannelsPerBookie)
numChannelsPerBookie
- num channels per bookie.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()
@Deprecated public ClientConfiguration setReadTimeout(int timeout)
timeout
- 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 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 long getPCBCTimeoutTimerTickDurationMs()
HashedWheelTimer
that used by PCBC to timeout
requests.HashedWheelTimer
public ClientConfiguration setPCBCTimeoutTimerTickDurationMs(long tickDuration)
HashedWheelTimer
that used by PCBC to timeout
requests. Be aware of HashedWheelTimer
if you
are going to modify this setting.tickDuration
- tick duration in milliseconds.getPCBCTimeoutTimerTickDurationMs()
public int getPCBCTimeoutTimerNumTicks()
HashedWheelTimer
that used by PCBC to timeout
requests.HashedWheelTimer
public ClientConfiguration setPCBCTimeoutTimerNumTicks(int numTicks)
HashedWheelTimer
that used by PCBC to timeout request.
Be aware of 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 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.Copyright © 2011-2014 The Apache Software Foundation. All Rights Reserved.