码迷,mamicode.com
首页 > 其他好文 > 详细

es某个分片受损或卡在INITIALIZING状态时解决办法

时间:2016-03-30 14:33:52      阅读:1953      评论:0      收藏:0      [点我收藏+]

标签:

参考这篇文章

 1 # OK last warning: you will probably lose data. Dont do this if you cant risk that.
 2 CLUSTER="test_gengmei"
 3 INDEX="gm_test"
 4 SHARD="0"
 5 
 6 # this is where the rpm dumped all the lucene jars
 7 cd /usr/share/elasticsearch/lib
 8 
 9 # run the tool. You may want to adapt the shard path 
10 java -cp lucene-core*.jar -ea:org.apache.lucene... org.apache.lucene.index.CheckIndex /data/elasticsearch/${CLUSTER}/nodes/0/indices/${INDEX}/${SHARD}/index/ -fix
11 
12 # go to wherever the translog of your problem shard is
13 cd /data/elasticsearch/${CLUSTER}/nodes/0/indices/${INDEX}/${SHARD}/translog
14 ls
15 # note the recovery file; now would be a good time to make a backup of this file because we will remove it
16 rm *
17 
18 sudo service elasticsearch stop
19 sudo service elasticsearch start

 

es某个分片受损或卡在INITIALIZING状态时解决办法

标签:

原文地址:http://www.cnblogs.com/jffifa/p/5336747.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!