找不到嵌套字段的子映射器

时间:2018-06-29 07:59:49

标签: elasticsearch cassandra elassandra

我正在使用elassandra 5.5.0.18(Elasticsearch 5.5.0)。 2个节点集群,RF = 2。每个节点运行12 GB内存。

受影响的表:

CREATE TABLE device_by_id (
id uuid,
time timeuuid,
configuration map<text,text>,
description text,
comm_nr text,
tag text,
customer text,
type text,
notes text,
username text,
last_active timeuuid,
groups list<text>,
image blob,
status text,
PRIMARY KEY (id, time)
) WITH CLUSTERING ORDER BY (time desc);

每当我在配置字段中添加带有新键的新行时,插入会花费很长时间,有时甚至会失败

com.datastax.driver.core.exceptions.WriteTimeoutException: Cassandra timeout during SIMPLE write query at consistency QUORUM (2 replica were required but only 1 acknowledged the write)

在cassandra日志中,我看到以下条目:

2018-06-29 09:47:12,468 ERROR [MutationStage-1] org.elassandra.index.ElasticSecondaryIndex$Context.addField(ElasticSecondaryIndex.java:511) error while updating mapping
org.elasticsearch.ElasticsearchTimeoutException: blocking update timeout
        at org.elasticsearch.cluster.service.ClusterService$BlockingActionListener.waitForUpdate(ClusterService.java:2249)
        at org.elasticsearch.cluster.service.ClusterService.blockingMappingUpdate(ClusterService.java:2287)
        at org.elassandra.index.ElasticSecondaryIndex$Context.addField(ElasticSecondaryIndex.java:504)
        at org.elassandra.index.ElasticSecondaryIndex$ImmutableMappingInfo$RowcumentIndexer$Rowcument.buildContext(ElasticSecondaryIndex.java:1978)
        at org.elassandra.index.ElasticSecondaryIndex$ImmutableMappingInfo$WideRowcumentIndexer$WideRowcument.buildContext(ElasticSecondaryIndex.java:1407)
        at org.elassandra.index.ElasticSecondaryIndex$ImmutableMappingInfo$RowcumentIndexer$Rowcument.index(ElasticSecondaryIndex.java:2052)
        at org.elassandra.index.ElasticSecondaryIndex$ImmutableMappingInfo$RowcumentIndexer$Rowcument.index(ElasticSecondaryIndex.java:2036)
        at org.elassandra.index.ElasticSecondaryIndex$ImmutableMappingInfo$WideRowcumentIndexer$WideRowcument.index(ElasticSecondaryIndex.java:1407)
        at org.elassandra.index.ElasticSecondaryIndex$ImmutableMappingInfo$WideRowcumentIndexer.flush(ElasticSecondaryIndex.java:1496)
        at org.elassandra.index.ElasticSecondaryIndex$ImmutableMappingInfo$RowcumentIndexer.finish(ElasticSecondaryIndex.java:1750)
        at org.apache.cassandra.index.SecondaryIndexManager$WriteTimeTransaction.commit(SecondaryIndexManager.java:983)
        at org.apache.cassandra.db.partitions.AtomicBTreePartition.addAllWithSizeDelta(AtomicBTreePartition.java:181)
        at org.apache.cassandra.db.Memtable.put(Memtable.java:282)
        at org.apache.cassandra.db.ColumnFamilyStore.apply(ColumnFamilyStore.java:1342)
        at org.apache.cassandra.db.Keyspace.applyInternal(Keyspace.java:631)
        at org.apache.cassandra.db.Keyspace.applyFuture(Keyspace.java:438)
        at org.apache.cassandra.db.Mutation.applyFuture(Mutation.java:222)
        at org.apache.cassandra.db.MutationVerbHandler.doVerb(MutationVerbHandler.java:68)
        at org.apache.cassandra.net.MessageDeliveryTask.run(MessageDeliveryTask.java:66)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$FutureTask.run(AbstractLocalAwareExecutorService.java:162)
        at org.apache.cassandra.concurrent.AbstractLocalAwareExecutorService$LocalSessionFutureTask.run(AbstractLocalAwareExecutorService.java:134)
        at org.apache.cassandra.concurrent.SEPWorker.run(SEPWorker.java:109)
        at java.lang.Thread.run(Thread.java:748)
2018-06-29 09:47:12,469 ERROR [MutationStage-1] org.elassandra.index.ElasticSecondaryIndex$Context.addField(ElasticSecondaryIndex.java:527) submapper not found for nested field [a]

(在此示例中,我尝试使用device_by_id.configuration = {“ a”:“ b”}

添加新行

有人可以告诉我,我在做什么错吗?

1 个答案:

答案 0 :(得分:0)

该异常的前言听起来很直白-它告诉您需要另一个副本。
尝试以下put request-当您当然将my_index更改为索引时:

PUT /my_index/_settings
{
    "index" : {
        "number_of_replicas" : 2
    }
}

获得更多相关的references