Class AbstractConfiguration<T extends AbstractConfiguration>
- java.lang.Object
-
- org.apache.commons.configuration.event.EventSource
-
- org.apache.commons.configuration.AbstractConfiguration
-
- org.apache.commons.configuration.CompositeConfiguration
-
- org.apache.bookkeeper.conf.AbstractConfiguration<T>
-
- All Implemented Interfaces:
java.lang.Cloneable
,org.apache.commons.configuration.Configuration
- Direct Known Subclasses:
ClientConfiguration
,ServerConfiguration
public abstract class AbstractConfiguration<T extends AbstractConfiguration> extends org.apache.commons.configuration.CompositeConfiguration
Abstract configuration.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
ALLOCATOR_EXIT_ON_OUT_OF_MEMORY
protected static java.lang.String
ALLOCATOR_LEAK_DETECTION_POLICY
protected static java.lang.String
ALLOCATOR_OOM_POLICY
protected static java.lang.String
ALLOCATOR_POOLING_CONCURRENCY
protected static java.lang.String
ALLOCATOR_POOLING_POLICY
protected static java.lang.String
ALLOW_SHADED_LEDGER_MANAGER_FACTORY_CLASS
protected static java.lang.String
AVAILABLE_NODE
protected static java.lang.Class<? extends EntryFormatter>
DEFAULT_ENTRY_FORMATTER
protected static java.lang.Class<? extends LedgerIdFormatter>
DEFAULT_LEDGERID_FORMATTER
protected static java.lang.ClassLoader
DEFAULT_LOADER
protected static int
DEFAULT_NETTY_MAX_FRAME_SIZE
static java.lang.String
DESIRED_NUM_ZONES_PER_WRITE_QUORUM
protected static java.lang.String
ENABLE_BUSY_WAIT
protected static java.lang.String
ENABLE_HEALTH_CHECK
static java.lang.String
ENFORCE_MIN_NUM_FAULT_DOMAINS_FOR_WRITE
static java.lang.String
ENFORCE_MIN_NUM_RACKS_PER_WRITE_QUORUM
static java.lang.String
ENFORCE_STRICT_ZONEAWARE_PLACEMENT
protected static java.lang.String
ENTRY_FORMATTER_CLASS
static java.lang.String
IGNORE_LOCAL_NODE_IN_PLACEMENT_POLICY
protected static java.lang.String
LEDGER_MANAGER_FACTORY_CLASS
static java.lang.String
LEDGER_MANAGER_FACTORY_DISABLE_CLASS_CHECK
protected static java.lang.String
LEDGER_MANAGER_TYPE
protected static java.lang.String
LEDGER_METADATA_FORMAT_VERSION
protected static java.lang.String
LEDGERID_FORMATTER_CLASS
static java.lang.String
LIMIT_STATS_LOGGING
protected static java.lang.String
METADATA_SERVICE_URI
protected static java.lang.String
METASTORE_IMPL_CLASS
protected static java.lang.String
METASTORE_MAX_ENTRIES_PER_SCAN
static java.lang.String
MIN_NUM_RACKS_PER_WRITE_QUORUM
static java.lang.String
MIN_NUM_ZONES_PER_WRITE_QUORUM
protected static java.lang.String
NETTY_MAX_FRAME_SIZE
static java.lang.String
PERMITTED_STARTUP_USERS
protected static java.lang.String
PRESERVE_MDC_FOR_TASK_EXECUTION
static java.lang.String
READ_SYSTEM_PROPERTIES_PROPERTY
protected static java.lang.String
REPLICATION_RATE_BY_BYTES
protected static java.lang.String
REREPLICATION_ENTRY_BATCH_SIZE
protected static java.lang.String
SHADED_LEDGER_MANAGER_FACTORY_CLASS_PREFIX
protected static java.lang.String
STORE_SYSTEMTIME_AS_LEDGER_CREATION_TIME
protected static java.lang.String
STORE_SYSTEMTIME_AS_LEDGER_UNDERREPLICATED_MARK_TIME
protected static java.lang.String
TLS_CERT_FILES_REFRESH_DURATION_SECONDS
protected static java.lang.String
TLS_CERTIFICATE_PATH
protected static java.lang.String
TLS_CLIENT_AUTHENTICATION
protected static java.lang.String
TLS_ENABLED_CIPHER_SUITES
This list will be passed toSSLEngine.setEnabledCipherSuites(java.lang.String[])
.protected static java.lang.String
TLS_ENABLED_PROTOCOLS
This list will be passed toSSLEngine.setEnabledProtocols(java.lang.String[])
.protected static java.lang.String
TLS_KEYSTORE
protected static java.lang.String
TLS_KEYSTORE_PASSWORD_PATH
protected static java.lang.String
TLS_KEYSTORE_TYPE
TLS KeyStore, TrustStore, Password files and Certificate Paths.protected static java.lang.String
TLS_PROVIDER
protected static java.lang.String
TLS_PROVIDER_FACTORY_CLASS
protected static java.lang.String
TLS_TRUSTSTORE
protected static java.lang.String
TLS_TRUSTSTORE_PASSWORD_PATH
protected static java.lang.String
TLS_TRUSTSTORE_TYPE
protected static java.lang.String
ZK_ENABLE_SECURITY
protected static java.lang.String
ZK_LEDGERS_ROOT_PATH
protected static java.lang.String
ZK_REPLICATION_TASK_RATE_LIMIT
protected static java.lang.String
ZK_REQUEST_RATE_LIMIT
protected static java.lang.String
ZK_RETRY_BACKOFF_MAX_RETRIES
protected static java.lang.String
ZK_SERVERS
protected static java.lang.String
ZK_TIMEOUT
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractConfiguration()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description java.lang.String
asJson()
returns the string representation of json format of this config.boolean
exitOnOutOfMemory()
LeakDetectionPolicy
getAllocatorLeakDetectionPolicy()
Return the configured leak detection policy for the allocator.OutOfMemoryPolicy
getAllocatorOutOfMemoryPolicy()
int
getAllocatorPoolingConcurrency()
PoolingPolicy
getAllocatorPoolingPolicy()
java.lang.String
getClientAuthProviderFactoryClass()
Get the client authentication provider factory class name.int
getDesiredNumZonesPerWriteQuorum()
Get the desired number of zones per write quorum in ZoneAwarePlacementPolicy.boolean
getEnforceMinNumFaultDomainsForWrite()
Get the flag to enforce minimum number of fault domains for write.boolean
getEnforceMinNumRacksPerWriteQuorum()
Get the flag which enforces the minimum number of racks per write quorum.boolean
getEnforceStrictZoneawarePlacement()
Get the flag to enforce strict zoneaware placement.java.lang.Class<? extends EntryFormatter>
getEntryFormatterClass()
Get entry formatter class.Feature
getFeature(java.lang.String configProperty, Feature defaultValue)
boolean
getIgnoreLocalNodeInPlacementPolicy()
Whether to ignore localnode in placementpolicy.java.lang.Class<? extends LedgerIdFormatter>
getLedgerIdFormatterClass()
Get ledger id formatter class.java.lang.Class<? extends LedgerManagerFactory>
getLedgerManagerFactoryClass()
Get ledger manager factory class.java.lang.String
getLedgerManagerFactoryClassName()
Get Ledger Manager Factory Class Name.java.lang.String
getLedgerManagerLayoutStringFromFactoryClass()
Get layout string ("null" if unconfigured).java.lang.String
getLedgerManagerType()
Deprecated.replaced bygetLedgerManagerFactoryClass()
int
getLedgerMetadataFormatVersion()
Get Ledger metadata format version.boolean
getLimitStatsLogging()
Return the flag indicating whether to limit stats logging.java.lang.String
getMetadataServiceUri()
Get metadata service uri.java.lang.String
getMetadataServiceUriUnchecked()
Get metadata service uri.java.lang.String
getMetastoreImplClass()
Get metastore implementation class.int
getMetastoreMaxEntriesPerScan()
Get max entries per scan in metastore.int
getMinNumRacksPerWriteQuorum()
Get the minimum number of racks per write quorum.int
getMinNumZonesPerWriteQuorum()
Get the minimum number of zones per write quorum in ZoneAwarePlacementPolicy.int
getNettyMaxFrameSizeBytes()
Get the maximum netty frame size in bytes.java.lang.String[]
getPermittedStartupUsers()
Get array of users specified in this property.boolean
getPreserveMdcForTaskExecution()
Whether to preserve MDC for tasks in Executor.int
getReplicationRateByBytes()
Get the bytes rate of re-replication.long
getRereplicationEntryBatchSize()
Get the re-replication entry batch size.java.lang.String
getShadedLedgerManagerFactoryClassPrefix()
Get the class prefix of the shaded ledger manager factory class name allowed to be used for instantiating ledger manager factory.boolean
getStoreSystemTimeAsLedgerUnderreplicatedMarkTime()
Return the flag that indicates whether auditor is using system time as underreplicated ledger mark time.protected abstract T
getThis()
Trickery to allow inheritance with fluent style.long
getTLSCertFilesRefreshDurationSeconds()
Get tls certificate files refresh duration in seconds.boolean
getTLSClientAuthentication()
Whether the client will send an TLS certificate on TLS-handshake.java.lang.String
getTLSEnabledCipherSuites()
Get the list of enabled TLS cipher suites.java.lang.String
getTLSEnabledProtocols()
Get the list of enabled TLS protocols.java.lang.String
getTLSProvider()
Get TLS Provider (JDK or OpenSSL).java.lang.String
getTLSProviderFactoryClass()
Get the security provider factory class name.java.lang.String
getZkAvailableBookiesPath()
Deprecated.java.lang.String
getZkLedgersRootPath()
Deprecated.double
getZkReplicationTaskRateLimit()
get the max tasks can be acquired per second of re-replication.double
getZkRequestRateLimit()
Get zookeeper access request rate limit.int
getZkRetryBackoffMaxRetries()
Get zookeeper client backoff max retry times.java.lang.String
getZkServers()
Deprecated.since 4.7.0int
getZkTimeout()
Get zookeeper timeout.boolean
isBusyWaitEnabled()
Return whether the busy-wait is enabled for BookKeeper and Netty IO threads.boolean
isShadedLedgerManagerFactoryClassAllowed()
Is shaded ledger manager factory class name allowed to be used for instantiating ledger manager factory.boolean
isZkEnableSecurity()
Are z-node created with strict ACLs.void
loadConf(java.net.URL confURL)
You can load configurations in precedence order.void
loadConf(org.apache.commons.configuration.CompositeConfiguration baseConf)
You can load configuration from other configuration.T
setAllocatorLeakDetectionPolicy(LeakDetectionPolicy leakDetectionPolicy)
Enable the leak detection for the allocator.T
setAllocatorOutOfMemoryPolicy(OutOfMemoryPolicy oomPolicy)
Define the memory allocator out of memory policy.T
setAllocatorPoolingConcurrency(int concurrency)
Controls the amount of concurrency for the memory pool.T
setAllocatorPoolingPolicy(PoolingPolicy poolingPolicy)
Define the memory pooling policy.T
setAllowShadedLedgerManagerFactoryClass(boolean allowed)
Set the flag to allow using shaded ledger manager factory class for instantiating a ledger manager factory.T
setBusyWaitEnabled(boolean busyWaitEnabled)
Option to enable busy-wait settings.T
setClientAuthProviderFactoryClass(java.lang.String factoryClass)
Set the client authentication provider factory class name.void
setDesiredNumZonesPerWriteQuorum(int desiredNumZonesPerWriteQuorum)
Set the desired number of zones per write quorum in ZoneAwarePlacementPolicy.void
setEnforceMinNumFaultDomainsForWrite(boolean enforceMinNumFaultDomainsForWrite)
Set the flag to enforce minimum number of fault domains for write.void
setEnforceMinNumRacksPerWriteQuorum(boolean enforceMinNumRacksPerWriteQuorum)
Set the flag to enforce minimum number of racks per write quorum.void
setEnforceStrictZoneawarePlacement(boolean enforceStrictZoneawarePlacement)
Set the flag to enforce strict zoneaware placement.void
setEntryFormatterClass(java.lang.Class<? extends EntryFormatter> formatterClass)
Set entry formatter Class.T
setExitOnOutOfMemory(boolean exitOnOutOfMemory)
void
setFeature(java.lang.String configProperty, Feature feature)
void
setIgnoreLocalNodeInPlacementPolicy(boolean ignoreLocalNodeInPlacementPolicy)
Sets the flag to ignore usage of localnode in placement policy.void
setLedgerIdFormatterClass(java.lang.Class<? extends LedgerIdFormatter> formatterClass)
Set Ledger id formatter Class.void
setLedgerManagerFactoryClass(java.lang.Class<? extends LedgerManagerFactory> factoryClass)
Set Ledger Manager Factory Class.void
setLedgerManagerFactoryClassName(java.lang.String factoryClassName)
Set Ledger Manager Factory Class Name.void
setLedgerManagerType(java.lang.String lmType)
void
setLedgerMetadataFormatVersion(int metadataFormatVersion)
Set Ledger metadata format version.T
setLimitStatsLogging(boolean limitStatsLogging)
Sets flag to limit the stats logging.T
setMetadataServiceUri(java.lang.String serviceUri)
Set the metadata service uri.void
setMetastoreImplClass(java.lang.String metastoreImplClass)
Set metastore implementation class.void
setMetastoreMaxEntriesPerScan(int maxEntries)
Set max entries per scan in metastore.void
setMinNumRacksPerWriteQuorum(int minNumRacksPerWriteQuorum)
Set the minimum number of racks per write quorum.void
setMinNumZonesPerWriteQuorum(int minNumZonesPerWriteQuorum)
Set the minimum number of zones per write quorum in ZoneAwarePlacementPolicy.T
setNettyMaxFrameSizeBytes(int maxSize)
Set the max number of bytes a single message can be that is read by the bookie.void
setPermittedStartupUsers(java.lang.String s)
Limit who can start the application to prevent future permission errors.T
setPreserveMdcForTaskExecution(boolean enabled)
Whether to preserve MDC for tasks in Executor.T
setReplicationRateByBytes(int rate)
Set the bytes rate of re-replication.void
setRereplicationEntryBatchSize(long rereplicationEntryBatchSize)
Set the max entries to keep in fragment for re-replication.T
setShadedLedgerManagerFactoryClassPrefix(java.lang.String classPrefix)
Set the class prefix of the shaded ledger manager factory class for instantiating a ledger manager factory.T
setStoreSystemTimeAsLedgerUnderreplicatedMarkTime(boolean enabled)
Enable the Auditor to use system time as underreplicated ledger mark time.T
setTLSCertFilesRefreshDurationSeconds(long certFilesRefreshSec)
Set tls certificate files refresh duration in seconds.T
setTLSClientAuthentication(boolean enabled)
Specify whether the client will send an TLS certificate on TLS-handshake.T
setTLSEnabledCipherSuites(java.lang.String list)
Set the list of enabled TLS cipher suites.T
setTLSEnabledProtocols(java.lang.String list)
Set the list of enabled TLS protocols.T
setTLSProvider(java.lang.String provider)
Set TLS Provider (JDK or OpenSSL).T
setTLSProviderFactoryClass(java.lang.String factoryClass)
Set the client security provider factory class name.void
setZkEnableSecurity(boolean zkEnableSecurity)
Set the usage of ACLs of new z-nodes.void
setZkLedgersRootPath(java.lang.String zkLedgersPath)
Deprecated.T
setZkReplicationTaskRateLimit(double zkReplicationTaskRateLimit)
set the max tasks can be acquired per second of re-replication, default is 0, which means no limit.void
setZkRequestRateLimit(double rateLimit)
Set zookeeper access request rate limit.T
setZkRetryBackoffMaxRetries(int maxRetries)
Set zookeeper client backoff max retry times.T
setZkServers(java.lang.String zkServers)
Deprecated.T
setZkTimeout(int zkTimeout)
Set zookeeper timeout.-
Methods inherited from class org.apache.commons.configuration.CompositeConfiguration
addConfiguration, addConfiguration, addPropertyDirect, clear, clearPropertyDirect, clone, containsKey, getConfiguration, getInMemoryConfiguration, getKeys, getKeys, getList, getNumberOfConfigurations, getProperty, getSource, getStringArray, isEmpty, removeConfiguration, setDelimiterParsingDisabled, setListDelimiter
-
Methods inherited from class org.apache.commons.configuration.AbstractConfiguration
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, isScalarValue, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setLogger, setProperty, setThrowExceptionOnMissing, subset
-
Methods inherited from class org.apache.commons.configuration.event.EventSource
addConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents
-
-
-
-
Field Detail
-
READ_SYSTEM_PROPERTIES_PROPERTY
public static final java.lang.String READ_SYSTEM_PROPERTIES_PROPERTY
- See Also:
- Constant Field Values
-
DEFAULT_LOADER
protected static final java.lang.ClassLoader DEFAULT_LOADER
-
ZK_TIMEOUT
protected static final java.lang.String ZK_TIMEOUT
- See Also:
- Constant Field Values
-
ZK_SERVERS
protected static final java.lang.String ZK_SERVERS
- See Also:
- Constant Field Values
-
ZK_RETRY_BACKOFF_MAX_RETRIES
protected static final java.lang.String ZK_RETRY_BACKOFF_MAX_RETRIES
- See Also:
- Constant Field Values
-
LEDGER_MANAGER_TYPE
protected static final java.lang.String LEDGER_MANAGER_TYPE
- See Also:
- Constant Field Values
-
LEDGER_MANAGER_FACTORY_CLASS
protected static final java.lang.String LEDGER_MANAGER_FACTORY_CLASS
- See Also:
- Constant Field Values
-
LEDGER_METADATA_FORMAT_VERSION
protected static final java.lang.String LEDGER_METADATA_FORMAT_VERSION
- See Also:
- Constant Field Values
-
ALLOW_SHADED_LEDGER_MANAGER_FACTORY_CLASS
protected static final java.lang.String ALLOW_SHADED_LEDGER_MANAGER_FACTORY_CLASS
- See Also:
- Constant Field Values
-
SHADED_LEDGER_MANAGER_FACTORY_CLASS_PREFIX
protected static final java.lang.String SHADED_LEDGER_MANAGER_FACTORY_CLASS_PREFIX
- See Also:
- Constant Field Values
-
METADATA_SERVICE_URI
protected static final java.lang.String METADATA_SERVICE_URI
- See Also:
- Constant Field Values
-
ZK_LEDGERS_ROOT_PATH
protected static final java.lang.String ZK_LEDGERS_ROOT_PATH
- See Also:
- Constant Field Values
-
ZK_REQUEST_RATE_LIMIT
protected static final java.lang.String ZK_REQUEST_RATE_LIMIT
- See Also:
- Constant Field Values
-
ZK_REPLICATION_TASK_RATE_LIMIT
protected static final java.lang.String ZK_REPLICATION_TASK_RATE_LIMIT
- See Also:
- Constant Field Values
-
AVAILABLE_NODE
protected static final java.lang.String AVAILABLE_NODE
- See Also:
- Constant Field Values
-
REREPLICATION_ENTRY_BATCH_SIZE
protected static final java.lang.String REREPLICATION_ENTRY_BATCH_SIZE
- See Also:
- Constant Field Values
-
STORE_SYSTEMTIME_AS_LEDGER_UNDERREPLICATED_MARK_TIME
protected static final java.lang.String STORE_SYSTEMTIME_AS_LEDGER_UNDERREPLICATED_MARK_TIME
- See Also:
- Constant Field Values
-
STORE_SYSTEMTIME_AS_LEDGER_CREATION_TIME
protected static final java.lang.String STORE_SYSTEMTIME_AS_LEDGER_CREATION_TIME
- See Also:
- Constant Field Values
-
ENABLE_BUSY_WAIT
protected static final java.lang.String ENABLE_BUSY_WAIT
- See Also:
- Constant Field Values
-
ENABLE_HEALTH_CHECK
protected static final java.lang.String ENABLE_HEALTH_CHECK
- See Also:
- Constant Field Values
-
METASTORE_IMPL_CLASS
protected static final java.lang.String METASTORE_IMPL_CLASS
- See Also:
- Constant Field Values
-
METASTORE_MAX_ENTRIES_PER_SCAN
protected static final java.lang.String METASTORE_MAX_ENTRIES_PER_SCAN
- See Also:
- Constant Field Values
-
TLS_PROVIDER
protected static final java.lang.String TLS_PROVIDER
- See Also:
- Constant Field Values
-
TLS_PROVIDER_FACTORY_CLASS
protected static final java.lang.String TLS_PROVIDER_FACTORY_CLASS
- See Also:
- Constant Field Values
-
LEDGERID_FORMATTER_CLASS
protected static final java.lang.String LEDGERID_FORMATTER_CLASS
- See Also:
- Constant Field Values
-
ENTRY_FORMATTER_CLASS
protected static final java.lang.String ENTRY_FORMATTER_CLASS
- See Also:
- Constant Field Values
-
TLS_CLIENT_AUTHENTICATION
protected static final java.lang.String TLS_CLIENT_AUTHENTICATION
- See Also:
- Constant Field Values
-
PRESERVE_MDC_FOR_TASK_EXECUTION
protected static final java.lang.String PRESERVE_MDC_FOR_TASK_EXECUTION
- See Also:
- Constant Field Values
-
DEFAULT_ENTRY_FORMATTER
protected static final java.lang.Class<? extends EntryFormatter> DEFAULT_ENTRY_FORMATTER
-
DEFAULT_LEDGERID_FORMATTER
protected static final java.lang.Class<? extends LedgerIdFormatter> DEFAULT_LEDGERID_FORMATTER
-
TLS_CERT_FILES_REFRESH_DURATION_SECONDS
protected static final java.lang.String TLS_CERT_FILES_REFRESH_DURATION_SECONDS
- See Also:
- Constant Field Values
-
TLS_ENABLED_CIPHER_SUITES
protected static final java.lang.String TLS_ENABLED_CIPHER_SUITES
This list will be passed toSSLEngine.setEnabledCipherSuites(java.lang.String[])
. Please refer to official JDK JavaDocs- See Also:
- Constant Field Values
-
TLS_ENABLED_PROTOCOLS
protected static final java.lang.String TLS_ENABLED_PROTOCOLS
This list will be passed toSSLEngine.setEnabledProtocols(java.lang.String[])
. Please refer to official JDK JavaDocs- See Also:
- Constant Field Values
-
TLS_KEYSTORE_TYPE
protected static final java.lang.String TLS_KEYSTORE_TYPE
TLS KeyStore, TrustStore, Password files and Certificate Paths.- See Also:
- Constant Field Values
-
TLS_KEYSTORE
protected static final java.lang.String TLS_KEYSTORE
- See Also:
- Constant Field Values
-
TLS_KEYSTORE_PASSWORD_PATH
protected static final java.lang.String TLS_KEYSTORE_PASSWORD_PATH
- See Also:
- Constant Field Values
-
TLS_TRUSTSTORE_TYPE
protected static final java.lang.String TLS_TRUSTSTORE_TYPE
- See Also:
- Constant Field Values
-
TLS_TRUSTSTORE
protected static final java.lang.String TLS_TRUSTSTORE
- See Also:
- Constant Field Values
-
TLS_TRUSTSTORE_PASSWORD_PATH
protected static final java.lang.String TLS_TRUSTSTORE_PASSWORD_PATH
- See Also:
- Constant Field Values
-
TLS_CERTIFICATE_PATH
protected static final java.lang.String TLS_CERTIFICATE_PATH
- See Also:
- Constant Field Values
-
NETTY_MAX_FRAME_SIZE
protected static final java.lang.String NETTY_MAX_FRAME_SIZE
- See Also:
- Constant Field Values
-
DEFAULT_NETTY_MAX_FRAME_SIZE
protected static final int DEFAULT_NETTY_MAX_FRAME_SIZE
- See Also:
- Constant Field Values
-
ZK_ENABLE_SECURITY
protected static final java.lang.String ZK_ENABLE_SECURITY
- See Also:
- Constant Field Values
-
LEDGER_MANAGER_FACTORY_DISABLE_CLASS_CHECK
public static final java.lang.String LEDGER_MANAGER_FACTORY_DISABLE_CLASS_CHECK
- See Also:
- Constant Field Values
-
PERMITTED_STARTUP_USERS
public static final java.lang.String PERMITTED_STARTUP_USERS
- See Also:
- Constant Field Values
-
MIN_NUM_RACKS_PER_WRITE_QUORUM
public static final java.lang.String MIN_NUM_RACKS_PER_WRITE_QUORUM
- See Also:
- Constant Field Values
-
ENFORCE_MIN_NUM_RACKS_PER_WRITE_QUORUM
public static final java.lang.String ENFORCE_MIN_NUM_RACKS_PER_WRITE_QUORUM
- See Also:
- Constant Field Values
-
ENFORCE_MIN_NUM_FAULT_DOMAINS_FOR_WRITE
public static final java.lang.String ENFORCE_MIN_NUM_FAULT_DOMAINS_FOR_WRITE
- See Also:
- Constant Field Values
-
IGNORE_LOCAL_NODE_IN_PLACEMENT_POLICY
public static final java.lang.String IGNORE_LOCAL_NODE_IN_PLACEMENT_POLICY
- See Also:
- Constant Field Values
-
MIN_NUM_ZONES_PER_WRITE_QUORUM
public static final java.lang.String MIN_NUM_ZONES_PER_WRITE_QUORUM
- See Also:
- Constant Field Values
-
DESIRED_NUM_ZONES_PER_WRITE_QUORUM
public static final java.lang.String DESIRED_NUM_ZONES_PER_WRITE_QUORUM
- See Also:
- Constant Field Values
-
ENFORCE_STRICT_ZONEAWARE_PLACEMENT
public static final java.lang.String ENFORCE_STRICT_ZONEAWARE_PLACEMENT
- See Also:
- Constant Field Values
-
ALLOCATOR_POOLING_POLICY
protected static final java.lang.String ALLOCATOR_POOLING_POLICY
- See Also:
- Constant Field Values
-
ALLOCATOR_POOLING_CONCURRENCY
protected static final java.lang.String ALLOCATOR_POOLING_CONCURRENCY
- See Also:
- Constant Field Values
-
ALLOCATOR_OOM_POLICY
protected static final java.lang.String ALLOCATOR_OOM_POLICY
- See Also:
- Constant Field Values
-
ALLOCATOR_LEAK_DETECTION_POLICY
protected static final java.lang.String ALLOCATOR_LEAK_DETECTION_POLICY
- See Also:
- Constant Field Values
-
ALLOCATOR_EXIT_ON_OUT_OF_MEMORY
protected static final java.lang.String ALLOCATOR_EXIT_ON_OUT_OF_MEMORY
- See Also:
- Constant Field Values
-
LIMIT_STATS_LOGGING
public static final java.lang.String LIMIT_STATS_LOGGING
- See Also:
- Constant Field Values
-
REPLICATION_RATE_BY_BYTES
protected static final java.lang.String REPLICATION_RATE_BY_BYTES
- See Also:
- Constant Field Values
-
-
Method Detail
-
setPermittedStartupUsers
public void setPermittedStartupUsers(java.lang.String s)
Limit who can start the application to prevent future permission errors.
-
getPermittedStartupUsers
public java.lang.String[] getPermittedStartupUsers()
Get array of users specified in this property.
-
loadConf
public void loadConf(java.net.URL confURL) throws org.apache.commons.configuration.ConfigurationException
You can load configurations in precedence order. The first one takes precedence over any loaded later.- Parameters:
confURL
- Configuration URL- Throws:
org.apache.commons.configuration.ConfigurationException
-
loadConf
public void loadConf(org.apache.commons.configuration.CompositeConfiguration baseConf)
You can load configuration from other configuration.- Parameters:
baseConf
- Other Configuration
-
getMetadataServiceUriUnchecked
public java.lang.String getMetadataServiceUriUnchecked() throws UncheckedConfigurationException
Get metadata service uri.Warning: this method silently converts checked exceptions to unchecked exceptions. It is useful to use this method in lambda expressions. However it should not be used with places which have logics to handle checked exceptions. In such cases use
getMetadataServiceUri()
instead.- Returns:
- metadata service uri
- Throws:
UncheckedConfigurationException
- if the metadata service uri is invalid.
-
getMetadataServiceUri
public java.lang.String getMetadataServiceUri() throws org.apache.commons.configuration.ConfigurationException
Get metadata service uri.- Returns:
- metadata service uri.
- Throws:
org.apache.commons.configuration.ConfigurationException
- if the metadata service uri is invalid.
-
setMetadataServiceUri
public T setMetadataServiceUri(java.lang.String serviceUri)
Set the metadata service uri.- Parameters:
serviceUri
- the metadata service uri.- Returns:
- the configuration object.
-
getZkServers
@Deprecated public java.lang.String getZkServers()
Deprecated.since 4.7.0Get zookeeper servers to connect.`zkServers` is deprecating, in favor of using `metadataServiceUri`
- Returns:
- zookeeper servers
-
setZkServers
@Deprecated public T setZkServers(java.lang.String zkServers)
Deprecated.Set zookeeper servers to connect.`zkServers` is deprecating, in favor of using `metadataServiceUri`
- Parameters:
zkServers
- ZooKeeper servers to connect
-
getZkTimeout
public int getZkTimeout()
Get zookeeper timeout.- Returns:
- zookeeper server timeout
-
setZkTimeout
public T setZkTimeout(int zkTimeout)
Set zookeeper timeout.- Parameters:
zkTimeout
- ZooKeeper server timeout- Returns:
- server configuration
-
getZkRetryBackoffMaxRetries
public int getZkRetryBackoffMaxRetries()
Get zookeeper client backoff max retry times.- Returns:
- zk backoff max retry times.
-
setZkRetryBackoffMaxRetries
public T setZkRetryBackoffMaxRetries(int maxRetries)
Set zookeeper client backoff max retry times.- Parameters:
maxRetries
- backoff max retry times- Returns:
- server configuration.
-
setLedgerManagerType
@Deprecated public void setLedgerManagerType(java.lang.String lmType)
Deprecated.Set Ledger Manager Type.- Parameters:
lmType
- Ledger Manager Type
-
getLedgerManagerType
@Deprecated public java.lang.String getLedgerManagerType()
Deprecated.replaced bygetLedgerManagerFactoryClass()
Get Ledger Manager Type.- Returns:
- ledger manager type
-
setAllowShadedLedgerManagerFactoryClass
public T setAllowShadedLedgerManagerFactoryClass(boolean allowed)
Set the flag to allow using shaded ledger manager factory class for instantiating a ledger manager factory.- Parameters:
allowed
- the flag to allow/disallow using shaded ledger manager factory class- Returns:
- configuration instance.
-
isShadedLedgerManagerFactoryClassAllowed
public boolean isShadedLedgerManagerFactoryClassAllowed()
Is shaded ledger manager factory class name allowed to be used for instantiating ledger manager factory.- Returns:
- ledger manager factory class name.
-
setShadedLedgerManagerFactoryClassPrefix
public T setShadedLedgerManagerFactoryClassPrefix(java.lang.String classPrefix)
Set the class prefix of the shaded ledger manager factory class for instantiating a ledger manager factory.This setting only takes effects when
isShadedLedgerManagerFactoryClassAllowed()
returns true.- Parameters:
classPrefix
- the class prefix of shaded ledger manager factory class- Returns:
- configuration instance.
-
getShadedLedgerManagerFactoryClassPrefix
public java.lang.String getShadedLedgerManagerFactoryClassPrefix()
Get the class prefix of the shaded ledger manager factory class name allowed to be used for instantiating ledger manager factory.This setting only takes effects when
isShadedLedgerManagerFactoryClassAllowed()
returns true- Returns:
- ledger manager factory class name.
- See Also:
isShadedLedgerManagerFactoryClassAllowed()
-
setLedgerManagerFactoryClassName
public void setLedgerManagerFactoryClassName(java.lang.String factoryClassName)
Set Ledger Manager Factory Class Name.- Parameters:
factoryClassName
- Ledger Manager Factory Class Name
-
getLedgerManagerFactoryClassName
public java.lang.String getLedgerManagerFactoryClassName()
Get Ledger Manager Factory Class Name.- Returns:
- ledger manager factory class name.
-
setLedgerMetadataFormatVersion
public void setLedgerMetadataFormatVersion(int metadataFormatVersion)
Set Ledger metadata format version.- Parameters:
metadataFormatVersion
- Ledger metadata format version. pass -1 to use default version
-
getLedgerMetadataFormatVersion
public int getLedgerMetadataFormatVersion()
Get Ledger metadata format version.- Returns:
- ledger metadata format version.
-
getLedgerManagerLayoutStringFromFactoryClass
public java.lang.String getLedgerManagerLayoutStringFromFactoryClass() throws org.apache.commons.configuration.ConfigurationException
Get layout string ("null" if unconfigured).- Returns:
- null, hierarchical, longhierarchical, or flat based on LEDGER_MANAGER_FACTORY_CLASS
- Throws:
org.apache.commons.configuration.ConfigurationException
-
setLedgerManagerFactoryClass
public void setLedgerManagerFactoryClass(java.lang.Class<? extends LedgerManagerFactory> factoryClass)
Set Ledger Manager Factory Class.- Parameters:
factoryClass
- Ledger Manager Factory Class
-
getLedgerManagerFactoryClass
public java.lang.Class<? extends LedgerManagerFactory> getLedgerManagerFactoryClass() throws org.apache.commons.configuration.ConfigurationException
Get ledger manager factory class.- Returns:
- ledger manager factory class
- Throws:
org.apache.commons.configuration.ConfigurationException
-
setZkLedgersRootPath
@Deprecated public void setZkLedgersRootPath(java.lang.String zkLedgersPath)
Deprecated.Set Zk Ledgers Root Path.- Parameters:
zkLedgersPath
- zk ledgers root path
-
getZkLedgersRootPath
@Deprecated public java.lang.String getZkLedgersRootPath()
Deprecated.Get Zk Ledgers Root Path.- Returns:
- zk ledgers root path
-
getZkRequestRateLimit
public double getZkRequestRateLimit()
Get zookeeper access request rate limit.- Returns:
- zookeeper access request rate limit.
-
setZkRequestRateLimit
public void setZkRequestRateLimit(double rateLimit)
Set zookeeper access request rate limit.- Parameters:
rateLimit
- zookeeper access request rate limit.
-
isZkEnableSecurity
public boolean isZkEnableSecurity()
Are z-node created with strict ACLs.- Returns:
- usage of secure ZooKeeper ACLs
-
setZkEnableSecurity
public void setZkEnableSecurity(boolean zkEnableSecurity)
Set the usage of ACLs of new z-nodes.- Parameters:
zkEnableSecurity
-
-
getZkAvailableBookiesPath
@Deprecated public java.lang.String getZkAvailableBookiesPath()
Deprecated.Get the node under which available bookies are stored.- Returns:
- Node under which available bookies are stored.
-
setRereplicationEntryBatchSize
public void setRereplicationEntryBatchSize(long rereplicationEntryBatchSize)
Set the max entries to keep in fragment for re-replication. If fragment has more entries than this count, then the original fragment will be split into multiple small logical fragments by keeping max entries count to rereplicationEntryBatchSize. So, re-replication will happen in batches wise.
-
getRereplicationEntryBatchSize
public long getRereplicationEntryBatchSize()
Get the re-replication entry batch size.
-
getMetastoreImplClass
public java.lang.String getMetastoreImplClass()
Get metastore implementation class.- Returns:
- metastore implementation class name.
-
setMetastoreImplClass
public void setMetastoreImplClass(java.lang.String metastoreImplClass)
Set metastore implementation class.- Parameters:
metastoreImplClass
- Metastore implementation Class name.
-
getMetastoreMaxEntriesPerScan
public int getMetastoreMaxEntriesPerScan()
Get max entries per scan in metastore.- Returns:
- max entries per scan in metastore.
-
setMetastoreMaxEntriesPerScan
public void setMetastoreMaxEntriesPerScan(int maxEntries)
Set max entries per scan in metastore.- Parameters:
maxEntries
- Max entries per scan in metastore.
-
setFeature
public void setFeature(java.lang.String configProperty, Feature feature)
-
setLedgerIdFormatterClass
public void setLedgerIdFormatterClass(java.lang.Class<? extends LedgerIdFormatter> formatterClass)
Set Ledger id formatter Class.- Parameters:
formatterClass
- LedgerIdFormatter Class
-
getLedgerIdFormatterClass
public java.lang.Class<? extends LedgerIdFormatter> getLedgerIdFormatterClass() throws org.apache.commons.configuration.ConfigurationException
Get ledger id formatter class.- Returns:
- LedgerIdFormatter class
- Throws:
org.apache.commons.configuration.ConfigurationException
-
setEntryFormatterClass
public void setEntryFormatterClass(java.lang.Class<? extends EntryFormatter> formatterClass)
Set entry formatter Class.- Parameters:
formatterClass
- EntryFormatter Class
-
getEntryFormatterClass
public java.lang.Class<? extends EntryFormatter> getEntryFormatterClass() throws org.apache.commons.configuration.ConfigurationException
Get entry formatter class.- Returns:
- EntryFormatter class
- Throws:
org.apache.commons.configuration.ConfigurationException
-
setClientAuthProviderFactoryClass
public T setClientAuthProviderFactoryClass(java.lang.String factoryClass)
Set the client authentication provider factory class name. If this is not set, no authentication will be used- Parameters:
factoryClass
- the client authentication provider factory class name- Returns:
- client configuration
-
getClientAuthProviderFactoryClass
public java.lang.String getClientAuthProviderFactoryClass()
Get the client authentication provider factory class name. If this returns null, no authentication will take place.- Returns:
- the client authentication provider factory class name or null.
-
getNettyMaxFrameSizeBytes
public int getNettyMaxFrameSizeBytes()
Get the maximum netty frame size in bytes. Any message received larger that this will be rejected.- Returns:
- the maximum netty frame size in bytes.
-
setNettyMaxFrameSizeBytes
public T setNettyMaxFrameSizeBytes(int maxSize)
Set the max number of bytes a single message can be that is read by the bookie. Any message larger than that size will be rejected.- Parameters:
maxSize
- the max size in bytes- Returns:
- server configuration
-
getTLSProviderFactoryClass
public java.lang.String getTLSProviderFactoryClass()
Get the security provider factory class name. If this returns null, no security will be enforced on the channel.- Returns:
- the security provider factory class name or null.
-
setTLSProviderFactoryClass
public T setTLSProviderFactoryClass(java.lang.String factoryClass)
Set the client security provider factory class name. If this is not set, no security will be used on the channel.- Parameters:
factoryClass
- the client security provider factory class name- Returns:
- client configuration
-
getTLSProvider
public java.lang.String getTLSProvider()
Get TLS Provider (JDK or OpenSSL).- Returns:
- the TLS provider to use in creating TLS Context
-
setTLSProvider
public T setTLSProvider(java.lang.String provider)
Set TLS Provider (JDK or OpenSSL).- Parameters:
provider
- TLS Provider type- Returns:
- Client Configuration
-
getTLSClientAuthentication
public boolean getTLSClientAuthentication()
Whether the client will send an TLS certificate on TLS-handshake.- Returns:
- whether TLS is enabled on the bookie or not.
- See Also:
setTLSClientAuthentication(boolean)
-
setTLSClientAuthentication
public T setTLSClientAuthentication(boolean enabled)
Specify whether the client will send an TLS certificate on TLS-handshake.- Parameters:
enabled
- Whether to send a certificate or not- Returns:
- client configuration
-
setTLSCertFilesRefreshDurationSeconds
public T setTLSCertFilesRefreshDurationSeconds(long certFilesRefreshSec)
Set tls certificate files refresh duration in seconds.- Parameters:
certFilesRefreshSec
- tls certificate files refresh duration in seconds (set 0 to disable auto refresh)- Returns:
- current configuration
-
getTLSCertFilesRefreshDurationSeconds
public long getTLSCertFilesRefreshDurationSeconds()
Get tls certificate files refresh duration in seconds.- Returns:
- tls certificate files refresh duration in seconds. Default 0 to disable auto refresh.
-
setTLSEnabledCipherSuites
public T setTLSEnabledCipherSuites(java.lang.String list)
Set the list of enabled TLS cipher suites. Leave null not to override default JDK list. This list will be passed toSSLEngine.setEnabledCipherSuites(java.lang.String[])
. Please refer to official JDK JavaDocs- Parameters:
list
- comma separated list of enabled TLS cipher suites- Returns:
- current configuration
-
getTLSEnabledCipherSuites
public java.lang.String getTLSEnabledCipherSuites()
Get the list of enabled TLS cipher suites.- Returns:
- this list of enabled TLS cipher suites
- See Also:
setTLSEnabledCipherSuites(java.lang.String)
-
setTLSEnabledProtocols
public T setTLSEnabledProtocols(java.lang.String list)
Set the list of enabled TLS protocols. Leave null not to override default JDK list. This list will be passed toSSLEngine.setEnabledProtocols(java.lang.String[])
. Please refer to official JDK JavaDocs- Parameters:
list
- comma separated list of enabled TLS cipher suites- Returns:
- current configuration
-
getTLSEnabledProtocols
public java.lang.String getTLSEnabledProtocols()
Get the list of enabled TLS protocols.- Returns:
- the list of enabled TLS protocols.
- See Also:
setTLSEnabledProtocols(java.lang.String)
-
setMinNumRacksPerWriteQuorum
public void setMinNumRacksPerWriteQuorum(int minNumRacksPerWriteQuorum)
Set the minimum number of racks per write quorum.
-
getMinNumRacksPerWriteQuorum
public int getMinNumRacksPerWriteQuorum()
Get the minimum number of racks per write quorum.
-
setMinNumZonesPerWriteQuorum
public void setMinNumZonesPerWriteQuorum(int minNumZonesPerWriteQuorum)
Set the minimum number of zones per write quorum in ZoneAwarePlacementPolicy.
-
getMinNumZonesPerWriteQuorum
public int getMinNumZonesPerWriteQuorum()
Get the minimum number of zones per write quorum in ZoneAwarePlacementPolicy.
-
setDesiredNumZonesPerWriteQuorum
public void setDesiredNumZonesPerWriteQuorum(int desiredNumZonesPerWriteQuorum)
Set the desired number of zones per write quorum in ZoneAwarePlacementPolicy.
-
getDesiredNumZonesPerWriteQuorum
public int getDesiredNumZonesPerWriteQuorum()
Get the desired number of zones per write quorum in ZoneAwarePlacementPolicy.
-
setEnforceStrictZoneawarePlacement
public void setEnforceStrictZoneawarePlacement(boolean enforceStrictZoneawarePlacement)
Set the flag to enforce strict zoneaware placement.in ZoneawareEnsemblePlacementPolicy if strict placement is enabled then minZones/desiredZones in writeQuorum would be maintained otherwise it will pick nodes randomly.
-
getEnforceStrictZoneawarePlacement
public boolean getEnforceStrictZoneawarePlacement()
Get the flag to enforce strict zoneaware placement.in ZoneawareEnsemblePlacementPolicy if strict placement is enabled then minZones/desiredZones in writeQuorum would be maintained otherwise it will pick nodes randomly.
-
setEnforceMinNumRacksPerWriteQuorum
public void setEnforceMinNumRacksPerWriteQuorum(boolean enforceMinNumRacksPerWriteQuorum)
Set the flag to enforce minimum number of racks per write quorum.
-
getEnforceMinNumRacksPerWriteQuorum
public boolean getEnforceMinNumRacksPerWriteQuorum()
Get the flag which enforces the minimum number of racks per write quorum.
-
setEnforceMinNumFaultDomainsForWrite
public void setEnforceMinNumFaultDomainsForWrite(boolean enforceMinNumFaultDomainsForWrite)
Set the flag to enforce minimum number of fault domains for write.
-
getEnforceMinNumFaultDomainsForWrite
public boolean getEnforceMinNumFaultDomainsForWrite()
Get the flag to enforce minimum number of fault domains for write.
-
setIgnoreLocalNodeInPlacementPolicy
public void setIgnoreLocalNodeInPlacementPolicy(boolean ignoreLocalNodeInPlacementPolicy)
Sets the flag to ignore usage of localnode in placement policy.
-
getIgnoreLocalNodeInPlacementPolicy
public boolean getIgnoreLocalNodeInPlacementPolicy()
Whether to ignore localnode in placementpolicy.
-
setStoreSystemTimeAsLedgerUnderreplicatedMarkTime
public T setStoreSystemTimeAsLedgerUnderreplicatedMarkTime(boolean enabled)
Enable the Auditor to use system time as underreplicated ledger mark time.If this is enabled, Auditor will write a ctime field into the underreplicated ledger znode.
- Parameters:
enabled
- flag to enable/disable Auditor using system time as underreplicated ledger mark time.
-
getStoreSystemTimeAsLedgerUnderreplicatedMarkTime
public boolean getStoreSystemTimeAsLedgerUnderreplicatedMarkTime()
Return the flag that indicates whether auditor is using system time as underreplicated ledger mark time.- Returns:
- the flag that indicates whether auditor is using system time as underreplicated ledger mark time.
-
getPreserveMdcForTaskExecution
public boolean getPreserveMdcForTaskExecution()
Whether to preserve MDC for tasks in Executor.- Returns:
- flag to enable/disable MDC preservation in Executor.
-
setPreserveMdcForTaskExecution
public T setPreserveMdcForTaskExecution(boolean enabled)
Whether to preserve MDC for tasks in Executor.- Parameters:
enabled
- flag to enable/disable MDC preservation in Executor.- Returns:
- configuration.
-
getAllocatorPoolingPolicy
public PoolingPolicy getAllocatorPoolingPolicy()
- Returns:
- the configured pooling policy for the allocator.
-
setAllocatorPoolingPolicy
public T setAllocatorPoolingPolicy(PoolingPolicy poolingPolicy)
Define the memory pooling policy.Default is
PoolingPolicy.PooledDirect
- Parameters:
poolingPolicy
- the memory pooling policy- Returns:
- configuration object.
-
getAllocatorPoolingConcurrency
public int getAllocatorPoolingConcurrency()
- Returns:
- the configured pooling concurrency for the allocator.
-
setAllocatorPoolingConcurrency
public T setAllocatorPoolingConcurrency(int concurrency)
Controls the amount of concurrency for the memory pool.Default is to have a number of allocator arenas equals to 2 * CPUS.
Decreasing this number will reduce the amount of memory overhead, at the expense of increased allocation contention.
- Parameters:
concurrency
- the concurrency level to use for the allocator pool- Returns:
- configuration object.
-
getAllocatorOutOfMemoryPolicy
public OutOfMemoryPolicy getAllocatorOutOfMemoryPolicy()
- Returns:
- the configured ouf of memory policy for the allocator.
-
setAllocatorOutOfMemoryPolicy
public T setAllocatorOutOfMemoryPolicy(OutOfMemoryPolicy oomPolicy)
Define the memory allocator out of memory policy.Default is
OutOfMemoryPolicy.FallbackToHeap
- Parameters:
oomPolicy
- the "out-of-memory" policy for the memory allocator- Returns:
- configuration object.
-
getAllocatorLeakDetectionPolicy
public LeakDetectionPolicy getAllocatorLeakDetectionPolicy()
Return the configured leak detection policy for the allocator.
-
setAllocatorLeakDetectionPolicy
public T setAllocatorLeakDetectionPolicy(LeakDetectionPolicy leakDetectionPolicy)
Enable the leak detection for the allocator.Default is
LeakDetectionPolicy.Disabled
- Parameters:
leakDetectionPolicy
- the leak detection policy for the memory allocator- Returns:
- configuration object.
-
setExitOnOutOfMemory
public T setExitOnOutOfMemory(boolean exitOnOutOfMemory)
-
exitOnOutOfMemory
public boolean exitOnOutOfMemory()
-
isBusyWaitEnabled
public boolean isBusyWaitEnabled()
Return whether the busy-wait is enabled for BookKeeper and Netty IO threads.Default is false
- Returns:
- the value of the option
-
setBusyWaitEnabled
public T setBusyWaitEnabled(boolean busyWaitEnabled)
Option to enable busy-wait settings.Default is false.
WARNING: This option will enable spin-waiting on executors and IO threads in order to reduce latency during context switches. The spinning will consume 100% CPU even when bookie is not doing any work. It is recommended to reduce the number of threads in the main workers pool (
ClientConfiguration.setNumWorkerThreads(int)
) and Netty event loopClientConfiguration.setNumIOThreads(int)
to only have few CPU cores busy.- Parameters:
busyWaitEnabled
- if enabled, use spin-waiting strategy to reduce latency in context switches- See Also:
isBusyWaitEnabled()
-
getLimitStatsLogging
public boolean getLimitStatsLogging()
Return the flag indicating whether to limit stats logging.- Returns:
- the boolean flag indicating whether to limit stats logging
-
setLimitStatsLogging
public T setLimitStatsLogging(boolean limitStatsLogging)
Sets flag to limit the stats logging.- Parameters:
limitStatsLogging
- flag to limit the stats logging.- Returns:
- configuration.
-
getReplicationRateByBytes
public int getReplicationRateByBytes()
Get the bytes rate of re-replication. Default value is -1 which it means entries will replicated without any throttling activity.- Returns:
- bytes rate of re-replication.
-
setReplicationRateByBytes
public T setReplicationRateByBytes(int rate)
Set the bytes rate of re-replication.- Parameters:
rate
- bytes rate of re-replication.- Returns:
- ClientConfiguration
-
getZkReplicationTaskRateLimit
public double getZkReplicationTaskRateLimit()
get the max tasks can be acquired per second of re-replication.- Returns:
- max tasks can be acquired per second of re-replication.
-
setZkReplicationTaskRateLimit
public T setZkReplicationTaskRateLimit(double zkReplicationTaskRateLimit)
set the max tasks can be acquired per second of re-replication, default is 0, which means no limit. Value greater than 0 will enable the rate limiting. Decimal value is allowed. For example, 0.5 means 1 task per 2 seconds, 1 means 1 task per second.- Parameters:
zkReplicationTaskRateLimit
-- Returns:
- ClientConfiguration
-
getThis
protected abstract T getThis()
Trickery to allow inheritance with fluent style.
-
asJson
public java.lang.String asJson() throws JsonUtil.ParseJsonException
returns the string representation of json format of this config.- Returns:
- Throws:
JsonUtil.ParseJsonException
-
-