public abstract class AbstractConfiguration<T extends AbstractConfiguration>
extends org.apache.commons.configuration.CompositeConfiguration
Modifier and Type | Field and Description |
---|---|
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 org.apache.bookkeeper.util.EntryFormatter> |
DEFAULT_ENTRY_FORMATTER |
protected static java.lang.Class<? extends org.apache.bookkeeper.util.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 |
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 |
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 |
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 to
SSLEngine.setEnabledCipherSuites(java.lang.String[]) . |
protected static java.lang.String |
TLS_ENABLED_PROTOCOLS
This list will be passed to
SSLEngine.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_REQUEST_RATE_LIMIT |
protected static java.lang.String |
ZK_SERVERS |
protected static java.lang.String |
ZK_TIMEOUT |
Modifier | Constructor and Description |
---|---|
protected |
AbstractConfiguration() |
Modifier and Type | Method and Description |
---|---|
java.lang.String |
asJson()
returns the string representation of json format of this config.
|
org.apache.bookkeeper.common.allocator.LeakDetectionPolicy |
getAllocatorLeakDetectionPolicy()
Return the configured leak detection policy for the allocator.
|
org.apache.bookkeeper.common.allocator.OutOfMemoryPolicy |
getAllocatorOutOfMemoryPolicy() |
int |
getAllocatorPoolingConcurrency() |
org.apache.bookkeeper.common.allocator.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 org.apache.bookkeeper.util.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 org.apache.bookkeeper.util.LedgerIdFormatter> |
getLedgerIdFormatterClass()
Get ledger id formatter class.
|
java.lang.Class<? extends org.apache.bookkeeper.meta.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 by
getLedgerManagerFactoryClass() |
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.
|
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 |
getZkRequestRateLimit()
Get zookeeper access request rate limit.
|
java.lang.String |
getZkServers()
Deprecated.
since 4.7.0
|
int |
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(org.apache.commons.configuration.CompositeConfiguration baseConf)
You can load configuration from other configuration.
|
void |
loadConf(java.net.URL confURL)
You can load configurations in precedence order.
|
T |
setAllocatorLeakDetectionPolicy(org.apache.bookkeeper.common.allocator.LeakDetectionPolicy leakDetectionPolicy)
Enable the leak detection for the allocator.
|
T |
setAllocatorOutOfMemoryPolicy(org.apache.bookkeeper.common.allocator.OutOfMemoryPolicy oomPolicy)
Define the memory allocator out of memory policy.
|
T |
setAllocatorPoolingConcurrenncy(int concurrency)
Controls the amount of concurrency for the memory pool.
|
T |
setAllocatorPoolingPolicy(org.apache.bookkeeper.common.allocator.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 busyWaitEanbled)
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 org.apache.bookkeeper.util.EntryFormatter> formatterClass)
Set entry formatter Class.
|
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 org.apache.bookkeeper.util.LedgerIdFormatter> formatterClass)
Set Ledger id formatter Class.
|
void |
setLedgerManagerFactoryClass(java.lang.Class<? extends org.apache.bookkeeper.meta.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)
|
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.
|
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.
|
void |
setZkRequestRateLimit(double rateLimit)
Set zookeeper access request rate limit.
|
T |
setZkServers(java.lang.String zkServers)
Deprecated.
|
T |
setZkTimeout(int zkTimeout)
Set zookeeper timeout.
|
addConfiguration, 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, isScalarValue, isThrowExceptionOnMissing, resolveContainerStore, setDefaultListDelimiter, setDelimiter, setLogger, setProperty, setThrowExceptionOnMissing, subset
addConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEvents
public static final java.lang.String READ_SYSTEM_PROPERTIES_PROPERTY
protected static final java.lang.ClassLoader DEFAULT_LOADER
protected static final java.lang.String ZK_TIMEOUT
protected static final java.lang.String ZK_SERVERS
protected static final java.lang.String LEDGER_MANAGER_TYPE
protected static final java.lang.String LEDGER_MANAGER_FACTORY_CLASS
protected static final java.lang.String ALLOW_SHADED_LEDGER_MANAGER_FACTORY_CLASS
protected static final java.lang.String SHADED_LEDGER_MANAGER_FACTORY_CLASS_PREFIX
protected static final java.lang.String METADATA_SERVICE_URI
protected static final java.lang.String ZK_LEDGERS_ROOT_PATH
protected static final java.lang.String ZK_REQUEST_RATE_LIMIT
protected static final java.lang.String AVAILABLE_NODE
protected static final java.lang.String REREPLICATION_ENTRY_BATCH_SIZE
protected static final java.lang.String STORE_SYSTEMTIME_AS_LEDGER_UNDERREPLICATED_MARK_TIME
protected static final java.lang.String STORE_SYSTEMTIME_AS_LEDGER_CREATION_TIME
protected static final java.lang.String ENABLE_BUSY_WAIT
protected static final java.lang.String METASTORE_IMPL_CLASS
protected static final java.lang.String METASTORE_MAX_ENTRIES_PER_SCAN
protected static final java.lang.String TLS_PROVIDER
protected static final java.lang.String TLS_PROVIDER_FACTORY_CLASS
protected static final java.lang.String LEDGERID_FORMATTER_CLASS
protected static final java.lang.String ENTRY_FORMATTER_CLASS
protected static final java.lang.String TLS_CLIENT_AUTHENTICATION
protected static final java.lang.String PRESERVE_MDC_FOR_TASK_EXECUTION
protected static final java.lang.Class<? extends org.apache.bookkeeper.util.EntryFormatter> DEFAULT_ENTRY_FORMATTER
protected static final java.lang.Class<? extends org.apache.bookkeeper.util.LedgerIdFormatter> DEFAULT_LEDGERID_FORMATTER
protected static final java.lang.String TLS_CERT_FILES_REFRESH_DURATION_SECONDS
protected static final java.lang.String TLS_ENABLED_CIPHER_SUITES
SSLEngine.setEnabledCipherSuites(java.lang.String[])
.
Please refer to official JDK JavaDocsprotected static final java.lang.String TLS_ENABLED_PROTOCOLS
SSLEngine.setEnabledProtocols(java.lang.String[])
.
Please refer to official JDK JavaDocsprotected static final java.lang.String TLS_KEYSTORE_TYPE
protected static final java.lang.String TLS_KEYSTORE
protected static final java.lang.String TLS_KEYSTORE_PASSWORD_PATH
protected static final java.lang.String TLS_TRUSTSTORE_TYPE
protected static final java.lang.String TLS_TRUSTSTORE
protected static final java.lang.String TLS_TRUSTSTORE_PASSWORD_PATH
protected static final java.lang.String TLS_CERTIFICATE_PATH
protected static final java.lang.String NETTY_MAX_FRAME_SIZE
protected static final int DEFAULT_NETTY_MAX_FRAME_SIZE
protected static final java.lang.String ZK_ENABLE_SECURITY
public static final java.lang.String LEDGER_MANAGER_FACTORY_DISABLE_CLASS_CHECK
public static final java.lang.String PERMITTED_STARTUP_USERS
public static final java.lang.String MIN_NUM_RACKS_PER_WRITE_QUORUM
public static final java.lang.String ENFORCE_MIN_NUM_RACKS_PER_WRITE_QUORUM
public static final java.lang.String ENFORCE_MIN_NUM_FAULT_DOMAINS_FOR_WRITE
public static final java.lang.String IGNORE_LOCAL_NODE_IN_PLACEMENT_POLICY
public static final java.lang.String MIN_NUM_ZONES_PER_WRITE_QUORUM
public static final java.lang.String DESIRED_NUM_ZONES_PER_WRITE_QUORUM
public static final java.lang.String ENFORCE_STRICT_ZONEAWARE_PLACEMENT
protected static final java.lang.String ALLOCATOR_POOLING_POLICY
protected static final java.lang.String ALLOCATOR_POOLING_CONCURRENCY
protected static final java.lang.String ALLOCATOR_OOM_POLICY
protected static final java.lang.String ALLOCATOR_LEAK_DETECTION_POLICY
public static final java.lang.String LIMIT_STATS_LOGGING
public void setPermittedStartupUsers(java.lang.String s)
public java.lang.String[] getPermittedStartupUsers()
public void loadConf(java.net.URL confURL) throws org.apache.commons.configuration.ConfigurationException
confURL
- Configuration URLorg.apache.commons.configuration.ConfigurationException
public void loadConf(org.apache.commons.configuration.CompositeConfiguration baseConf)
baseConf
- Other Configurationpublic java.lang.String getMetadataServiceUriUnchecked() throws UncheckedConfigurationException
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.
UncheckedConfigurationException
- if the metadata service uri is invalid.public java.lang.String getMetadataServiceUri() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
- if the metadata service uri is invalid.public T setMetadataServiceUri(java.lang.String serviceUri)
serviceUri
- the metadata service uri.@Deprecated public java.lang.String getZkServers()
`zkServers` is deprecating, in favor of using `metadataServiceUri`
@Deprecated public T setZkServers(java.lang.String zkServers)
`zkServers` is deprecating, in favor of using `metadataServiceUri`
zkServers
- ZooKeeper servers to connectpublic int getZkTimeout()
public T setZkTimeout(int zkTimeout)
zkTimeout
- ZooKeeper server timeout@Deprecated public void setLedgerManagerType(java.lang.String lmType)
setLedgerManagerFactoryClass(java.lang.Class<? extends org.apache.bookkeeper.meta.LedgerManagerFactory>)
lmType
- Ledger Manager Type@Deprecated public java.lang.String getLedgerManagerType()
getLedgerManagerFactoryClass()
public T setAllowShadedLedgerManagerFactoryClass(boolean allowed)
allowed
- the flag to allow/disallow using shaded ledger manager factory classpublic boolean isShadedLedgerManagerFactoryClassAllowed()
public T setShadedLedgerManagerFactoryClassPrefix(java.lang.String classPrefix)
This setting only takes effects when isShadedLedgerManagerFactoryClassAllowed()
returns true.
classPrefix
- the class prefix of shaded ledger manager factory classpublic java.lang.String getShadedLedgerManagerFactoryClassPrefix()
This setting only takes effects when isShadedLedgerManagerFactoryClassAllowed()
returns true
isShadedLedgerManagerFactoryClassAllowed()
public void setLedgerManagerFactoryClassName(java.lang.String factoryClassName)
factoryClassName
- Ledger Manager Factory Class Namepublic java.lang.String getLedgerManagerFactoryClassName()
public java.lang.String getLedgerManagerLayoutStringFromFactoryClass() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public void setLedgerManagerFactoryClass(java.lang.Class<? extends org.apache.bookkeeper.meta.LedgerManagerFactory> factoryClass)
factoryClass
- Ledger Manager Factory Classpublic java.lang.Class<? extends org.apache.bookkeeper.meta.LedgerManagerFactory> getLedgerManagerFactoryClass() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
@Deprecated public void setZkLedgersRootPath(java.lang.String zkLedgersPath)
zkLedgersPath
- zk ledgers root path@Deprecated public java.lang.String getZkLedgersRootPath()
public double getZkRequestRateLimit()
public void setZkRequestRateLimit(double rateLimit)
rateLimit
- zookeeper access request rate limit.public boolean isZkEnableSecurity()
public void setZkEnableSecurity(boolean zkEnableSecurity)
zkEnableSecurity
- @Deprecated public java.lang.String getZkAvailableBookiesPath()
public void setRereplicationEntryBatchSize(long rereplicationEntryBatchSize)
public long getRereplicationEntryBatchSize()
public java.lang.String getMetastoreImplClass()
public void setMetastoreImplClass(java.lang.String metastoreImplClass)
metastoreImplClass
- Metastore implementation Class name.public int getMetastoreMaxEntriesPerScan()
public void setMetastoreMaxEntriesPerScan(int maxEntries)
maxEntries
- Max entries per scan in metastore.public void setFeature(java.lang.String configProperty, Feature feature)
public void setLedgerIdFormatterClass(java.lang.Class<? extends org.apache.bookkeeper.util.LedgerIdFormatter> formatterClass)
formatterClass
- LedgerIdFormatter Classpublic java.lang.Class<? extends org.apache.bookkeeper.util.LedgerIdFormatter> getLedgerIdFormatterClass() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public void setEntryFormatterClass(java.lang.Class<? extends org.apache.bookkeeper.util.EntryFormatter> formatterClass)
formatterClass
- EntryFormatter Classpublic java.lang.Class<? extends org.apache.bookkeeper.util.EntryFormatter> getEntryFormatterClass() throws org.apache.commons.configuration.ConfigurationException
org.apache.commons.configuration.ConfigurationException
public T setClientAuthProviderFactoryClass(java.lang.String factoryClass)
factoryClass
- the client authentication provider factory class namepublic java.lang.String getClientAuthProviderFactoryClass()
public int getNettyMaxFrameSizeBytes()
public T setNettyMaxFrameSizeBytes(int maxSize)
maxSize
- the max size in bytespublic java.lang.String getTLSProviderFactoryClass()
public T setTLSProviderFactoryClass(java.lang.String factoryClass)
factoryClass
- the client security provider factory class namepublic java.lang.String getTLSProvider()
public T setTLSProvider(java.lang.String provider)
provider
- TLS Provider typepublic boolean getTLSClientAuthentication()
setTLSClientAuthentication(boolean)
public T setTLSClientAuthentication(boolean enabled)
enabled
- Whether to send a certificate or notpublic T setTLSCertFilesRefreshDurationSeconds(long certFilesRefreshSec)
certFilesRefreshSec
- tls certificate files refresh duration in seconds (set 0 to
disable auto refresh)public long getTLSCertFilesRefreshDurationSeconds()
public T setTLSEnabledCipherSuites(java.lang.String list)
SSLEngine.setEnabledCipherSuites(java.lang.String[])
. Please refer to official JDK JavaDocslist
- comma separated list of enabled TLS cipher suitespublic java.lang.String getTLSEnabledCipherSuites()
setTLSEnabledCipherSuites(java.lang.String)
public T setTLSEnabledProtocols(java.lang.String list)
SSLEngine.setEnabledProtocols(java.lang.String[])
. Please refer to official JDK JavaDocslist
- comma separated list of enabled TLS cipher suitespublic java.lang.String getTLSEnabledProtocols()
setTLSEnabledProtocols(java.lang.String)
public void setMinNumRacksPerWriteQuorum(int minNumRacksPerWriteQuorum)
public int getMinNumRacksPerWriteQuorum()
public void setMinNumZonesPerWriteQuorum(int minNumZonesPerWriteQuorum)
public int getMinNumZonesPerWriteQuorum()
public void setDesiredNumZonesPerWriteQuorum(int desiredNumZonesPerWriteQuorum)
public int getDesiredNumZonesPerWriteQuorum()
public void setEnforceStrictZoneawarePlacement(boolean enforceStrictZoneawarePlacement)
in ZoneawareEnsemblePlacementPolicy if strict placement is enabled then minZones/desiredZones in writeQuorum would be maintained otherwise it will pick nodes randomly.
public boolean getEnforceStrictZoneawarePlacement()
in ZoneawareEnsemblePlacementPolicy if strict placement is enabled then minZones/desiredZones in writeQuorum would be maintained otherwise it will pick nodes randomly.
public void setEnforceMinNumRacksPerWriteQuorum(boolean enforceMinNumRacksPerWriteQuorum)
public boolean getEnforceMinNumRacksPerWriteQuorum()
public void setEnforceMinNumFaultDomainsForWrite(boolean enforceMinNumFaultDomainsForWrite)
public boolean getEnforceMinNumFaultDomainsForWrite()
public void setIgnoreLocalNodeInPlacementPolicy(boolean ignoreLocalNodeInPlacementPolicy)
public boolean getIgnoreLocalNodeInPlacementPolicy()
public T setStoreSystemTimeAsLedgerUnderreplicatedMarkTime(boolean enabled)
If this is enabled, Auditor will write a ctime field into the underreplicated ledger znode.
enabled
- flag to enable/disable Auditor using system time as
underreplicated ledger mark time.public boolean getStoreSystemTimeAsLedgerUnderreplicatedMarkTime()
public boolean getPreserveMdcForTaskExecution()
public T setPreserveMdcForTaskExecution(boolean enabled)
enabled
- flag to enable/disable MDC preservation in Executor.public org.apache.bookkeeper.common.allocator.PoolingPolicy getAllocatorPoolingPolicy()
public T setAllocatorPoolingPolicy(org.apache.bookkeeper.common.allocator.PoolingPolicy poolingPolicy)
Default is PoolingPolicy.PooledDirect
poolingPolicy
- the memory pooling policypublic int getAllocatorPoolingConcurrency()
public T setAllocatorPoolingConcurrenncy(int concurrency)
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.
concurrency
- the concurrency level to use for the allocator poolpublic org.apache.bookkeeper.common.allocator.OutOfMemoryPolicy getAllocatorOutOfMemoryPolicy()
public T setAllocatorOutOfMemoryPolicy(org.apache.bookkeeper.common.allocator.OutOfMemoryPolicy oomPolicy)
Default is OutOfMemoryPolicy.FallbackToHeap
oomPolicy
- the "out-of-memory" policy for the memory allocatorpublic org.apache.bookkeeper.common.allocator.LeakDetectionPolicy getAllocatorLeakDetectionPolicy()
public T setAllocatorLeakDetectionPolicy(org.apache.bookkeeper.common.allocator.LeakDetectionPolicy leakDetectionPolicy)
Default is LeakDetectionPolicy.Disabled
leakDetectionPolicy
- the leak detection policy for the memory allocatorpublic boolean isBusyWaitEnabled()
Default is false
public T setBusyWaitEnabled(boolean busyWaitEanbled)
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
loop ClientConfiguration.setNumIOThreads(int)
to only have few
CPU cores busy.
busyWaitEanbled
- if enabled, use spin-waiting strategy to reduce latency in
context switchesisBusyWaitEnabled()
public boolean getLimitStatsLogging()
public T setLimitStatsLogging(boolean limitStatsLogging)
limitStatsLogging
- flag to limit the stats logging.protected abstract T getThis()
public java.lang.String asJson() throws org.apache.bookkeeper.common.util.JsonUtil.ParseJsonException
org.apache.bookkeeper.common.util.JsonUtil.ParseJsonException
Copyright © 2011–2020 The Apache Software Foundation. All rights reserved.