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 |
NUM_WORKER_THREADS |
protected static String |
PASSWD |
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, 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.
|
int |
getNumWorkerThreads()
Get the number of worker threads.
|
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()
Get the interval between successive executions of the PerChannelBookieClient's
TimeoutTask.
|
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 |
setNumWorkerThreads(int numThreads)
Set the number of worker threads.
|
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) |
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 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 NUM_WORKER_THREADS
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 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()
public long getTimeoutTaskIntervalMillis()
public ClientConfiguration setTimeoutTaskIntervalMillis(long timeoutMillis)
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()
Copyright © 2011-2014 The Apache Software Foundation. All Rights Reserved.