public class ServerConfiguration extends AbstractConfiguration
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 |
|---|
ServerConfiguration()
Construct a default configuration object
|
ServerConfiguration(AbstractConfiguration conf)
Construct a configuration based on other configuration
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
getAllowLoopback()
Is the bookie allowed to use a loopback interface as its primary
interface(i.e.
|
long |
getAuditorPeriodicBookieCheckInterval()
Get the interval between auditor bookie check runs.
|
long |
getAuditorPeriodicCheckInterval()
Get the regularity at which the auditor checks all ledgers.
|
int |
getBookiePort()
Get bookie port that bookie server listen on
|
int |
getCompactionMaxOutstandingRequests()
Get the maximum number of entries which can be compacted without flushing.
|
int |
getCompactionRate()
Get the rate of compaction adds.
|
int |
getDeathWatchInterval()
Get bookie death watch interval
|
int |
getDiskCheckInterval()
Get the disk checker interval
|
float |
getDiskUsageThreshold()
Returns disk free space threshold.
|
long |
getEntryLogSizeLimit()
Get entry logger size limitation
|
int |
getFlushInterval()
Get flush interval
|
long |
getGcWaitTime()
Get Garbage collection wait time
|
File |
getJournalDir()
Get dir to store journal files
|
String |
getJournalDirName()
Get dir name to store journal files
|
String[] |
getLedgerDirNames()
Get dir names to store ledger data
|
File[] |
getLedgerDirs()
Get dirs that stores ledger data
|
String |
getListeningInterface()
Get the network interface that the bookie should
listen for connections on.
|
long |
getMajorCompactionInterval()
Get interval to run major compaction, in seconds.
|
double |
getMajorCompactionThreshold()
Get threshold of major compaction.
|
int |
getMaxBackupJournals()
Max number of older journal files kept
|
long |
getMaxJournalSize()
Max journal file size
|
long |
getMinorCompactionInterval()
Get interval to run minor compaction, in seconds.
|
double |
getMinorCompactionThreshold()
Get threshold of minor compaction.
|
int |
getOpenFileLimit()
Get open file limit
|
long |
getOpenLedgerRereplicationGracePeriod()
Get the grace period which the rereplication worker to wait before
fencing and rereplicating a ledger fragment which is still being written
to, on bookie failure.
|
int |
getPageLimit()
Get limitation number of index pages in ledger cache
|
int |
getPageSize()
Get page size
|
boolean |
getServerTcpNoDelay()
Is tcp connection no delay.
|
String |
getZkServers()
Get zookeeper servers to connect
|
int |
getZkTimeout()
Get zookeeper timeout
|
boolean |
isAutoRecoveryDaemonEnabled()
Get whether the Bookie itself can start auto-recovery service also or not
|
boolean |
isReadOnlyModeEnabled()
Get whether read-only mode is enabled.
|
boolean |
isStatisticsEnabled()
Is statistics enabled
|
ServerConfiguration |
setAllowLoopback(boolean allow)
Configure the bookie to allow loopback interfaces to be used
as the primary bookie interface.
|
void |
setAuditorPeriodicBookieCheckInterval(long interval)
Set the interval between auditor bookie checks.
|
void |
setAuditorPeriodicCheckInterval(long interval)
Set the regularity at which the auditor will run a check
of all ledgers.
|
ServerConfiguration |
setAutoRecoveryDaemonEnabled(boolean enabled)
Sets that whether the auto-recovery service can start along with Bookie
server itself or not
|
ServerConfiguration |
setBookiePort(int port)
Set new bookie port that bookie server listen on
|
ServerConfiguration |
setCompactionMaxOutstandingRequests(int maxOutstandingRequests)
Set the maximum number of entries which can be compacted without flushing.
|
ServerConfiguration |
setCompactionRate(int rate)
Set the rate of compaction adds.
|
ServerConfiguration |
setDiskCheckInterval(int interval)
Set the disk checker interval to monitor ledger disk space
|
ServerConfiguration |
setDiskUsageThreshold(float threshold)
Set the Disk free space threshold as a fraction of the total
after which disk will be considered as full during disk check.
|
ServerConfiguration |
setEntryLogSizeLimit(long logSizeLimit)
Set entry logger size limitation
|
ServerConfiguration |
setFlushInterval(int flushInterval)
Set flush interval
|
ServerConfiguration |
setGcWaitTime(long gcWaitTime)
Set garbage collection wait time
|
ServerConfiguration |
setJournalDirName(String journalDir)
Set dir name to store journal files
|
ServerConfiguration |
setLedgerDirNames(String[] ledgerDirs)
Set dir names to store ledger data
|
ServerConfiguration |
setListeningInterface(String iface)
Set the network interface that the bookie should listen on.
|
ServerConfiguration |
setMajorCompactionInterval(long interval)
Set interval to run major compaction.
|
ServerConfiguration |
setMajorCompactionThreshold(double threshold)
Set threshold of major compaction.
|
ServerConfiguration |
setMaxBackupJournals(int maxBackupJournals)
Set max number of older journal files to kept
|
ServerConfiguration |
setMaxJournalSize(long maxJournalSize)
Set new max journal file size
|
ServerConfiguration |
setMinorCompactionInterval(long interval)
Set interval to run minor compaction
|
ServerConfiguration |
setMinorCompactionThreshold(double threshold)
Set threshold of minor compaction
|
ServerConfiguration |
setOpenFileLimit(int fileLimit)
Set limitation of number of open files.
|
void |
setOpenLedgerRereplicationGracePeriod(String waitTime)
Set the grace period which the rereplication worker will wait before
fencing and rereplicating a ledger fragment which is still being written
to, on bookie failure.
|
ServerConfiguration |
setPageLimit(int pageLimit)
Set limitation number of index pages in ledger cache.
|
ServerConfiguration |
setPageSize(int pageSize)
Set page size
|
ServerConfiguration |
setReadOnlyModeEnabled(boolean enabled)
Set whether the bookie is able to go into read-only mode.
|
ServerConfiguration |
setServerTcpNoDelay(boolean noDelay)
Set socket nodelay setting
|
ServerConfiguration |
setStatisticsEnabled(boolean enabled)
Turn on/off statistics
|
ServerConfiguration |
setZkServers(String zkServers)
Set zookeeper servers to connect
|
ServerConfiguration |
setZkTimeout(int zkTimeout)
Set zookeeper timeout
|
getLedgerManagerFactoryClass, getLedgerManagerType, getMetastoreImplClass, getMetastoreMaxEntriesPerScan, getRereplicationEntryBatchSize, getZkAvailableBookiesPath, getZkLedgersRootPath, loadConf, loadConf, loadConf, setLedgerManagerFactoryClass, setLedgerManagerFactoryClassName, setLedgerManagerType, setMetastoreImplClass, setMetastoreMaxEntriesPerScan, setRereplicationEntryBatchSize, setZkLedgersRootPathaddConfiguration, addPropertyDirect, clear, clearPropertyDirect, clone, containsKey, getConfiguration, getInMemoryConfiguration, getKeys, getKeys, getList, getNumberOfConfigurations, getProperty, getSource, getStringArray, isEmpty, removeConfiguration, setDelimiterParsingDisabled, setListDelimiteraddErrorLogListener, 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, subsetaddConfigurationListener, addErrorListener, clearConfigurationListeners, clearErrorListeners, createErrorEvent, createEvent, fireError, fireEvent, getConfigurationListeners, getErrorListeners, isDetailEvents, removeConfigurationListener, removeErrorListener, setDetailEventsprotected static final String ENTRY_LOG_SIZE_LIMIT
protected static final String MINOR_COMPACTION_INTERVAL
protected static final String MINOR_COMPACTION_THRESHOLD
protected static final String MAJOR_COMPACTION_INTERVAL
protected static final String MAJOR_COMPACTION_THRESHOLD
protected static final String COMPACTION_MAX_OUTSTANDING_REQUESTS
protected static final String COMPACTION_RATE
protected static final String GC_WAIT_TIME
protected static final String FLUSH_INTERVAL
protected static final String DEATH_WATCH_INTERVAL
protected static final String OPEN_FILE_LIMIT
protected static final String PAGE_LIMIT
protected static final String PAGE_SIZE
protected static final String MAX_JOURNAL_SIZE
protected static final String MAX_BACKUP_JOURNALS
protected static final String BOOKIE_PORT
protected static final String LISTENING_INTERFACE
protected static final String ALLOW_LOOPBACK
protected static final String JOURNAL_DIR
protected static final String LEDGER_DIRS
protected static final String SERVER_TCP_NODELAY
protected static final String ZK_TIMEOUT
protected static final String ZK_SERVERS
protected static final String ENABLE_STATISTICS
protected static final String OPEN_LEDGER_REREPLICATION_GRACE_PERIOD
protected static final String READ_ONLY_MODE_ENABLED
protected static final String DISK_USAGE_THRESHOLD
protected static final String DISK_CHECK_INTERVAL
protected static final String AUDITOR_PERIODIC_CHECK_INTERVAL
protected static final String AUDITOR_PERIODIC_BOOKIE_CHECK_INTERVAL
protected static final String AUTO_RECOVERY_DAEMON_ENABLED
public ServerConfiguration()
public ServerConfiguration(AbstractConfiguration conf)
conf - Other configurationpublic long getEntryLogSizeLimit()
public ServerConfiguration setEntryLogSizeLimit(long logSizeLimit)
logSizeLimit - new log size limitationpublic long getGcWaitTime()
public ServerConfiguration setGcWaitTime(long gcWaitTime)
gcWaitTime - gc wait timepublic int getFlushInterval()
public ServerConfiguration setFlushInterval(int flushInterval)
flushInterval - Flush Intervalpublic int getDeathWatchInterval()
public int getOpenFileLimit()
public ServerConfiguration setOpenFileLimit(int fileLimit)
fileLimit - Limitation of number of open files.public int getPageLimit()
public ServerConfiguration setPageLimit(int pageLimit)
pageLimit - Limitation of number of index pages in ledger cache.public int getPageSize()
public ServerConfiguration setPageSize(int pageSize)
pageSize - Page SizegetPageSize()public long getMaxJournalSize()
public ServerConfiguration setMaxJournalSize(long maxJournalSize)
maxJournalSize - new max journal file sizepublic int getMaxBackupJournals()
public ServerConfiguration setMaxBackupJournals(int maxBackupJournals)
maxBackupJournals - Max number of older journal filespublic int getBookiePort()
public ServerConfiguration setBookiePort(int port)
port - Port to listen onpublic String getListeningInterface()
public ServerConfiguration setListeningInterface(String iface)
iface - the interface to listen onpublic boolean getAllowLoopback()
setListeningInterface(String)public ServerConfiguration setAllowLoopback(boolean allow)
allow - whether to allow loopback interfacesgetAllowLoopback()public String getJournalDirName()
public ServerConfiguration setJournalDirName(String journalDir)
journalDir - Dir to store journal filespublic File getJournalDir()
public String[] getLedgerDirNames()
public ServerConfiguration setLedgerDirNames(String[] ledgerDirs)
ledgerDirs - Dir names to store ledger datapublic File[] getLedgerDirs()
public boolean getServerTcpNoDelay()
public ServerConfiguration setServerTcpNoDelay(boolean noDelay)
noDelay - NoDelay settingpublic String getZkServers()
public ServerConfiguration setZkServers(String zkServers)
zkServers - ZooKeeper servers to connectpublic int getZkTimeout()
public ServerConfiguration setZkTimeout(int zkTimeout)
zkTimeout - ZooKeeper server timeoutpublic boolean isStatisticsEnabled()
public ServerConfiguration setStatisticsEnabled(boolean enabled)
enabled - Whether statistics enabled or not.public double getMinorCompactionThreshold()
public ServerConfiguration setMinorCompactionThreshold(double threshold)
threshold - Threshold for minor compactiongetMinorCompactionThreshold()public double getMajorCompactionThreshold()
public ServerConfiguration setMajorCompactionThreshold(double threshold)
threshold - Threshold of major compactiongetMajorCompactionThreshold()public long getMinorCompactionInterval()
public ServerConfiguration setMinorCompactionInterval(long interval)
interval - Interval to run minor compactiongetMinorCompactionInterval()public long getMajorCompactionInterval()
public ServerConfiguration setMajorCompactionInterval(long interval)
interval - Interval to run major compactiongetMajorCompactionInterval()public void setOpenLedgerRereplicationGracePeriod(String waitTime)
waitTime - time to wait before replicating ledger fragmentBookKeeper.openLedger(long, org.apache.bookkeeper.client.BookKeeper.DigestType, byte[])public long getOpenLedgerRereplicationGracePeriod()
public ServerConfiguration setReadOnlyModeEnabled(boolean enabled)
enabled - whether to enable read-only mode.public boolean isReadOnlyModeEnabled()
public ServerConfiguration setDiskUsageThreshold(float threshold)
threshold - threshold to declare a disk fullpublic float getDiskUsageThreshold()
public ServerConfiguration setDiskCheckInterval(int interval)
interval - interval between disk checks for space.public int getDiskCheckInterval()
public void setAuditorPeriodicCheckInterval(long interval)
interval - The interval in seconds. e.g. 86400 = 1 day, 604800 = 1 weekpublic long getAuditorPeriodicCheckInterval()
public void setAuditorPeriodicBookieCheckInterval(long interval)
interval - The period in seconds.public long getAuditorPeriodicBookieCheckInterval()
setAuditorPeriodicBookieCheckInterval(long)public ServerConfiguration setAutoRecoveryDaemonEnabled(boolean enabled)
enabled - - true if need to start auto-recovery service. Otherwise
false.public boolean isAutoRecoveryDaemonEnabled()
public int getCompactionMaxOutstandingRequests()
public ServerConfiguration setCompactionMaxOutstandingRequests(int maxOutstandingRequests)
maxOutstandingRequests - number of entries to compact before flushingpublic int getCompactionRate()
public ServerConfiguration setCompactionRate(int rate)
rate - rate of compaction adds (adds per second)Copyright © 2011-2014 The Apache Software Foundation. All Rights Reserved.