Elassandra 6.2.3.12无法创建映射

时间:2019-03-28 07:48:55

标签: elasticsearch cassandra elassandra

我无法在elassandra 6.2.3.12上创建索引

受影响的表:

CREATE TABLE devices (
    id uuid,
    comm_nr text,
    configuration map<text,text>,
    customer text,
    description text,
    groups list<text>,
    last_active_nanoseconds bigint,
    location uuid,
    notes text,
    picture text,
    status text,
    tag text,
    thumbnail text,
    "type" text,
    "users" list<text>,
    PRIMARY KEY (id)
)

当我尝试为该表创建ES索引时,由于在system.log中出现这些错误而失败

  

2019-03-26 21:58:43,974信息[elasticsearch [10.164.0.22] [通用] [T#4]] CassandraShardStateListener.java:59 afterIndexShardStarted分片[devices] [0]开始于2019-03-26 21 :58:43,975 INFO [elasticsearch [10.164.0.22] [generic] [T#4]] ElasticSecondaryIndex.java:2545 startRebuildIfNeeded开始构建辅助iot_data.devices.elastic_devices_idx 2019-03-26 21:58:44,002 INFO [elasticsearch [10.164 .0.22] [generic] [T#4]] SecondaryIndexManager.java:571 buildIndexesBlocking为BigTableReader中的数据提交elastic_devices_idx的索引构建(路径='/ var / lib / cassandra / data / iot_data / devices-c4a249f04ff611e9ba438dba5fe3507f / mc-1- big-Data.db')2019-03-26 21:58:44,010信息[CompactionExecutor:74] ElasticSecondaryIndex.java:490 addField更新映射= {“设备”:{“属性”:{“配置”:{“类型“:”嵌套“,” cql_struct“:”地图“,” cql_collection“:”单个“,”属性“:{” size“:{” type“:”关键字“}}}}}}} 2019-03-26 21:58:44,046信息[elasticsearch [10.164.0.22] [masterService#updateTask] [T#1]]卡萨ndraDiscovery.java:920发布CQL SchemaChanges = [UPDATE TABLE iot_data.devices,UPDATED TABLE elastic_admin.metadata] 2019-03-26 21:59:14,041 INFO [elasticsearch [10.164.0.22] [masterService#updateTask] [T#1] ] CassandraDiscovery.java:964发布提交状态[6d18bf5c-32df-4815-bf06-e565cc71ac9b / 7]带有待处理节点的超时= [{10.164.0.22} {6d18bf5c-32df-4815-bf06-e565cc71ac9b} {6d18bf5c-32 -bf06-e565cc71ac9b} {10.164.0.22} {10.164.0.22:9300} {ALIVE} {rack = rack1,dc = datacenter-prod-1}] 2019-03-26 21:59:14,042警告[elasticsearch [10.164。 0.22] [masterService#updateTask] [T#1]] MasterService.java:583 warnAboutSlowTaskIfNeeded集群状态更新任务[put-mapping [devices]]花费了[30s]高于警告阈值30s 2019-03-26 21:59: 14,042错误[CompactionExecutor:74] ElasticSecondaryIndex.java:499 addField在更新映射org.elasticsearch.ElasticsearchTimeoutException时出错:在org.elasticsearch.cluster.service.ClusterService $ BlockingActionListener.waitForUp处阻止更新超时org.elassandra.index.ElasticSecondaryIndex.addField(ElasticSecondaryIndex.java:492)上org.elassandra.index.ElasticSecondaryIndex.addField(ElasticSecondaryIndex.java:492)上org.elasticsearch.cluster.service.ClusterService.blockingMappingUpdate(ClusterService.java:689)上的date(ClusterService.java:640) .ElasticSecondaryIndex $ ImmutableMappingInfo $ RowcumentIndexer $ Rowcument.buildContext(ElasticSecondaryIndex.java:2192)在org.elassandra.index.ElasticSecondaryIndex $ ImmutableMappingInfo $ SkinnyRowcumentIndexer $ SkinnyRowcuable.org.Easy。 org.elassandra.index.ElasticSecondaryIndex $ ImmutableMappingInfo $ RowcumentIndexer $ Rowcument.index(ElasticSecondaryIndex.java:2262)的$ RowcumentIndexer $ Rowcument.index(ElasticSecondaryIndex.java:2285)在org.elassandra.indexMappingS $ .index(ElasticSecondaryIndex.java:1738)在org.elassandra.index.ElasticSecondaryIndex $ ImmutableMappingInfo $ RowcumentIndex er。 org.elassandra.index.ElasticSecondaryIndex $ ImmutableMappingInfo $ RowcumentIndexer.finish(ElasticSecondaryIndex.java:1962)的ElasticSecondaryIndex.java:1779)org.apache.cassandra.index的java.lang.Iterable.forEach(Iterable.java:75)位于org.apache.cassandra.index.internal.Collat​​edViewIndexBuilder.build(Collat​​edViewIndexBuilder.java:139)的.SecondaryIndexManager.indexPartition(SecondaryIndexManager.java:1067)在org.apache.cassandra.db.compaction.CompactionManager $ 14.run(CompactionManager。 java.util.concurrent.Executors $ RunnableAdapter.call(Executors.java:511)的java:1637)java.util.concurrent.ThreadPoolExecutor.runWorker的java.util.concurrent.FutureTask.run(FutureTask.java:266) (线程池执行) or.java:1149),位于org.apache.cassandra.concurrent.NamedThreadFactory.lambda $ threadLocalDeallocator $ 0(NamedThreadFactory.java:81),位于java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)。 lang.Thread.run(Thread.java:748)2019-03-26 21:59:14,043错误[CompactExecutor:74] ElasticSecondaryIndex.java:516在索引[devices] 2019-中找不到嵌套字段[size]的addField子映射器03-26 21:59:14,044信息[CompactionExecutor:74] ElasticSecondaryIndex.java:490 addField更新映射= {“设备”:{“属性”:{“配置”:{“类型”:“嵌套”,“ cql_struct” ::“地图”,“ cql_collection”:“单身”,“属性”:{“压力”:{“类型”:“关键字”}}}}}} 2019-03-26 21:59:14,086信息[elasticsearch [ 10.164.0.22] [masterService#updateTask] [T#1]] CassandraDiscovery.java:920 publish CQL SchemaChanges = [UPDATED TABLE iot_data.devices,UPDATED TABLE elastic_admin.metadata] 2019-03-26 21:59:44,045错误[CompactionExecutor :74] ElasticSecondaryIndex.java:499 updat时出现addField错误ing映射org.elasticsearch.ElasticsearchTimeoutException:阻止更新超时

我认为错误的相关部分是:

  

ElasticSecondaryIndex.java:516找不到嵌套的addField子映射器   索引[设备]中的字段[大小] 2019-03-26 21:59:14,044信息   [CompactionExecutor:74] ElasticSecondaryIndex.java:490 addField   更新中   mapping = {“ devices”:{“ properties”:{“ configuration”:{“ type”:“ nested”,“ cql_struct”:“ map”,“ cql_collection”:“ singleton”,“ properties”:{“ pressure” :{“ type”:“关键字”}}}}}}

很显然,它无法为地图的键找到正确的子映射器。但是,为什么以及如何解决此问题-特别是随着地图的增长并包含新的关键字?

然后该错误继续。从日志中,我看到它抱怨我的设备实体的“配置”字段。这是此字段的真实条目的示例:

{'datasource' : 'api', 'external_id' : '003011FADB4A', 'first_active_on' : '01-03-2019', 'pressure' : '12S', 'size' : '35'}

当我添加忽略“配置”列的映射时,没有错误。 我在做什么错了?

0 个答案:

没有答案