记录一次代码错误,elastic search的INDEX需要使用小写字母
Posted 我的空中楼阁
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了记录一次代码错误,elastic search的INDEX需要使用小写字母相关的知识,希望对你有一定的参考价值。
Caused by: org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Cannot determine write shards for [CC-2017.01.24/compliance]; likely its format is incorrect (maybe it contains illegal characters?)
at org.elasticsearch.hadoop.util.Assert.isTrue(Assert.java:50)
at org.elasticsearch.hadoop.rest.RestService.initSingleIndex(RestService.java:439)
at org.elasticsearch.hadoop.rest.RestService.createWriter(RestService.java:400)
at org.elasticsearch.spark.rdd.EsRDDWriter.write(EsRDDWriter.scala:40)
at org.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:67)
at org.elasticsearch.spark.rdd.EsSpark$$anonfun$saveToEs$1.apply(EsSpark.scala:67)
at org.apache.spark.scheduler.ResultTask.runTask(ResultTask.scala:66)
at org.apache.spark.scheduler.Task.run(Task.scala:89)
at org.apache.spark.executor.Executor$TaskRunner.run(Executor.scala:213
原因是CC-,需要以小写字母开头。
以上是关于记录一次代码错误,elastic search的INDEX需要使用小写字母的主要内容,如果未能解决你的问题,请参考以下文章
AWS Firehose 到 Elastic Search - 将一条 Firehose 记录转换为多个 Elastic 条目
elastic search6.2.2 实现用户搜索记录查询(去重排序)
Cloudwatch 将日志记录到 Elastic Search 服务配置
search- elastic4s-search-query模式