好贷网好贷款

solr学习第二课----solr安装部署

发布时间:2016-12-5 12:39:11 编辑:www.fx114.net 分享查询网我要评论
本篇文章主要介绍了"solr学习第二课----solr安装部署",主要涉及到solr学习第二课----solr安装部署方面的内容,对于solr学习第二课----solr安装部署感兴趣的同学可以参考一下。

目录: 1. Solr:solr-4.4.0 2. jdk:jdk-6u13-linux-i586  (由于solr采用4.4版本,所以jdk最低版本要求1.6) 3. tomcat:apache-tomcat-7.0.42.tar 4. 中文分词: IK Analyzer 2012FF_hf1 5. Slave环境通过复制Master来搭建 安装jdk及tomcat过程 其中需要配置tomcat最大链接数,可参考: <Connector port="9080" protocol="HTTP/1.1"                connectionTimeout="20000"                redirectPort="8443" maxThreads="1000" minSpareThreads="100" maxSpareThreads="200" acceptCount="1000" URIEncoding="UTF-8"/> minProcessors:最小空闲连接线程数,用于提高系统处理性能,默认值为10  maxProcessors:最大连接线程数,即:并发处理的最大请求数,默认值为75  acceptCount:允许的最大连接数,应大于等于maxProcessors,默认值为100  enableLookups:是否反查域名,取值为:true或false。为了提高处理能力,应设置为false  connectionTimeout: 网络连接超时,单位:毫秒。设置为0表示永不超时,这样设置有隐患的。通常可设置为30000毫秒。  其中和最大连接数相关的参数为maxProcessors和acceptCount。如果要加大并发连接数,应同时加大这两个参数。  web server允许的最大连接数还受制于操作系统的内核参数设置,通常Windows是2000个左右,Linux是1000个左右。  安装solr -------------------------------- 第一步:测试环境 服务器1(Master) 操作系统:      Centos 6.2 IP:            192.168.17.128:9080 JDK:           Sun JDK 1.6 Web服务器:     Apache Tomcat6 Solr版本:      Solr4.4.0 服务器2(Slave) 操作系统:      Centos 6.2 IP:            192.168.17.128:9081 JDK:           Sun JDK 1.6 Web服务器:     Apache Tomcat6 Solr版本:      Solr4.4.0 -------------------------------- 1. 拷贝solr.war到tomcat目录 #cp -rf solr-4.4.0/example/webapps/solr.war /usr/local/apache-tomcat-7.0.42/webapps/solr.war 2. 创建solr工作主目录 [[email protected] ~]# mkdir -p /home/solr/master/solr4server [[email protected] ~]# mkdir -p /home/solr/master/solr4home [[email protected] ~]# mkdir -p /home/solr/slave/solr4server [[email protected] ~]# mkdir -p /home/solr/slave/solr4home [[email protected] solr]# pwd /home/solr [[email protected] solr]# ll total 16 drwxr-xr-x. 2 root root 4096 Jan 27 20:14 solr4home drwxr-xr-x. 2 root root 4096 Jan 27 20:15 solr4home drwxr-xr-x. 2 root root 4096 Jan 27 20:14 solr4server drwxr-xr-x. 2 root root 4096 Jan 27 20:15 solr4server [[email protected] solr]# cp -a . /home/solr/master/solr4home/ [[email protected] solr]# cp -a . /home/solr/slave/solr4home/ [[email protected] local]# cd tomcat/ [[email protected] tomcat]# ll total 88 drwxr-xr-x. 2 root root  4096 Jan 27 01:35 bin drwxr-xr-x. 3 root root  4096 Jan 27 04:51 conf drwxr-xr-x. 2 root root  4096 Jan 27 01:35 lib -rw-r--r--. 1 root root 37951 Jan 27 01:35 LICENSE drwxr-xr-x. 2 root root  4096 Jan 27 04:51 logs -rw-r--r--. 1 root root   556 Jan 27 01:35 NOTICE -rw-r--r--. 1 root root  7317 Jan 27 01:35 RELEASE-NOTES -rw-r--r--. 1 root root  6368 Jan 27 01:35 RUNNING.txt drwxr-xr-x. 2 root root  4096 Jan 27 01:35 temp drwxr-xr-x. 7 root root  4096 Jan 27 01:35 webapps drwxr-xr-x. 3 root root  4096 Jan 27 04:51 work [[email protected] tomcat]# cp -R . /home/solr/master/solr4server/ 3. 配置solrhome [[email protected] bin]# vi /home/solr/master/solr4server_master/bin/catalina.sh # ----------------------------------------------------------------------------- # configure at 2014/2/14 at in catalina.sh export JAVA_HOME=/usr/local/jdk export SOLR_HOME=/home/solr/master export JAVA_OPTS="$JAVA_OPTS -server -Xmx1024m -Xms512m -Dsolr.solr.home=$SOLR_HOME/solr4home/" export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=$JAVA_HOME/lib export CATALINA_HOME=$SOLR_HOME/solr4server export CATALINA_BASE=$SOLR_HOME/solr4server 3. 拷贝solr启动的依赖文件 * 复制example/lib/ext目录中的jar包到项目的classpath下,可以将这些jar包放到%TOMCAT_HOME%/lib下, 也可以将它们放到项目的lib下(在我的电脑上是/webapps/solr/WEB-INF/lib); * example/resources/log4j.properties也拷到classpath(我在/solr_server/webapps/solr/目录下新建了一个classes目录, 放log4j.properties放了进去); 4. 配置好后可以直接启动tomcat [[email protected] bin]# pwd /home/solr/master/solr4server/bin [[email protected] bin]# ./startup.sh  5. 如果第三步没有执行这时会无法访问,solr4.4.0需要拷贝一些jar # cp solr-4.4.0/example/lib/ext/* /usr/local/apache-tomcat-7.0.42/webapps/solr/WEB-INF/lib/ # cp solr-4.4.0/example/resources/log4j.properties /usr/local/apache-tomcat-7.0.42/lib/ 6. 重启tomcat,访问URL http://10.248.12.135:9080/solr http://blog.csdn.net/natureice/article/details/9109351export JAVA_HOME=/usr/java/jdk1.6.0_38 export SOLR_HOME=/usr/local/solr/solr1 export JAVA_OPTS="$JAVA_OPTS -server -Xmx1024m -Xms512m -Dsolr.solr.home=$SOLR_HOME/solrhome/" export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=$JAVA_HOME/lib export CATALINA_HOME=$SOLR_HOME/tomcat export CATALINA_BASE=$SOLR_HOME/tomcat 7.查看启动过日志 错误信息 :  INFO  - 2014-02-16 11:50:04.751; org.apache.solr.handler.component.QueryElevationComponent; Loading QueryElevation from: /home/solr/master/solr4home/collection1/conf/elevate.xml Feb 16, 2014 11:50:10 AM org.apache.catalina.connector.Connector pause SEVERE: Protocol handler pause failed java.net.UnknownHostException: demoserver: demoserver         at java.net.InetAddress.getLocalHost(InetAddress.java:1402)         at org.apache.jk.common.ChannelSocket.unLockSocket(ChannelSocket.java:485)         at org.apache.jk.common.ChannelSocket.pause(ChannelSocket.java:284)         at org.apache.jk.server.JkMain.pause(JkMain.java:683)         at org.apache.jk.server.JkCoyoteHandler.pause(JkCoyoteHandler.java:153)         at org.apache.catalina.connector.Connector.pause(Connector.java:1073)         at org.apache.catalina.core.StandardService.stop(StandardService.java:563)         at org.apache.catalina.core.StandardServer.stop(StandardServer.java:744)         at org.apache.catalina.startup.Catalina.stop(Catalina.java:633)         at org.apache.catalina.startup.Catalina.start(Catalina.java:608)         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)         at java.lang.reflect.Method.invoke(Method.java:597)         at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:288)         at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:413) Feb 16, 2014 11:50:11 AM org.apache.catalina.core.StandardService stop INFO: Stopping service Catalina 解决方案:  That is related with  hostname and  /etc/hosts If /etc/hosts doesn't containt the definition of the hostname it fails.  Just add your hostname to /etc/hosts for example if your hostname is work add or modified the following line: 127.0.0.1   work        localhost 通过以上配置后ok。 访问solr服务 http://192.168.17.128:9080/solr/#/ 中文分词IK Analyzer 2012FF_hf1配置与安装 1. 下载IK+Analyzer+2012FF_hf1.zip分词的安装包 用到其中三个文件: IKAnalyzer2012FF_u1.jar,放到$CATALINA_HOME/webapps/solr/WEB-INF/lib/目录下 IKAnalyzer.cfg.xml,stopword.dic,放到$CATALINA_HOME/webapps/solr/WEB-INF/classes/目录下, 如果classes目录没有,可以手动创建一个。 2.将分词配置到solr的配置文件中 #vi /usr/local/solrhome/collection1/conf/schema.xml,添加如下内容: <fieldType name="text_ik" class="solr.TextField"> <analyzer class="org.wltea.analyzer.lucene.IKAnalyzer"/> </fieldType> 3.将需要建立索引的域添加到schema.xml中     <!-- self define field --> <field name="wareCode" type="string" indexed="true" stored="true"/> <field name="wareName" type="text_ik" indexed="true" stored="true"/> <field name="wareStatus" type="string" indexed="true" stored="true"/> <field name="openDate" type="date" indexed="true" stored="true"/> <field name="shopPrice" type="string" indexed="true" stored="true"/> <field name="marketPrice" type="string" indexed="true" stored="true"/> <field name="deliverType" type="string" indexed="true" stored="true"/> <field name="wareIntegralValue" type="long" indexed="true" stored="true"/> <field name="gCurValue" type="long" indexed="true" stored="true"/> <field name="mCurValue" type="long" indexed="true" stored="true"/> <field name="eCurValue" type="long" indexed="true" stored="true"/> <field name="isHtmlChannel" type="string" indexed="true" stored="true"/> <field name="isWapChannel" type="string" indexed="true" stored="true"/> <field name="isSearch" type="string" indexed="true" stored="true"/> <field name="sKind" type="long" indexed="true" stored="true"/> <field name="sName" type="string" indexed="true" stored="true"/> <field name="mKind" type="long" indexed="true" stored="true"/> <field name="mName" type="string" indexed="true" stored="true"/> 4.最后重启tomcat,查看分词效果             Slave环境通过复制Master来搭建        1. 复制Master中的服务和solrhome [[email protected] solr]# ll total 8 drwxr-xr-x. 4 root root 4096 Jan 29 14:17 master drwxr-xr-x. 2 root root 4096 Feb 16 15:07 slave [[email protected] solr]# cp -R master/* slave/ [[email protected] solr]# pwd /home/solr [[email protected] solr]# cd slave/ [[email protected] slave]# ll total 8 drwxr-xr-x. 4 root root 4096 Feb 16 15:08 solr4home drwxr-xr-x. 9 root root 4096 Feb 16 15:08 solr4server 2. 修改solr4server中的启动参数 [[email protected] bin]# vi catalina.sh  # configure solr slave 2014/2/14 at in catalina.sh export JAVA_HOME=/usr/local/jdk export SOLR_HOME=/home/solr/slave export JAVA_OPTS="$JAVA_OPTS -server -Xmx1024m -Xms512m -Dsolr.solr.home=$SOLR_HOME/solr4home/" export PATH=$PATH:$JAVA_HOME/bin export CLASSPATH=$JAVA_HOME/lib export CATALINA_HOME=$SOLR_HOME/solr4server export CATALINA_BASE=$SOLR_HOME/solr4server 3. 修改服务器的端口 [[email protected] conf]# pwd /home/solr/slave/solr4server/conf 编辑 server.xml ,修改port为从原来8080到9081 <Connector port="9081" protocol="HTTP/1.1" connectionTimeout="20000" redirectPort="8443" maxThreads="1000" minSpareThreads="100" maxSpareThreads="200" acceptCount="1000" URIEncoding="UTF-8"/>     编辑 server.xml ,修改port为从8005到9005 <Server port="9005" shutdown="SHUTDOWN"> 4. 主从复制搭建过程 第一步:修改主:solrconfig.xml文件(目前设置的同步周期为一分钟,具体可视生产环境的具体环境而定。) 在Master的配置文件中添加一个RequestHandler,RequestHandler是复制在Master端的主要手段,Slave会定期向这个RequestHandler发送请求,并完成索引文件的同步; Master负责写数据(Write_A)到从服务器中; replicateAfter说明什么时候进行复制,取值可以是startup, commit, optimize分别是创建索引、提交索引、优化索引之后。每当这些动作执行结束后,Slave就可以从Master上进行复制了; Write_A 作为Master,solrconfig.xml 找到<requestHandler name="/replication" ,修改前内容: <requestHandler name="/replication" class="solr.ReplicationHandler" >  <!--   To enable simple master/slave replication, uncomment one of the    sections below, depending on whether this solr instance should be   the "master" or a "slave".  If this instance is a "slave" you will    also need to fill in the masterUrl to point to a real machine. --> <!--   <lst name="master"> <str name="replicateAfter">commit</str> <str name="replicateAfter">startup</str> <str name="confFiles">schema.xml,stopwords.txt</str>   </lst> --> <!--   <lst name="slave"> <str name="masterUrl">http://your-master-hostname:8983/solr</str> <str name="pollInterval">00:00:60</str>   </lst> -->  </requestHandler> 修改后内容: <requestHandler name="/replication" class="solr.ReplicationHandler" > <lst name="master"> <!-- 当有新的索引被提交,标记新的索引和保存新索引的文件名 --> <str name="replicateAfter">commit</str> <!-- 当系统启动时,标记新的索引和保存新索引的文件名 --> <str name="replicateAfter">startup</str> <!-- 当索引优化时,标记新的索引和保存新索引的文件名,因为 commit,optimize 基本上是同时存在的,所以一般不用设置 optimize--> <!-- <str name="replicateAfter">optimize</str>--> <!-- 索引优化后创建一份备份索引,这个在复制过程中不需要设置 --> <!--<str name="backupAfter">optimize</str>--> <!-- 索引复制时,也同步从服务器的配置文件 solrconfig_slave.xml:solrconfig.xml 表示复制时,在slave端以solrconfig.xml进行保存,这样slave才能认识这个文件--> <str name="confFiles">solrconfig_slave.xml:solrconfig.xml,schema.xml,stopwords.txt,elevate.xml</str> <!-- 设置验证信息 --> <str name="httpBasicAuthUser">admin</str> <str name="httpBasicAuthPassword">123456</str> </lst> </requestHandler> 第二步:从solr 文件 Slave负责读数据(Read_B)到从服务器内容。 属性值是一个url,指向了Master服务器上的提供复制功能的requestHandler,  master_host:master服务器的IP或主机名  port:master服务器上部署solr应用的tomcat端口  solr:solr的web应用名称  corename: solr中的core,关于core的概念请参考相关文档。由于本案例中不涉及多个core,所以此处的url中可以去掉这项,也不对core进行过多的说明。  replaction: Master上提供复制的requestHandler名称,也就是requestHandler的name属性的取值。  <str name="pollInterval">00:00:20</str>是Slave定期检测Master的时间,格式是HH:mm:ss。这里配置的时间是20秒,因此Slave每个20秒会主动请求一次Master服务器,获得Master服务器上索引文件的状态,比如最后修改时间,文件尺寸等,如果与本机的索引文件不同就进行复制,实现同步。  Read_B 作为Slave,solrconfig.xml 找到<requestHandler name="/replication" ,配置如下: <requestHandler name="/replication" class="solr.ReplicationHandler" > <lst name="slave"> <!-- 主服务器的URL,core_1是配置了多核,如果不是多核,连接应该是 http://www.abc.com/solr/replication --> <!-- <str name="masterUrl">http://www.abc.com/solr/core_1/replication</str> --> <str name="masterUrl">http://192.168.17.128:9080/solr/replication</str> <!-- 1分钟同步一次 --> <str name="pollInterval">00:00:60</str> <!-- 压缩机制,来传输索引,可选 internal|external,internal表示内网,external表示外网 --> <str name="compression">internal</str> <!-- 设置超时时间 --> <str name="httpConnTimeout">5000</str> <str name="httpReadTimeout">10000</str> <!-- 设置验证信息,要和master 服务器配置一样 --> <str name="httpBasicAuthUser">admin</str> <str name="httpBasicAuthPassword">123456</str> </lst> </requestHandler> 关于主从复制搭建过程请继续关注后续课程。 第三步:索引复制后通过日志分析 INFO  - 2014-02-16 15:41:00.014; org.apache.solr.handler.SnapPuller; Master's generation: 2 INFO  - 2014-02-16 15:41:00.016; org.apache.solr.handler.SnapPuller; Slave's generation: 1 INFO  - 2014-02-16 15:41:00.016; org.apache.solr.handler.SnapPuller; Starting replication process INFO  - 2014-02-16 15:41:00.061; org.apache.solr.handler.SnapPuller; Number of files in latest index in master: 21 INFO  - 2014-02-16 15:41:00.063; org.apache.solr.core.CachingDirectoryFactory; return new directory for /home/solr/slave/solr4home/collection1/data/index.20140216154100062 INFO  - 2014-02-16 15:41:00.064; org.apache.solr.handler.SnapPuller; Starting download to NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index.20140216154100062 [email protected]; maxCacheMB=48.0 maxMergeSizeMB=4.0) fullCopy=false INFO  - 2014-02-16 15:41:07.641; org.apache.solr.handler.SnapPuller; Total time taken for download : 7 secs INFO  - 2014-02-16 15:41:07.665; org.apache.solr.update.DefaultSolrCoreState; Closing IndexWriter... INFO  - 2014-02-16 15:41:07.667; org.apache.solr.update.DefaultSolrCoreState; Waiting until IndexWriter is unused... core=collection1 INFO  - 2014-02-16 15:41:07.669; org.apache.solr.update.DefaultSolrCoreState; Creating new IndexWriter... INFO  - 2014-02-16 15:41:07.789; org.apache.solr.core.SolrDeletionPolicy; SolrDeletionPolicy.onInit: commits: num=2 commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index [email protected]; maxCacheMB=48.0 maxMergeSizeMB=4.0),segFN=segments_1,generation=1} commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index [email protected]; maxCacheMB=48.0 maxMergeSizeMB=4.0),segFN=segments_2,generation=2} INFO  - 2014-02-16 15:41:07.796; org.apache.solr.core.SolrDeletionPolicy; newest commit generation = 2 INFO  - 2014-02-16 15:41:07.799; org.apache.solr.update.DefaultSolrCoreState; New IndexWriter is ready to be used. INFO  - 2014-02-16 15:41:07.854; org.apache.solr.search.SolrIndexSearcher; Opening [email protected] main INFO  - 2014-02-16 15:41:07.860; org.apache.solr.core.QuerySenderListener; QuerySenderListener sending requests to [email protected] main{StandardDirectoryReader(segments_2:5:nrt _0(4.4):C1 _1(4.4):C1)} INFO  - 2014-02-16 15:41:07.860; org.apache.solr.core.QuerySenderListener; QuerySenderListener done. INFO  - 2014-02-16 15:41:07.868; org.apache.solr.core.SolrCore; [collection1] Registered new searcher [email protected] main{StandardDirectoryReader(segments_2:5:nrt _0(4.4):C1 _1(4.4):C1)} INFO  - 2014-02-16 15:41:07.869; org.apache.solr.core.CachingDirectoryFactory; looking to close /home/solr/slave/solr4home/collection1/data/index.20140216154100062 [CachedDir<<refCount=0;path=/home/solr/slave/solr4home/collection1/data/index.20140216154100062;done=true>>] INFO  - 2014-02-16 15:41:07.869; org.apache.solr.core.CachingDirectoryFactory; Closing directory: /home/solr/slave/solr4home/collection1/data/index.20140216154100062 INFO  - 2014-02-16 15:41:07.870; org.apache.solr.core.CachingDirectoryFactory; Removing directory before core close: /home/solr/slave/solr4home/collection1/data/index.20140216154100062 INFO  - 2014-02-16 15:42:00.011; org.apache.solr.handler.SnapPuller; Slave in sync with master. INFO  - 2014-02-16 15:43:00.010; org.apache.solr.handler.SnapPuller; Slave in sync with master. INFO  - 2014-02-16 15:44:00.007; org.apache.solr.handler.SnapPuller; Slave in sync with master. INFO  - 2014-02-16 15:45:00.008; org.apache.solr.handler.SnapPuller; Slave in sync with master. INFO  - 2014-02-16 15:46:00.010; org.apache.solr.handler.SnapPuller; Slave in sync with master. INFO  - 2014-02-16 15:47:00.010; org.apache.solr.handler.SnapPuller; Master's generation: 3 INFO  - 2014-02-16 15:47:00.012; org.apache.solr.handler.SnapPuller; Slave's generation: 2 INFO  - 2014-02-16 15:47:00.013; org.apache.solr.handler.SnapPuller; Starting replication process INFO  - 2014-02-16 15:47:00.037; org.apache.solr.handler.SnapPuller; Number of files in latest index in master: 31 INFO  - 2014-02-16 15:47:00.039; org.apache.solr.core.CachingDirectoryFactory; return new directory for /home/solr/slave/solr4home/collection1/data/index.20140216154700039 INFO  - 2014-02-16 15:47:00.057; org.apache.solr.handler.SnapPuller; Starting download to NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index.20140216154700039 [email protected]; maxCacheMB=48.0 maxMergeSizeMB=4.0) fullCopy=false INFO  - 2014-02-16 15:47:00.106; org.apache.solr.handler.SnapPuller; Skipping download for _1_Lucene41_0.doc because it already exists INFO  - 2014-02-16 15:47:00.125; org.apache.solr.handler.SnapPuller; Skipping download for _0_Lucene41_0.pos because it already exists INFO  - 2014-02-16 15:47:00.138; org.apache.solr.handler.SnapPuller; Skipping download for _1.fnm because it already exists INFO  - 2014-02-16 15:47:00.139; org.apache.solr.handler.SnapPuller; Skipping download for _0.nvd because it already exists INFO  - 2014-02-16 15:47:00.139; org.apache.solr.handler.SnapPuller; Skipping download for _0.si because it already exists INFO  - 2014-02-16 15:47:00.139; org.apache.solr.handler.SnapPuller; Skipping download for _0_Lucene41_0.tim because it already exists INFO  - 2014-02-16 15:47:00.142; org.apache.solr.handler.SnapPuller; Skipping download for _0_Lucene41_0.tip because it already exists INFO  - 2014-02-16 15:47:00.143; org.apache.solr.handler.SnapPuller; Skipping download for _1.nvm because it already exists INFO  - 2014-02-16 15:47:00.143; org.apache.solr.handler.SnapPuller; Skipping download for _0.fnm because it already exists INFO  - 2014-02-16 15:47:00.143; org.apache.solr.handler.SnapPuller; Skipping download for _1_Lucene41_0.tim because it already exists INFO  - 2014-02-16 15:47:00.144; org.apache.solr.handler.SnapPuller; Skipping download for _1.nvd because it already exists INFO  - 2014-02-16 15:47:00.163; org.apache.solr.handler.SnapPuller; Skipping download for _1_Lucene41_0.tip because it already exists INFO  - 2014-02-16 15:47:00.179; org.apache.solr.handler.SnapPuller; Skipping download for _0.nvm because it already exists INFO  - 2014-02-16 15:47:00.201; org.apache.solr.handler.SnapPuller; Skipping download for _1.fdx because it already exists INFO  - 2014-02-16 15:47:00.202; org.apache.solr.handler.SnapPuller; Skipping download for _1_Lucene41_0.pos because it already exists INFO  - 2014-02-16 15:47:00.220; org.apache.solr.handler.SnapPuller; Skipping download for _1.fdt because it already exists INFO  - 2014-02-16 15:47:00.220; org.apache.solr.handler.SnapPuller; Skipping download for _0_Lucene41_0.doc because it already exists INFO  - 2014-02-16 15:47:00.220; org.apache.solr.handler.SnapPuller; Skipping download for _1.si because it already exists INFO  - 2014-02-16 15:47:00.242; org.apache.solr.handler.SnapPuller; Skipping download for _0.fdx because it already exists INFO  - 2014-02-16 15:47:00.259; org.apache.solr.handler.SnapPuller; Skipping download for _0.fdt because it already exists INFO  - 2014-02-16 15:47:00.260; org.apache.solr.handler.SnapPuller; Total time taken for download : 0 secs INFO  - 2014-02-16 15:47:00.261; org.apache.solr.update.DefaultSolrCoreState; Closing IndexWriter... INFO  - 2014-02-16 15:47:00.261; org.apache.solr.update.DefaultSolrCoreState; Waiting until IndexWriter is unused... core=collection1 INFO  - 2014-02-16 15:47:00.262; org.apache.solr.update.DefaultSolrCoreState; Rollback old IndexWriter... core=collection1 INFO  - 2014-02-16 15:47:00.273; org.apache.solr.update.DefaultSolrCoreState; Creating new IndexWriter... INFO  - 2014-02-16 15:47:00.320; org.apache.solr.core.SolrDeletionPolicy; SolrDeletionPolicy.onInit: commits: num=2 commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index [email protected]; maxCacheMB=48.0 maxMergeSizeMB=4.0),segFN=segments_2,generation=2} commit{dir=NRTCachingDirectory(org.apache.lucene.store.MMapDirectory@/home/solr/slave/solr4home/collection1/data/index [email protected]; maxCacheMB=48.0 maxMergeSizeMB=4.0),segFN=segments_3,generation=3} INFO  - 2014-02-16 15:47:00.321; org.apache.solr.core.SolrDeletionPolicy; newest commit generation = 3 INFO  - 2014-02-16 15:47:00.324; org.apache.solr.update.DefaultSolrCoreState; New IndexWriter is ready to be used. INFO  - 2014-02-16 15:47:00.349; org.apache.solr.search.SolrIndexSearcher; Opening [email protected] main INFO  - 2014-02-16 15:47:00.350; org.apache.solr.core.QuerySenderListener; QuerySenderListener sending requests to [email protected] main{StandardDirectoryReader(segments_3:7:nrt _0(4.4):C1 _1(4.4):C1 _2(4.4):C1)} INFO  - 2014-02-16 15:47:00.350; org.apache.solr.core.QuerySenderListener; QuerySenderListener done. INFO  - 2014-02-16 15:47:00.369; org.apache.solr.core.SolrCore; [collection1] Registered new searcher [email protected] main{StandardDirectoryReader(segments_3:7:nrt _0(4.4):C1 _1(4.4):C1 _2(4.4):C1)} INFO  - 2014-02-16 15:47:00.374; org.apache.solr.core.CachingDirectoryFactory; looking to close /home/solr/slave/solr4home/collection1/data/index.20140216154700039 [CachedDir<<refCount=0;path=/home/solr/slave/solr4home/collection1/data/index.20140216154700039;done=true>>] INFO  - 2014-02-16 15:47:00.375; org.apache.solr.core.CachingDirectoryFactory; Closing directory: /home/solr/slave/solr4home/collection1/data/index.20140216154700039 INFO  - 2014-02-16 15:47:00.375; org.apache.solr.core.CachingDirectoryFactory; Removing directory before core close: /home/solr/slave/solr4home/collection1/data/index.20140216154700039 INFO  - 2014-02-16 15:48:00.010; org.apache.solr.handler.SnapPuller; Slave in sync with master. 首先,Slave服务器每个一分钟向Master的replication发送一个请求,Master执行replication请求,Master主要通过sync 方式把索引的快照同步给Slave服务器,        

上一篇:Java学习第14天:集合框架零接触和基本理解(List和Set)
下一篇:

相关文章

相关评论