当前在3台机器上部署了clickhouse和zookeeper. 想要测试一个单一shard,多个replica的环境,即数据在后台在三台机器上复制. 其中metrika.xml的部分配置如下:
<clickhouse_remote_servers>
<test_cluster>
<shard>
<internal_replication>false</internal_replication>
<replica>
<host>10.172.10.10</host>
<port>9000</port>
<user>test</user>
<password>123456</password>
</replica>
<replica>
<host>10.172.10.20</host>
<port>9000</port>
<user>test</user>
<password>123456</password>
</replica>
<replica>
<host>10.172.10.30</host>
<port>9000</port>
<user>test</user>
<password>123456</password>
</replica>
</shard>
</test_cluster>
</clickhouse_remote_servers>
#这里没有写layer和shard应该也没有问题吧? <macros> <replica>zktest</replica> </macros>
现在有几个疑问: 创建表的语句中
CREATE TABLE test_table (TestDate Date,Year UInt16) ENGINE = ReplicatedMergeTree(’/clickhouse/tables/test_table’,‘zktest’,TestDate,(Year, TestDate),8192) 第一个参数中的路径,是自动生成还是手动创建? 第二个参数,每个节点上的metrika配置中,macros都必须不一样吗?
使用以上配置,在节点1上插入数据的时候,后台节点2的 zookeeper报错: 2018-01-26 16:08:55,056 [myid:2] - INFO [ProcessThread(sid:2 cport:-1)::PrepRequestProcessor@849] - Got user-level KeeperException when processing sessionid:0x361303486440002 type:delete cxid:0x5a6ae15c zxid:0x2700000147 txntype:-1 reqpath:n/a Error Path:/clickhouse/tables/test_table/temp/abandonable_lock-0000000005 Error:KeeperErrorCode = NoNode for /clickhouse/tables/test_table/temp/abandonable_lock-0000000005
2018-01-26 16:08:55,065 [myid:2] - INFO [ProcessThread(sid:2 cport:-1)::PrepRequestProcessor@849] - Got user-level KeeperException when processing sessionid:0x361303486440002 type:setData cxid:0x5a6ae15e zxid:0x2700000148 txntype:-1 reqpath:n/a Error Path:/clickhouse/tables/test_table/block_numbers/201810/block-0000000005 Error:KeeperErrorCode = NoNode for /clickhouse/tables/test_table/block_numbers/201810/block-0000000005 在节点2未看到数据被复制.
请问是配置哪里出了问题吗?