public class ClientConfiguration extends AbstractConfiguration
Modifier and Type | Field and Description |
---|---|
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_TIMEOUT |
protected static String |
SPECULATIVE_READ_TIMEOUT |
protected static String |
THROTTLE |
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 |
---|---|
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 |
getReadTimeout()
Get the socket read timeout.
|
int |
getSpeculativeReadTimeout()
Get the period of time after which a speculative entry read should be triggered.
|
int |
getThrottleValue()
Get throttle value
|
String |
getZkServers()
Get zookeeper servers to connect
|
int |
getZkTimeout()
Get zookeeper timeout
|
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 |
setReadTimeout(int timeout)
Set the socket read timeout.
|
ClientConfiguration |
setSpeculativeReadTimeout(int timeout)
Set the speculative read timeout.
|
ClientConfiguration |
setThrottleValue(int throttle)
Set throttle value.
|
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 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 timeoutpublic int getReadTimeout()
public ClientConfiguration setReadTimeout(int timeout)
timeout
- The new read timeout in secondsgetReadTimeout()
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 © 2014 The Apache Software Foundation. All Rights Reserved.