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
disksstring sliceFormat: disk mount path:reserved space, reserved space configuration range [20G,50G]Yes
diskCurrentLoadDpLimitintThe max count of data partition on a disk that current loadNo
diskCurrentStopDpLimitintThe max count of data partition on a disk that current stopNo

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"
     ],
     "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