public class ServerConfiguration extends AbstractConfiguration
Modifier and Type | Field and Description |
---|---|
protected static String |
BOOKIE_PORT |
protected static String |
DEATH_WATCH_INTERVAL |
protected static String |
ENABLE_STATISTICS |
protected static String |
ENTRY_LOG_SIZE_LIMIT |
protected static String |
FLUSH_INTERVAL |
protected static String |
GC_WAIT_TIME |
protected static String |
JOURNAL_DIR |
protected static String |
LEDGER_DIRS |
protected static String |
MAJOR_COMPACTION_INTERVAL |
protected static String |
MAJOR_COMPACTION_THRESHOLD |
protected static String |
MAX_BACKUP_JOURNALS |
protected static String |
MAX_JOURNAL_SIZE |
protected static String |
MINOR_COMPACTION_INTERVAL |
protected static String |
MINOR_COMPACTION_THRESHOLD |
protected static String |
OPEN_FILE_LIMIT |
protected static String |
PAGE_LIMIT |
protected static String |
PAGE_SIZE |
protected static String |
SERVER_TCP_NODELAY |
protected static String |
ZK_SERVERS |
protected static String |
ZK_TIMEOUT |
AVAILABLE_NODE, LEDGER_MANAGER_TYPE, 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 |
---|---|
int |
getBookiePort()
Get bookie port that bookie server listen on
|
int |
getDeathWatchInterval()
Get bookie death watch interval
|
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
|
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
|
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 |
isStatisticsEnabled()
Is statistics enabled
|
ServerConfiguration |
setBookiePort(int port)
Set new bookie port that bookie server listen on
|
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 |
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.
|
ServerConfiguration |
setPageLimit(int pageLimit)
Set limitation number of index pages in ledger cache.
|
ServerConfiguration |
setPageSize(int pageSize)
Set page size
|
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
|
getLedgerManagerType, getZkAvailableBookiesPath, getZkLedgersRootPath, loadConf, loadConf, setLedgerManagerType, 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 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 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 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
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 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()
Copyright © 2014 The Apache Software Foundation. All Rights Reserved.