我们正在使用elassandra(ElasticSearch和cassandra),并使用presto查询ElasticSearch索引。当我们使用\u count api获取索引计数时,每次都是正确的,但是当我们使用presto查询索引以找出计数时,它的变化如下所示:
select count(*) from elasticsearch.my_schema.idx
索引Map如下图所示:
{
"idx": {
"mappings": {
"my_table": {
"properties": {
"col1": {
"type": "keyword",
"cql_collection": "singleton",
"cql_partition_key": true,
"cql_primary_key_order": 0
},
"col2": {
"type": "keyword",
"cql_collection": "singleton"
}
}
}
}
}
}
presto配置:1)elasticsearch.properties
connector.name=elasticsearch
elasticsearch.table-description-directory=etc/elasticsearch/
elasticsearch.scroll-size=1000
elasticsearch.scroll-timeout=30s
# elasticsearch.request-timeout=2s
elasticsearch.max-request-retries=10
elasticsearch.max-request-retry-time=90s
elasticsearch.max-hits=200000000
2) etc/elasticsearch/table.json
{
"tableName": "my_table",
"schemaName": "my_schema",
"host": "10.XXX.XXX.XXX",
"port": "9300",
"clusterName": "my cluster",
"index": "idx",
"type": "my_table",
"columns": [
{
"name": "col1",
"type": "varchar",
"jsonPath": "col1",
"jsonType": "keyword"
},
{
"name": "col2",
"type": "varchar",
"jsonPath": "col2",
"jsonType": "keyword"
}
]
}
我们有三节点ElasticSearch集群(3节点ElasticSearch集群)。此特定索引的碎片3和复制1。版本:
Persto - 0.218
Elassandra - 6.2.3.21
Kibana - 6.2.3
请帮忙。
暂无答案!
目前还没有任何答案,快来回答吧!