Getting Started
Configuration
Configure the cluster as follows:
controller.cfg (configuration file for the controller): Set the port number to 8900 and enable performance monitoring
mode=controller
logFile=ctl.log
localSite=localhost:8900:ctl8900
perfMonitoring=1
agent.cfg (configuration file for the agent): Set the port number to 8988 and specify the controller as 8900
mode=agent
localSite=localhost:8988:agent
controllerSite=localhost:8900:ctl8900
cluster.nodes (configuration file for the cluster): Set the port number of agent to 8988 and specify four data nodes (port number 8811-8814)
localSite,mode
localhost:8988:agent,agent
localhost:8811:DFS_NODE1,datanode
localhost:8812:DFS_NODE2,datanode
localhost:8813:DFS_NODE3,datanode
localhost:8814:DFS_NODE4,datanode
You can modify the number and port number of agent and data nodes in a cluster according to your environment.
Launch
Start the controller
Open a command line window, and run the following script to start the controller:
dolphindb.exe -mode controller -home data -script config/dolphindb.dos -config config/controller.cfg -logFile log/controller.log -nodesFile config/nodes.cfg -clusterConfig config/cluster.cfg
Linux interative mode:
./dolphindb -mode controller -home data -config config/controller.cfg -clusterConfig config/cluster.cfg -logFile log/controller.log -nodesFile config/cluster.nodes
Linux background:
nohup ./dolphindb -console 0 -mode controller -home data -config config/controller.cfg -clusterConfig config/cluster.cfg -logFile log/controller.log -nodesFile config/cluster.nodes &
Start the agent
Open another command line window, and run the following script to start the agent:
Windows:
dolphindb.exe -mode agent -home data -script config/dolphindb.dos -config config/agent.cfg -logFile log/agent.log
Linux interative mode:
./dolphindb -mode agent -home data -config config/agent.cfg -logFile log/agent.log
Linux background:
nohup ./dolphindb -console 0 -mode agent -home data -config config/agent.cfg -logFile log/agent.log &
Start the data nodes
To launch the cluster manager, enter
The controller is running but the data nodes are not running. To turn on the data nodes, click on the checkbox to the left of “Mode” on the performance monitoring panel, click on ▶ and select “OK”. Now click 🔄, and we can see all the data nodes have been turned on.
We can also turn on individual data nodes selectively by clicking on the checkbox to the left of “datanode” instead of the checkbox to the left of “Mode” before clicking on ▶.
To stop all or some of the data nodes, make corresponding selections, and then click on ⏹.