Welcome to Qi-U Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
339 views
in Technique[技术] by (71.8m points)

DolphinDB在数据节点上创建database时报错:need 2 datanodes, found 1

使用DolphinDB搭建了三个控制节点的高可用集群,集群信息如下:

物理机1:controller1,agent1,datanode1,datanode2
物理机2:controller2
物理机3:controller3

我用GUI连上了控制节点1,执行下述代码:

n=1000000
date=rand(2018.08.01..2018.08.03,n)
sym=rand(`AAPL`MS`C`YHOO,n)
qty=rand(1..1000,n)
price=rand(100.0,n)
t=table(date,sym,qty,price)
if(existsDatabase("dfs://db1")){
    dropDatabase("dfs://db1")
}
db=database("dfs://db1",VALUE,2018.08.01..2018.08.03)
trades=db.createPartitionedTable(t,`trades,`date).append!(t)

出现如下错误:

2020.10.18 21:20:14.965: executing code ...
db = database("dfs://db1", VALUE, 2018.08.01 .. 2018.08.03) => 
RemoteRun[controller1] openChunks failed to find enough datanodes for write, need 2 datanodes, found 1

请问怎么回事?


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

Please log in or register to answer this question.

1 Answer

0 votes
by (71.8m points)

请问群集的下面2个配置项是怎么配的?
dfsReplicationFactor:每个表数据块的所有副本数。集群的默认副本数是2,单节点的默认副本数为1。
dfsReplicaReliabilityLevel:多个副本是否可以在同一个物理服务器上。0表示可以;1表示不可以;2表示在资源允许情况下,副本优先部署在多台物理服务器。默认值是0。


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to Qi-U Community for programmer and developer-Open, Learning and Share
...