Caused by: org.elasticsearch.hadoop.EsHadoopIllegalArgumentException

spark 导入数据 到 es 的时候报错:Caused by: org.elasticsearch.hadoop.EsHadoopIllegalArgumentException: Cannot determine write shards for [index/type]; likely its format is incorrect (maybe it contains illegal characters?)

看了网上的 一些答案 和我的情况不太符合,我这里是因为index 无法分配 shard ,index 是red状态 ,重新创建索引后 再次设置 mapping,卧槽,,,,莫名其妙,,我发现只要一设置 mapping 索引就变成 red 状态。但是设置mapping的 返回状态是 true,正确的。 尝试了很多方法都没什么效果,最后我想是不是因为频繁删除,创建导致的问题,然后我 放下es 让他冷静一下,让它好好反思一下!!!果然成功了,虽然不知道其中的原理是什么,或者只是碰巧。希望知道的盆友能分享一哈。


猜你喜欢

转载自blog.csdn.net/dpnice/article/details/80272158