Configs#
swordfish.toml serves as a system
configuration template that includes comments for common parameters.
You can refer to it to specify the actual working directory, host address,
port, initialization script, license path, and other settings for
system startup configuration.
################################################################################
[initial]
# home: the home directory.
# The current working directory (pwd) is used as the home directory by default.
# home =
# host: the host address.
# 0.0.0.0 is used as the host address by default.
# host = "0.0.0.0"
# port: if not specified, a random port is used.
# port =
# init: the file executed when the system starts.
# The default file is {package install dir}/asset/dolphindb.dos.
# init =
# license: the path of the license file.
# The license.lic file in the home directory is used by default.
# license =
# marketHolidayDir: the directory storing market holiday files.
# The default directory is {package install dir}/asset/marketHoliday.
# marketHolidayDir =
# moduleDir: the directory storing custom modules.
# The default directory is {package install dir}/asset/modules.
# moduleDir =
## tzdb: the directory storing timezone database files.
# For Windows, the default directory is {package install dir}/asset/tzdb.
# For Linux, the system's built-in timezone database files are used.
# tzdb =
################################################################################
[logging]
# stdoutLog: whether to write logs to standard output.
# 0: writes to dolphindb.log only
# 1 (default): writes to stdout only
# 2: writes to both stdout and dolphindb.log
# stdoutLog = 1
# logFile: the path of the log file.
# The parameter is available only when stdoutLog = 0 or 2.
# The default path is {home}/dolphindb.log.
# logFile = "dolphindb.log"
# logLevel: the log level.
# Valid values: "DEBUG", "INFO", "WARN", "ERROR"
# Default value: "ERROR"
# logLevel = "ERROR"
# logRetentionTime: the amount of time (in days) to keep a log file.
# logRetentionTime =
# maxLogSize: the maximum size (in MB) of a log file.
# The default value is 1024 and the minimum value is 100.
# maxLogSize =
################################################################################
[network]
# maxConnections: the maximum number of connections to the local node.
# maxConnections =
# tcpNodelay: whether to enable the TCP_NODELAY socket option.
# False (default): disable the option.
# True: enable the option.
# tcpNoDelay =
# tcpUserTimeout: set the socket option TCP_USER_TIMEOUT.
# The default value is 300000.
# tcpUserTimeout = 300000
################################################################################
[behavior]
# decimalRoundingMode: the rounding mode for the DECIMAL type.
# "trunc" (default): the decimal part is truncated.
# "round": the decimal part is rounded.
# decimalRoundingMode = "trunc"
# ignoreSpecialCharacterInPartitionId: whether to ignore ":" and ".".
# False (default): treats ":" and "." in partitioning columns as valid.
# True: skips ":" and "." in partitioning columns.
# ignoreSpecialCharacterInPartitionId = False
# logicOrIgnoreNull: whether to ignore NULL values in logical OR.
# False (default): returns NULL if any operand is NULL.
# True: returns NULL only if both operands are NULL.
# logicOrIgnoreNull = False
# nullAsMinValueForComparison: whether to treat NULL as minimum for comparision.
# True (default): NULL is treated as minimum in data comparsion.
# False: the result of comparison involving NULL values is NULL.
# nullAsMinValueForComparison = True
# parseDecimalAsFloatingNumber: whether to parse decimals to DOUBLE or DECIMAL64.
# True (default): decimals are parsed to DOUBLE floating-pointing numbers.
# False: decimals are parsed to DECIMAL64 fixed-point numbers.
# parseDecimalAsFloatingNumber = True
# removeSpecialCharInColumnName: whether to normalize column names.
# False (default): column names can include special chars (except underscores)
# or start without letters.
# True: column names are normalized.
# removeSpecialCharInColumnName = False
################################################################################
[caching]
# OLAPCacheEngineSize: the capacity (in GB) of the cache engine.
# Data is written to disk only when cached data exceeds 30% of OLAPCacheEngineSize.
# The default value is 0.5.
# To enable the cache engine, set OLAPCacheEngineSize > 0 and dataSync = 1.
# OLAPCacheEngineSize = 0.5
# TSDBCacheEngineSize: the capacity (in GB) of the TSDB cache engine.
# The default value is 1.
# TSDBCacheEngineSize = 1
################################################################################
[concurrency]
# workerNum: the size of worker pool for regular interactive jobs.
# The default value is the number of CPU cores.
# workerNum =
################################################################################
[resource]
# dataSync: whether to force DB logs to persist to disk before transaction commit.
# 1 (default): the redo logs, data, and metadata are forced to persist to disk.
# 0: the operating system will decide when to write the log files to disk.
# dataSync = 1
# maxBlockSizeForReservedMemory: the max memory block (in KB) allocated
# for each memory request when the available memory is less than reservedMemSize.
# The default value is 64.
# maxBlockSizeForReservedMemory = 64
# maxMemSize: the max memory (in GB) allocated to Swordfish.
# The default value is 0, indicating no limits on memory usage.
# maxMemSize = 0
# regularArrayMemoryLimit: the limit on the max memory (in MB) of a regular array.
# The value must be a power of 2.
# The default value is 2048 (MB).
# regularArrayMemoryLimit =
# reservedMemSize: If available memory < reservedMemSize (in GB),
# Swordfish limits each allocation to maxBlockSizeForReservedMemory.
# The default value is 5% * maxMemSize.
# The size must be between 64MB and 1GB.
# reservedMemSize =
# warningMemSize: If memory usage exceeds warningMemSize (in GB),
# the cache of some databases will be cleared up to avoid OOM exceptions.
# The default value is 20.
# warningMemSize = 20
# maxPartitionNumPerQuery: The max number of partitions that a query can search.
# The default value is 65536.
# maxPartitionNumPerQuery = 65536
# memLimitOfAllTempResults: The memory limit (in GB) for all temporary results.
# The default value is 20% * maxMemSize.
# memLimitOfAllTempResults =
# memLimitOfQueryResult: The memory limit for a query result.
# The default value is min(50% * maxMemSize, 8G).
# The value must be smaller than 80% * maxMemSize.
# memLimitOfQueryResult =
# memLimitOfTaskGroupResult: the memory limit of a task group sent from the current node.
# The default value is min(20% * maxMemSize, 2G).
# The value must be smaller than 50% * maxMemSize.
# memLimitOfTaskGroupResult =
# tempResultsSpillDir: the dir storing temp results when exceeding memory limits.
# The default value is <HomeDir>/tempResults.
# tempResultsSpillDir =
################################################################################
[storage]
# newValuePartitionPolicy: how to handle data outside of existing VALUE partitions.
# "add": VALUE partitions are created to add all data.
# "skip": out-of-scope data is ignored.
# "fail": an exception is thrown if out-of-scope data is included.
# newValuePartitionPolicy =
################################################################################
[streaming]
# maxPubConnections: the max subscriber nodes that the publisher node can connect to.
# The default value is 64.
# maxPubConnections = 64
# maxSubConnections: the max publisher nodes that the subscriber node can connect to.
# The default value is 64.
# maxSubConnections = 64
# maxSubQueueDepth: the max records of a message queue on the subscriber node.
# The default value is 10,000,000.
# maxSubQueueDepth = 10000000
# persistenceDir: the directory where shared stream tables are persisted to.
# The default value is <HomeDir>/persistenceDir.
# persistenceDir =
# subExecutors: the number of message processing threads in the subscriber node.
# The default value is 8.
# subExecutors = 8
# subThrottle: the interval (in ms) at which the system checks whether the
# throttle parameter in the subscribe function has been reached.
# The default value is 1000.
# subThrottle = 1000
A class that manages various configuration settings. |
|
A descriptor for managing configuration values. |
|
A descriptor for handling static configuration values. |