DataNode Configuration

Configuration Description

KeywordParameter TypeDescriptionRequired
rolestringRole must be configured as "datanode"Yes
listenstringPort on which the data node starts TCP listening as a serverYes
localIPstringIP address selected by the data node as a serverNo
profstringPort used by the data node to provide HTTP interfaceYes
logDirstringPath to store debugging logsYes
logLevelstringDebug log level. Default is errorNo
raftHeartbeatstringPort used by RAFT to send heartbeat messages between nodesYes
raftReplicastringPort used by RAFT to send log messagesYes
raftDirstringPath to store RAFT debugging logs. Default is in the binary file startup pathNo
consulAddrstringAddress of the monitoring systemNo
exporterPortstringPort of the monitoring systemNo
masterAddrstring sliceAddress of the cluster managerYes
localIPstringIP address of the local machine. If this option is not specified, the IP address used for communication with the master is usedNo
zoneNamestringSpecify the zone. By default, it is assigned to the default zoneNo
diskReadIoccintLimit read concurrency io frequency per disk. No limit if less than or equal to 0No
diskReadFlowintLimit read io flow per disk. No limit if less than or equal to 0No
diskWriteIoccintLimit write concurrency io frequency per disk. No limit if less than or equal to 0No
diskWriteFlowintLimit write io flow per disk. No limit if less than or equal to 0No
disksstring sliceFormat: disk mount path:reserved space, reserved space configuration range [20G,50G]Yes
enableLogPanicHookbool(Experimental) Hook panic function to flush log before executing panicNo

Configuration Example

{
     "role": "datanode",
     "listen": "17310",
     "prof": "17320",
     "logDir": "/cfs/datanode/log",
     "logLevel": "info",
     "raftHeartbeat": "17330",
     "raftReplica": "17340",
     "raftDir": "/cfs/datanode/log",
     "consulAddr": "http://consul.prometheus-cfs.local",
     "exporterPort": 9502,
     "masterAddr": [
         "10.196.59.198:17010",
         "10.196.59.199:17010",
         "10.196.59.200:17010"
     ],
     "diskReadIocc": 0,
     "diskReadFlow": 0,
     "diskWriteIocc": 0,
     "diskWriteFlow": 0,
     "disks": [
         "/data0:10737418240",
         "/data1:10737418240"
     ]
}

Notes

  • The configuration options listen, raftHeartbeat, and raftReplica cannot be modified after the program is first configured and started.
  • The relevant configuration information is recorded in the constcfg file under the raftDir directory. If you need to force modification, you need to manually delete the file.
  • The above three configuration options are related to the registration information of the datanode in the master. If modified, the master will not be able to locate the datanode information before the modification.
Edit on GitHub