upgrade steps

3 solr instance :solr1/solr2/solr3

2 collection:collection_company/collection_user

 

original config[ATALINA_OPTS="-verbose:gc -Xms1024m -Xmx2048m -XX:+PrintGCDetails -Xloggc:logs/gc -DzkHost=192.168.3.30:2181,192.168.3.30:2281,192.168.3.30:2381 -DhostPort=8800 -DnumShards=1"]

1. upload new cofigs to ZooKeeper

2. upgrade solr1(current solr1 is master)

     shutdown solr1 (solr3 is recoverying when solr1 is down)

     upgrade solr1
     replase solr.war with new version /replace shared jars under SOLR_HOME/lib
     create core.properties in each collection and let the file empty
     config the startup params (make sure 1.load solr.xml from zookeeper 2.we have node_name needed params)

[CATALINA_OPTS="-verbose:gc -Xms1024m -Xmx1024m -XX:+PrintGCDetails -Xloggc:logs/gc -Dsolr.solrxml.location=zookeeper -Dhost=192.168.3.30 -DhostContext=solr1 -DzkHost=localhost:2181,localhost:2281,localhost:2381 -DhostPort=8800 -DnumShards=1"]


     remvoe solr.xml from SOLR_HOME of solr1

     startup solr1

3. upgrade solr3 (current solr2 is master)

    no recovery 

4. upgrade solr2(current solr2 is master)

   solr 3 is recovery

   restart solr2  when all the collections are active 

 

 

upgrade solr index

5.upgrade index of solr1(master)

   optimize collection_company

 

unload collection_user in  solr 3

java -cp /home/andy/work/servers/231/tomcat-solr/work/Catalina/localhost/solr1/WEB-INF/lib/lucene-core-4.6.0.jar    org.apache.lucene.index.IndexUpgrader -verbose    /solr/index/dir

[add core] for collection_user in the solr3

unload collection_user in  solr 1 and solr2

remove collection_user in the SOLR_HOME of solr1 and solr2

[add core] for collection_user in the solr1 and solr2

 

转载于:https://www.cnblogs.com/ukouryou/articles/3512309.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值