有人可以指出以下请求中的错误导致mapperparsingexception吗?
curl -XPUT 'http://HOST:PORT/_river/cassandra-river/_meta' -d '{
"type" : "cassandra",
"cassandra" : {
"connection" :
{
"hosts" : "172.20.1.51",
"data_centre" : "MyCluster",
"username" : "cass",
"password" : "cass"
},
"sync" :
{
"batch_size" : 20000,
"schedule" : "0 0/15 * * * ?"
},
"keyspaces" :
[
{
"name" : "keyspacequeue",
"column_families" :
[
{
"name" : "deliveryqueue",
"primary_key" : "column_family_primary_key",
"index" :
{
"name" : "russia",
"type" : "moscow"
},
"columns" :
[
{
"name" : "queuename",
"type" : "text"
"raw": "true"
}
]
}
]
}
]
}
}'
[2015-05-14 04:57:07,354][DEBUG][river ] [Solo] creating river [cassandra][cassandra-river]
[2015-05-14 04:57:07,382][DEBUG][com.blu.es.cassandra.CassandraRiver] Parsing connection data
[2015-05-14 04:57:07,398][DEBUG][river.cluster ] [Solo] processing [reroute_rivers_node_changed]: execute
[2015-05-14 04:57:07,398][DEBUG][river.cluster ] [Solo] processing [reroute_rivers_node_changed]: no change in cluster_state
[2015-05-14 04:57:07,501][DEBUG][com.datastax.driver.core.Cluster] Starting new cluster with contact points [/172.20.1.51]
[2015-05-14 04:57:07,783][DEBUG][com.datastax.driver.core.ControlConnection] [Control connection] Refreshing node list and token map
[2015-05-14 04:57:07,832][DEBUG][com.datastax.driver.core.ControlConnection] [Control connection] Refreshing schema
[2015-05-14 04:57:07,926][DEBUG][com.datastax.driver.core.ControlConnection] [Control connection] Successfully connected to /172.20.1.51
[2015-05-14 04:57:07,926][INFO ][com.blu.es.cassandra.CassandraFactory] Connected to cluster: MyCluster
[2015-05-14 04:57:07,926][INFO ][com.blu.es.cassandra.CassandraFactory] Datacenter: test; Host: 172.20.1.51; Rack: 1
[2015-05-14 04:57:07,926][DEBUG][com.blu.es.cassandra.CassandraRiver] Parsing keyspace data
[2015-05-14 04:57:07,926][DEBUG][com.blu.es.cassandra.CassandraRiver] Parsing sync data
[2015-05-14 04:57:07,926][INFO ][com.blu.es.cassandra.CassandraRiver] Starting Cassandra River
[2015-05-14 04:57:07,959][INFO ][org.quartz.impl.StdSchedulerFactory] Using default implementation for ThreadExecutor
[2015-05-14 04:57:07,962][INFO ][org.quartz.simpl.SimpleThreadPool] Job execution threads will use class loader of thread: elasticsearch[Solo][listener][T#1]
[2015-05-14 04:57:07,978][INFO ][org.quartz.core.SchedulerSignalerImpl] Initialized Scheduler Signaller of type: class org.quartz.core.SchedulerSignalerImpl
[2015-05-14 04:57:07,979][INFO ][org.quartz.core.QuartzScheduler] Quartz Scheduler v.2.2.1 created.
[2015-05-14 04:57:07,980][INFO ][org.quartz.simpl.RAMJobStore] RAMJobStore initialized.
[2015-05-14 04:57:07,980][INFO ][org.quartz.core.QuartzScheduler] Scheduler meta-data: Quartz Scheduler (v2.2.1) 'DefaultQuartzScheduler' with instanceId 'NON_CLUSTERED'
Scheduler class: 'org.quartz.core.QuartzScheduler' - running locally.
NOT STARTED.
Currently in standby mode.
Number of jobs executed: 0
Using thread pool 'org.quartz.simpl.SimpleThreadPool' - with 10 threads.
Using job-store 'org.quartz.simpl.RAMJobStore' - which does not support persistence. and is not clustered.
[2015-05-14 04:57:07,981][INFO ][org.quartz.impl.StdSchedulerFactory] Quartz scheduler 'DefaultQuartzScheduler' initialized from default resource file in Quartz package: 'quartz.properties'
[2015-05-14 04:57:07,981][INFO ][org.quartz.impl.StdSchedulerFactory] Quartz scheduler version: 2.2.1
[2015-05-14 04:57:07,981][INFO ][org.quartz.core.QuartzScheduler] Scheduler DefaultQuartzScheduler_$_NON_CLUSTERED started.
[2015-05-14 04:57:07,981][DEBUG][org.quartz.core.QuartzSchedulerThread] batch acquisition of 0 triggers
[2015-05-14 04:57:07,981][INFO ][com.blu.es.cassandra.CassandraRiver] Defining keyspacequeue keyspace
[2015-05-14 04:57:07,982][INFO ][com.blu.es.cassandra.CassandraRiver] Creating deliveryqueue column family job
[2015-05-14 04:57:07,982][INFO ][com.blu.es.cassandra.CassandraRiver] creating moscow
[2015-05-14 04:57:07,983][INFO ][com.blu.es.cassandra.CassandraRiver] adding queuename
[2015-05-14 04:57:07,983][DEBUG][com.blu.es.cassandra.CassandraRiver] {"moscow":{"properties":{"queuename":{"type":"text","index":"analyzed","copy_to":"queuename.raw","fields":{"raw":{"type":"text","index":"not_analyzed"}}}}}}
[2015-05-14 04:57:07,983][DEBUG][cluster.service ] [Solo] processing [create-index [russia], cause [api]]: execute
[2015-05-14 04:57:07,984][DEBUG][indices ] [Solo] creating Index [russia], shards [1]/[0]
[2015-05-14 04:57:08,015][DEBUG][index.mapper ] [Solo] [russia] using dynamic[true], default mapping: default_mapping_location[null], loaded_from[jar:file:/opt/installables/elasticsearch-1.5.1/lib/elasticsearch-1.5.1.jar!/org/elasticsearch/index/mapper/default-mapping.json], default percolator mapping: location[null], loaded_from[null]
[2015-05-14 04:57:08,016][DEBUG][index.cache.query.parser.resident] [Solo] [russia] using [resident] query cache with max_size [100], expire [null]
[2015-05-14 04:57:08,017][DEBUG][index.store.fs ] [Solo] [russia] using index.store.throttle.type [node], with index.store.throttle.max_bytes_per_sec [0b]
[2015-05-14 04:57:08,019][DEBUG][indices ] [Solo] [russia] closing ... (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,019][DEBUG][indices ] [Solo] [russia] closing index service (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,019][DEBUG][indices ] [Solo] [russia] closing index cache (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,019][DEBUG][index.cache.filter.weighted] [Solo] [russia] full cache clear, reason [close]
[2015-05-14 04:57:08,019][DEBUG][index.cache.fixedbitset ] [Solo] [russia] clearing all bitsets because [close]
[2015-05-14 04:57:08,019][DEBUG][indices ] [Solo] [russia] clearing index field data (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,019][DEBUG][indices ] [Solo] [russia] closing analysis service (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,019][DEBUG][indices ] [Solo] [russia] closing index engine (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,019][DEBUG][indices ] [Solo] [russia] closing index gateway (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,019][DEBUG][indices ] [Solo] [russia] closing mapper service (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,020][DEBUG][indices ] [Solo] [russia] closing index query parser service (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,020][DEBUG][indices ] [Solo] [russia] closing index service (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,020][DEBUG][indices ] [Solo] [russia] closed... (reason [failed on parsing mappings on index creation])
[2015-05-14 04:57:08,020][DEBUG][action.admin.indices.create] [Solo] [russia] failed to create
org.elasticsearch.index.mapper.MapperParsingException: mapping [moscow]
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:395)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:365)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:188)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:158)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.index.mapper.MapperParsingException: No handler for type [text] declared on field [queuename]
at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseProperties(ObjectMapper.java:288)
at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseObjectOrDocumentTypeProperties(ObjectMapper.java:214)
at org.elasticsearch.index.mapper.object.RootObjectMapper$TypeParser.parse(RootObjectMapper.java:136)
at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:211)
at org.elasticsearch.index.mapper.DocumentMapperParser.parseCompressed(DocumentMapperParser.java:192)
at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:434)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:307)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:392)
... 6 more
[2015-05-14 04:57:08,023][WARN ][river ] [Solo] failed to create river [cassandra][cassandra-river]
org.elasticsearch.index.mapper.MapperParsingException: mapping [moscow]
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:395)
at org.elasticsearch.cluster.service.InternalClusterService$UpdateTask.run(InternalClusterService.java:365)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.runAndClean(PrioritizedEsThreadPoolExecutor.java:188)
at org.elasticsearch.common.util.concurrent.PrioritizedEsThreadPoolExecutor$TieBreakingPrioritizedRunnable.run(PrioritizedEsThreadPoolExecutor.java:158)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.index.mapper.MapperParsingException: No handler for type [text] declared on field [queuename]
at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseProperties(ObjectMapper.java:288)
at org.elasticsearch.index.mapper.object.ObjectMapper$TypeParser.parseObjectOrDocumentTypeProperties(ObjectMapper.java:214)
at org.elasticsearch.index.mapper.object.RootObjectMapper$TypeParser.parse(RootObjectMapper.java:136)
at org.elasticsearch.index.mapper.DocumentMapperParser.parse(DocumentMapperParser.java:211)
at org.elasticsearch.index.mapper.DocumentMapperParser.parseCompressed(DocumentMapperParser.java:192)
at org.elasticsearch.index.mapper.MapperService.parse(MapperService.java:434)
at org.elasticsearch.index.mapper.MapperService.merge(MapperService.java:307)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService$2.execute(MetaDataCreateIndexService.java:392)
... 6 more
[2015-05-14 04:57:08,027][DEBUG][cluster.service ] [Solo] processing [update-mapping [_river][cassandra-river] / node [TwYO8dnHScqYAbN2PWJJ0w], order [2]]: execute
[2015-05-14 04:57:08,033][DEBUG][cluster.metadata ] [Solo] [_river] update_mapping [cassandra-river] (dynamic) with source [{"cassandra-river":{"properties":{"cassandra":{"properties":{"connection":{"properties":{"data_centre":{"type":"string"},"hosts":{"type":"string"},"password":{"type":"string"},"username":{"type":"string"}}},"keyspaces":{"properties":{"column_families":{"properties":{"columns":{"properties":{"name":{"type":"string"},"raw":{"type":"string"},"type":{"type":"string"}}},"index":{"properties":{"name":{"type":"string"},"type":{"type":"string"}}},"name":{"type":"string"},"primary_key":{"type":"string"}}},"name":{"type":"string"}}},"sync":{"properties":{"batch_size":{"type":"long"},"schedule":{"type":"string"}}}}},"error":{"type":"string"},"node":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"transport_address":{"type":"string"}}},"type":{"type":"string"}}}}]
[2015-05-14 04:57:08,033][DEBUG][cluster.service ] [Solo] cluster state updated, version [6], source [update-mapping [_river][cassandra-river] / node [TwYO8dnHScqYAbN2PWJJ0w], order [2]]
[2015-05-14 04:57:08,034][DEBUG][cluster.service ] [Solo] publishing cluster state version 6
[2015-05-14 04:57:08,034][DEBUG][cluster.service ] [Solo] set local cluster state to version 6
[2015-05-14 04:57:08,034][DEBUG][river.cluster ] [Solo] processing [reroute_rivers_node_changed]: execute
[2015-05-14 04:57:08,035][DEBUG][river.cluster ] [Solo] processing [reroute_rivers_node_changed]: no change in cluster_state
[2015-05-14 04:57:08,045][DEBUG][cluster.service ] [Solo] processing [update-mapping [_river][cassandra-river] / node [TwYO8dnHScqYAbN2PWJJ0w], order [2]]: done applying updated cluster_state (version: 6)
[2015-05-14 04:57:08,045][DEBUG][cluster.action.index ] [Solo] successfully updated master with mapping update: index [_river], indexUUID [pnpkM4elR_KPrIRCu6oV7w], type [cassandra-river] and source [{"cassandra-river":{"properties":{"cassandra":{"properties":{"connection":{"properties":{"data_centre":{"type":"string"},"hosts":{"type":"string"},"password":{"type":"string"},"username":{"type":"string"}}},"keyspaces":{"properties":{"column_families":{"properties":{"columns":{"properties":{"name":{"type":"string"},"raw":{"type":"string"},"type":{"type":"string"}}},"index":{"properties":{"name":{"type":"string"},"type":{"type":"string"}}},"name":{"type":"string"},"primary_key":{"type":"string"}}},"name":{"type":"string"}}},"sync":{"properties":{"batch_size":{"type":"long"},"schedule":{"type":"string"}}}}},"error":{"type":"string"},"node":{"properties":{"id":{"type":"string"},"name":{"type":"string"},"transport_address":{"type":"string"}}},"type":{"type":"string"}}}}]
[2015-05-14 04:57:08,979][DEBUG][org.quartz.utils.UpdateChecker] Checking for available updated version of Quartz...
答案 0 :(得分:3)
堆栈跟踪中的相关错误在这里
Caused by: org.elasticsearch.index.mapper.MapperParsingException: No handler for type [text] declared on field [queuename]
这意味着您的columns
定义几乎正确但不完整,type
应为string
而不是text
:
...
"columns" :
[
{
"name" : "queuename",
"type" : "string"
"raw": "true"
}
]
...