Skip to main content

Configuration Reference

This page describes the configuration layout used by the current main branch of Curvine. It is intentionally based on the actual config structs in curvine-common/src/conf/*.rs and the sample file etc/curvine-cluster.toml, rather than on older generated tables.

tip

Treat conf/curvine-cluster.toml as the runtime source of truth, and use this page as a map of the important sections and high-signal options. For the complete field list, check the config structs in the Curvine source tree.

Config Sources​

Curvine commonly uses these inputs together:

  • conf/curvine-cluster.toml: main cluster config
  • conf/curvine-env.sh: shell-side environment setup for scripts under bin/
  • conf/curvine-site.xml: Hadoop / Java client config

Important environment overrides:

VariablePurpose
CURVINE_CONF_FILEOverride the path to curvine-cluster.toml
CURVINE_MASTER_HOSTNAMEOverride the effective Master hostname
CURVINE_WORKER_HOSTNAMEOverride the effective Worker hostname
CURVINE_CLIENT_HOSTNAMEOverride the client hostname used for locality checks

Top-Level Layout​

The current ClusterConf contains these main sections:

SectionPurpose
top-level flagsformat_master, format_worker, testing, cluster_id
[master]Master RPC, web, metadata, TTL, quota, replication, locking
[journal]Raft / journal settings
[worker]Worker RPC, storage directories, replication, data path execution
[client]Rust client defaults, retries, read/write buffers, unified FS behavior
[fuse]FUSE mount and cache settings
[log]Global client / FUSE log settings
[s3_gateway]S3-compatible gateway settings
[job]Load-job lifecycle and concurrency settings
[cli]CLI log settings
warning

This page documents only the configuration sections that are part of the current published documentation surface.

Cluster-Level Flags​

FieldDefaultMeaning
format_mastertrueFormat Master metadata storage on startup
format_workertrueFormat Worker data storage on startup
testingfalseTest-only mode for internal test flows
cluster_idcurvineCluster identifier used in paths and service naming

In production, these format flags are usually set to false in the deployed TOML file.

[master]​

Important Master defaults from MasterConf:

FieldDefaultMeaning
hostnamelocalhostMaster hostname, can be overridden by CURVINE_MASTER_HOSTNAME
rpc_port8995Master RPC port
web_port9000Master web port
io_threads32Master I/O threads
io_timeout10mMaster network timeout
meta_dir<cwd>/fs-metaMetadata directory
retry_cache_enabletrueEnable retry cache for filesystem requests
retry_cache_size100000Retry cache capacity
retry_cache_ttl10mRetry cache TTL
block_report_limit1000Maximum block count per report
worker_policylocalWorker selection policy
heartbeat_interval3sWorker heartbeat interval
worker_check_interval10sInterval to check worker state
worker_blacklist_interval30sTime to blacklist unhealthy workers
worker_lost_interval10mTime to mark workers as lost
audit_logging_enabledtrueEnable audit logging
block_replication_enabledfalseEnable block replication management
block_replication_concurrency_limit1000Maximum concurrent replication tasks
block_replication_retry_interval5sReplication retry interval
ttl_checker_retry_attempts3TTL checker retry attempts
ttl_checker_interval1hTTL scan interval
ttl_bucket_interval1hTTL bucketing interval
ttl_max_retry_duration10mTTL retry max duration
ttl_retry_interval1sTTL retry interval
enable_quota_evictionfalseEnable quota-driven eviction
quota_eviction_modefreeQuota eviction mode
quota_eviction_policylruQuota eviction policy
quota_eviction_high_rate0.8High watermark
quota_eviction_low_rate0.6Low watermark
quota_eviction_scan_page2Scan page count
quota_eviction_capacity5000000Eviction scan capacity
lock_expire_time5mStale lock expiration
buffer_size128KBInternal buffer size

[master.rocksdb] exists as a nested section and controls metadata RocksDB behavior. The defaults are defined by MasterConf::rocksdb_default().

[journal]​

Important journal / Raft defaults from JournalConf:

FieldDefaultMeaning
enabletrueEnable Raft journal
group_nameraft-groupRaft group name
hostnamelocalhostLocal Raft hostname
rpc_port8996Raft RPC port
message_size200Raft RPC message size
writer_channel_size0Journal writer queue size
writer_flush_batch_size1000Journal flush batch size
writer_flush_batch_ms10Journal flush interval
snapshot_interval6hSnapshot interval
snapshot_entries1000000Entries between snapshots
conn_timeout_ms30000Connection timeout
io_timeout_ms60000I/O timeout
raft_tick_interval_ms1000Raft tick interval
raft_election_tick10Election ticks
raft_heartbeat_tick3Heartbeat ticks
raft_batch_size8Batch append size
raft_retry_cache_ttl10mRetry cache TTL
retain_checkpoint_num3Checkpoints to retain
ufs_copy_timeout20mTimeout for copying data to UFS

journal_addrs must contain the Raft peers, and the effective local Master hostname must match one of those entries.

[worker]​

Important Worker defaults from WorkerConf:

FieldDefaultMeaning
hostnamelocalhostWorker hostname, can be overridden by CURVINE_WORKER_HOSTNAME
rpc_port8997Worker RPC port
web_port9001Worker web port
dir_reserved0Reserved free space per data directory
data_dir[]Worker data directories
io_slow_threshold300msSlow I/O threshold
io_threads32Worker I/O threads
io_timeout10mWorker network timeout
scheduler_threads2Scheduler threads
executor_threads10Background executor threads
enable_splicefalseEnable splice optimization
enable_send_filetrueEnable sendfile optimization
pipe_buf_size64KBPipe buffer size
pipe_pool_max_cap2000Pipe pool max capacity
block_replication_concurrency_limit100Concurrent replication tasks
block_replication_chunk_size1MBReplication chunk size
enable_s3_gatewayfalseEnable colocated S3 gateway

The most important production field is usually data_dir, for example:

data_dir = [
"[SSD]/data/data1",
"[HDD]/data/data2"
]

[client]​

Important client defaults from ClientConf:

FieldDefaultMeaning
master_addrs[]If empty, derived from journal_addrs + Master RPC port
hostnamelocalhostClient hostname, can be overridden by CURVINE_CLIENT_HOSTNAME
replicas1Default replica count
block_size128MBDefault block size
write_chunk_size128KBWrite chunk size
read_chunk_size128KBRead chunk size
read_parallel1Base read parallelism
max_cache_block_handles10Max cached block handles
short_circuittrueEnable short-circuit path selection
storage_typediskDefault storage type
ttl_ms0Default TTL
ttl_actionnoneDefault TTL action
auto_cache_enabledfalseEnable automatic cache submission
auto_cache_ttl7dTTL for automatic cache
master_conn_pool_size1Master connection pool size
enable_read_aheadtrueEnable read-ahead
enable_unified_fstrueEnable unified filesystem view
enable_rust_read_ufstrueAllow direct UFS reads on cache miss
mount_update_ttl10sMount metadata refresh interval
enable_block_conn_pooltrueEnable block connection pool
block_conn_idle_size128Idle block connections retained
small_file_size4MBThreshold for small-file behavior
enable_smart_prefetchtrueEnable smart prefetch
large_file_size10GBLarge-file threshold
max_read_parallel8Maximum dynamic read parallelism
sequential_read_threshold7Sequential-read detection threshold

[fuse]​

Important FUSE defaults from FuseConf:

FieldDefaultMeaning
mnt_path/curvine-fuseMount path
fs_path/Visible Curvine root within the mount
mnt_number1Number of mount points
clone_fdtrueEnable clone-fd optimization
web_port9002FUSE web port
enable_meta_cachefalseEnable metadata cache
meta_cache_capacity100000Metadata cache capacity
meta_cache_ttl120sMetadata cache TTL
node_cache_size200000Node cache capacity
node_cache_timeout24hNode cache TTL
direct_iofalseEnable direct I/O
write_back_cachefalseEnable write-back cache
cache_readdirfalseCache readdir results
check_permissiontrueEnforce permission checks
list_limit1000Directory listing limit

[log], [cli], [job], [s3_gateway]​

Global [log]​

The top-level [log] section is the shared client/FUSE log config. In the sample config it commonly points to stdout, but it can also be redirected to files.

[cli]​

CliConf is intentionally small: it currently contains only log, and the default CLI log level is warn.

[job]​

Important job defaults from JobConf:

FieldDefault
job_life_ttl24h
job_cleanup_ttl10m
job_max_files100000
task_timeout1h
task_report_interval10s
worker_max_concurrent_tasks100

[s3_gateway]​

Important S3 gateway defaults from S3GatewayConf:

FieldDefault
listen0.0.0.0:9900
regionus-east-1
put_temp_dir/tmp/curvine-temp
put_memory_buffer_threshold1048576
put_max_memory_buffer16777216
enable_distributed_authfalse
cache_refresh_interval_secs30
get_chunk_size_mb1.0
web_port9003

Example Skeleton​

format_master = false
format_worker = false

[master]
meta_dir = "data/meta"

[journal]
journal_addrs = [
{ id = 1, hostname = "master1", port = 8996 },
{ id = 2, hostname = "master2", port = 8996 },
{ id = 3, hostname = "master3", port = 8996 },
]

[worker]
data_dir = ["[SSD]/data/data1"]

[client]
master_addrs = [
{ hostname = "master1", port = 8995 },
{ hostname = "master2", port = 8995 },
{ hostname = "master3", port = 8995 },
]

[fuse]
mnt_path = "/curvine-fuse"

[log]
log_dir = "stdout"

[cli]
log = { level = "warn", log_dir = "stdout", file_name = "cli.log" }