我有两个关于如何在点击室切碎的问题。
Q1。是否有必要使用分布式引擎在clickhouse中进行切分?
Q2。我想知道是否可以根据我设定的标准进行切分,而不是按照碎片的重量自动分配。
Example.
- If id is 1, it is stored in shard1.
- If id is 2, it is stored in shard2.
- If id is 3, it is stored in shard3.
I understand the sharding through the distribution engine as follows.
- distrib
当分割现有的集合时,我会得到一个错误。你能帮帮我吗?
这是我的错误
{"t":{"$date":"2020-11-23T15:11:05.331+07:00"}
,"s":"I", "c":"MIGRATE"
, "id":23893
, "ctx":"MoveChunk"
,"msg":"MigrationCoordinator delivering decision to self and to re
我使用以下命令运行命令对集合进行碎片处理
sh.shardCollection("db.collection_name",{"_id":"hashed"})
我得到了以下错误
{
"ok" : 0.0,
"errmsg" : "Please create an index that starts with the proposed shard key before sharding the collection",
"code" : 72,
"
关于这个我有两个问题。
创建一个全局实例并在每个线程中重用,还是在每个线程中创建一个新实例?
使用
pool = redis.ConnectionPool(host='localhost',port=6379,db=0)
R= redis.Redis(connection_pool=pool)
或
R= redis.StrictRedis(host='localhost',port=6379,db=0)
关于ConnectionPool:You may choose to do this in order to implement client side
我知道这个问题太模糊了,所以我想增加一些关键数字,以便深入了解情况。
Size of each document size - 360KB
Total documents - 1.5 million
Document created/day - 2k
read intensive - YES
Availability requirement - HIGH
考虑到这些要求,这里是我认为应该是架构,但不太确定,请分享您的经验,并指出我的正确方向。
2 Linux Boxes (Ubuntu 11 each on a different rack setup for availability)
这是。我打算从命令行(如sbt clean test-only sharding.example.JobStreamRenderSpec )运行一个多jvm测试JobStreamRenderSpec,并得到一个错误-
[error] Expected ID character
[error] Not a valid command: sharding
[error] Expected project ID
[error] Expected configuration
[error] Expected ':' (if selecting a configuration)
[err