Solr集羣Replication配置與實踐

Solr作爲一個搜索服務器,在併發搜索請求的場景下,可能一臺服務器很容易就垮掉,這是我們可以通過使用集羣技術,設置多臺Solr搜索服務器同時對外提供搜索服務,在前端使用類似Nginx的負載均衡軟件,可以通過配置使得併發到達的搜索請求均勻地反向代理到Solr集羣中的每一臺服務器上,這樣每臺Solr搜索服務器搜索請求的壓力可以大大減小,增強了每臺服務器能夠持續提供服務器的能力。

然而,這時我們面臨的問題有:

  • 集羣中的每臺服務器在線上要保證索引數據都能很好地的同步,使得每臺搜索服務器的索引數據在一定可以承受的程度上保持一致性;
  • 集羣中某臺服務器宕機離線,人工干預重啓後繼續與集羣中其它服務器索引數據保持一致,繼續提供搜索服務;
  • 集羣中某臺服務器的索引數據,由於硬盤故障或人爲原因無法提供搜索服務,需要一種數據恢復機制;
  • 集羣中最先接受數據更新的Master服務器,在將索引更新傳播到Slave服務器上時,避免多臺Slave服務器同一時間佔用大量網絡帶寬,從而影響了Master提供搜索服務。

事實上,Solr框架在上面的幾個方面都能做到不錯的支持,具有很大的靈活性。基於上述的幾個問題,我們來配置Solr集羣的Replication,並實踐集羣複製的功能。


單機實例Replication


Solr支持在單機上配置多個實例(MultiCore),每個實例都可以獨立對外提供服務,共享同一網絡帶寬。同時,也可以實現單機實例之間Replication,在實例之間複製數據,保證數據的可用性,從而提高系統的服務能力。

我們看一下,這種複製模式的結構圖,如下所示:


上圖,在同一臺服務器上,啓動Solr的多個實例,將這些實例(通過Core來區分)作爲單機上的僞分佈式集羣,這些Core實例都是在同一個JVM中。選擇其中的一個實例Core0作爲Master,每次索引更新都首先從這個實例Core0進行傳播,直到Master實例Core0與Slave實例Core1、Core2、Core3上的數據同步爲止。其中,每個實例都可以獨立對外提供服務,因爲這種模式保證多個實例上的數據都是同一份數據,起到數據備份的作用,一般不建議讓多個實例同時提供服務。下面給出上圖複製模式下Solr的配置。

Core0作爲Master,對應的solrconfig.xml配置內容,如下所示:

<?xml version="1.0" encoding="UTF-8" ?>
<config>
	<luceneMatchVersion>LUCENE_35</luceneMatchVersion>
	<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}" />

	<updateHandler class="solr.DirectUpdateHandler2" />

	<requestDispatcher handleSelect="true">
		<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
	</requestDispatcher>

	<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
	<requestHandler name="/update" class="solr.JsonUpdateRequestHandler" />
	<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />

	<queryParser name="dismax" class="solr.DisMaxQParserPlugin" />
	<requestHandler name="/dismax" class="solr.SearchHandler">
		<lst name="defaults">
			<str name="defType">dismax</str>
			<str name="qf">title content</str>
			<bool name="hl">true</bool>
			<str name="hl.fl">title content</str>
			<int name="hl.fragsize">200</int>
			<int name="hl.snippets">1</int>
			<str name="fl">*,score</str>
			<str name="qt">standard</str>
			<str name="wt">standard</str>
			<str name="version">2.2</str>
			<str name="echoParams">explicit</str>
			<str name="indent">true</str>
			<str name="debugQuery">on</str>
			<str name="explainOther">on</str>
		</lst>
	</requestHandler>

	<requestHandler name="/replication" class="solr.ReplicationHandler">
		<lst name="master">
			<str name="replicateAfter">startup</str>
			<str name="replicateAfter">commit</str>
			<str name="commitReserveDuration">00:00:10</str>
		</lst>
	</requestHandler>

	<admin>
		<defaultQuery>solr</defaultQuery>
	</admin>

</config>
上述配置中,提供了一個/dismax搜索接口,對外提供搜索服務。配置中name爲/Replication的requestHandler,即爲Solr提供的複製請求處理接口,配置中replicateAfter表示在startup和commit之後才允許Slave的複製請求。

Solr支持索引數據Replication,同時也支持配置數據的複製。如果需要複製配置數據做好配置備份,可以在Master的solrconfig.xml中配置如下內容:

<str name="confFiles">schema.xml,stopwords.txt,solrconfig.xml,synonyms.txt</str>
指定需要從Master上覆制的配置文件名即可。

對於Core1~Core3都爲Slave,即請求複製數據,我們拿Core1爲例,其它配置均相同,但是我們不希望Slave實例對外提供服務,所以只需要配置Slave的/replication複製請求處理接口即可,配置內容如下所示:

<?xml version="1.0" encoding="UTF-8" ?>
<config>
	<luceneMatchVersion>LUCENE_35</luceneMatchVersion>
	<directoryFactory name="DirectoryFactory" class="${solr.directoryFactory:solr.StandardDirectoryFactory}" />

	<updateHandler class="solr.DirectUpdateHandler2" />

	<requestDispatcher handleSelect="true">
		<requestParsers enableRemoteStreaming="false" multipartUploadLimitInKB="2048" />
	</requestDispatcher>

	<requestHandler name="standard" class="solr.StandardRequestHandler" default="true" />
	<requestHandler name="/update" class="solr.JsonUpdateRequestHandler" />
	<requestHandler name="/admin/" class="org.apache.solr.handler.admin.AdminHandlers" />

	<requestHandler name="/replication" class="solr.ReplicationHandler">
		<lst name="slave">
			<str name="masterUrl">http://192.168.0.195:8080/solr35/core0/replication</str>
			<str name="pollInterval">00:00:20</str>
			<str name="compression">internal</str>
			<str name="httpConnTimeout">5000</str>
			<str name="httpReadTimeout">10000</str>
			<str name="httpBasicAuthUser">username</str>
			<str name="httpBasicAuthPassword">password</str>
		</lst>
	</requestHandler>

	<admin>
		<defaultQuery>solr</defaultQuery>
	</admin>

</config>
Slave配置中masterUrl和pollInterval是必選的,masterUrl指定爲core0的複製請求接口,pollInterval是指Slave週期地向Master詢問是否數據有所更新,如果發生變更則進行復制。其它的參數可以根據需要進行配置。一般情況下,單機多個實例之間的Replication不需要配置上述httpBasicAuth*的參數的。

啓動Solr之前,沒有任何索引數據。啓動之後,我們通過在 http://blog.csdn.net/shirdrn/article/details/7054633 中設計的小工具,向Master發送數據請求索引,因爲在post的過程中,執行了commit和optimize操作,所以會觸發Slave複製Master的索引數據,我們可以看一下日誌。

在Master和Slave數據同步的情況下,Master收到Slave的Replication請求:

2011-12-9 15:18:00 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
2011-12-9 15:18:20 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
2011-12-9 15:18:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
2011-12-9 15:19:00 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
每隔20s間隔,Slave請求一次,這個時間間隔可以根據需要進行配置。

從我們向Master發送索引數據更新索引請求後,在Master和Slave之間執行的數據的複製,處理日誌內容可以參考後面附錄的內容。

通過日誌信息可以看到,Slave在Master更新索引(通過add可以看到更新了5篇文檔,日誌中給出了文檔編號;更新時,每次發送2篇文檔執行一次commit,全部發送完成後執行一次commit和optimize操作)之後,通過發送請求獲取複製文件列表,然後執行復制過程,最後Slave索引數據發生變化,爲保證實時能夠搜索到最新內容,重新打開了一個IndexSearcher實例。日誌最後面的部分,Slave的索引數據與Master保持同步,不需要複製。


集羣結點Replication


在Solr集羣中進行配置,與上面單機多實例的情況基本上一致,基本特點是:每個結點上的實例(Core)在同一個JVM內,不同結點之間進行復制——實際上是不同結點上的實例之間進行Replication。集羣複製模式架構圖,如下所示:


在一個Solr集羣中執行Replication,複製請求與動作發生在一個網絡內部。而replication的端點是不同結點上的實例(Core),很可能Slave結點上的其它實例在提供其他的服務。

通過上圖可以看到,在只有一個Master的Solr集羣中,如果存在大量的Slave要求Replication,勢必會造成對Master服務器的壓力(網絡帶寬、系統IO、系統CPU)。很可能因爲外部大量搜索請求達到,使Master持續提供服務的能力降低,甚至宕機。Solr也考慮到這一點,通過在Master和Slave之間建立一個代理的結點來改善單點故障,代理結點既做Master的Slave,同步Master的數據,同時又做Slave的Master,將最新的數據同步複製到Slave結點,這個結點叫做Repeater,架構圖如下所示:


由圖可見,Master的壓力一下轉移到了Repeater結點上,在一定程度上解決了Master的單點問題。對於Reaper結點,它具有雙重角色,顯而易見,在配置的時候需要配置上Master和Slave都具有的屬性。我們給出一個Repeater的配置示例。

Master配置:

        <requestHandler name="/replication" class="solr.ReplicationHandler">
                <lst name="master">
                        <str name="replicateAfter">startup</str>
                        <str name="replicateAfter">commit</str>
                        <str name="confFiles">schema.xml,stopwords.txt,solrconfig.xml,synonyms.txt</str>
                        <str name="commitReserveDuration">00:00:10</str>
                </lst>
        </requestHandler>
Repeater配置:

        <requestHandler name="/replication" class="solr.ReplicationHandler">
                <lst name="master">
                        <str name="replicateAfter">startup</str>
                        <str name="replicateAfter">commit</str>
                        <str name="commitReserveDuration">00:00:10</str>
                </lst>
                <lst name="slave">
                        <str name="masterUrl">http://192.168.0.184:8080/masterapp/master/replication</str>
                        <str name="pollInterval">00:00:20</str>
                        <str name="compression">internal</str>
                        <str name="httpConnTimeout">5000</str>
                        <str name="httpReadTimeout">10000</str>
                        <str name="httpBasicAuthUser">username</str>
                        <str name="httpBasicAuthPassword">password</str>
                </lst>
        </requestHandler>
Slave配置:

	<requestHandler name="/replication" class="solr.ReplicationHandler" >
	   <lst name="slave">
	       <str name="masterUrl">http://192.168.0.174:8080/repeaterapp/repeater/replication</str>
	       <str name="pollInterval">00:00:20</str>
	       <str name="compression">internal</str>
	       <str name="httpConnTimeout">5000</str>
	       <str name="httpReadTimeout">10000</str>
	        <str name="httpBasicAuthUser">username</str>
	        <str name="httpBasicAuthPassword">password</str>
	     </lst>
	</requestHandler>

可見,Solr能夠支持這種鏈式Replication配置,甚至可以配置更多級,但具體如何配置還要依據你的應用的特點,以及資源條件的限制。總之,Solr Replication的目標就是讓你係統的數據可用性變得更好。任何時候發生機器故障、硬盤故障、數據錯誤,都可以從其他的備機上同步數據。


附錄日誌


2011-12-9 15:19:32 org.apache.solr.update.processor.LogUpdateProcessor finish
信息: {add=[4eded6a5bf3bfa0014000003, 4eded74abf3bfa0014000005]} 0 1257
2011-12-9 15:19:32 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/update params={} status=0 QTime=1257 
2011-12-9 15:19:32 org.apache.solr.update.DirectUpdateHandler2 commit
信息: start commit(optimize=false,waitFlush=true,waitSearcher=true,expungeDeletes=false)
2011-12-9 15:19:33 org.apache.solr.core.SolrDeletionPolicy onCommit
信息: SolrDeletionPolicy.onCommit: commits:num=2
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_1,version=1323415055454,generation=1,filenames=[segments_1]
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_2,version=1323415055456,generation=2,filenames=[_0.tis, _0.nrm, _0.fnm, _0.tii, _0.frq, segments_2, _0.fdx, _0.prx, _0.fdt]
2011-12-9 15:19:33 org.apache.solr.core.SolrDeletionPolicy updateCommits
信息: newest commit = 1323415055456
2011-12-9 15:19:33 org.apache.solr.search.SolrIndexSearcher <init>
信息: Opening Searcher@151b6ea main
2011-12-9 15:19:33 org.apache.solr.update.DirectUpdateHandler2 commit
信息: end_commit_flush
2011-12-9 15:19:33 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming Searcher@151b6ea main from Searcher@1a80fb8 main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:33 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming result for Searcher@151b6ea main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:33 org.apache.solr.core.SolrCore registerSearcher
信息: [core0] Registered new searcher Searcher@151b6ea main
2011-12-9 15:19:33 org.apache.solr.search.SolrIndexSearcher close
信息: Closing Searcher@1a80fb8 main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:33 org.apache.solr.update.processor.LogUpdateProcessor finish
信息: {commit=} 0 790
2011-12-9 15:19:33 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/update params={} status=0 QTime=790 
2011-12-9 15:19:33 org.apache.solr.update.SolrIndexWriter getDirectory
警告: No lockType configured for E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index/ assuming 'simple'
2011-12-9 15:19:33 org.apache.solr.core.SolrDeletionPolicy onInit
信息: SolrDeletionPolicy.onInit: commits:num=1
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_2,version=1323415055456,generation=2,filenames=[_0.tis, _0.nrm, _0.fnm, _0.tii, _0.frq, segments_2, _0.fdx, _0.prx, _0.fdt]
2011-12-9 15:19:33 org.apache.solr.core.SolrDeletionPolicy updateCommits
信息: newest commit = 1323415055456
2011-12-9 15:19:33 org.apache.solr.update.processor.LogUpdateProcessor finish
信息: {add=[4eded53abf3bfa0014000002, 4eded700bf3bfa0014000004]} 0 336
2011-12-9 15:19:33 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/update params={} status=0 QTime=336 
2011-12-9 15:19:33 org.apache.solr.update.DirectUpdateHandler2 commit
信息: start commit(optimize=false,waitFlush=true,waitSearcher=true,expungeDeletes=false)
2011-12-9 15:19:34 org.apache.solr.core.SolrDeletionPolicy onCommit
信息: SolrDeletionPolicy.onCommit: commits:num=2
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_2,version=1323415055456,generation=2,filenames=[_0.tis, _0.nrm, _0.fnm, _0.tii, _0.frq, segments_2, _0.fdx, _0.prx, _0.fdt]
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_3,version=1323415055458,generation=3,filenames=[_0.nrm, _0.tis, _0.fnm, _1.tis, _1.frq, _1.fnm, _1.fdx, _1.prx, _0.tii, _1.fdt, _0.frq, _1.tii, _0.fdx, _0.prx, _1.nrm, segments_3, _0.fdt]
2011-12-9 15:19:34 org.apache.solr.core.SolrDeletionPolicy updateCommits
信息: newest commit = 1323415055458
2011-12-9 15:19:34 org.apache.solr.search.SolrIndexSearcher <init>
信息: Opening Searcher@5fa11b main
2011-12-9 15:19:34 org.apache.solr.update.DirectUpdateHandler2 commit
信息: end_commit_flush
2011-12-9 15:19:34 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming Searcher@5fa11b main from Searcher@151b6ea main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:34 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming result for Searcher@5fa11b main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:34 org.apache.solr.core.SolrCore registerSearcher
信息: [core0] Registered new searcher Searcher@5fa11b main
2011-12-9 15:19:34 org.apache.solr.search.SolrIndexSearcher close
信息: Closing Searcher@151b6ea main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:34 org.apache.solr.update.processor.LogUpdateProcessor finish
信息: {commit=} 0 616
2011-12-9 15:19:34 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/update params={} status=0 QTime=616 
2011-12-9 15:19:34 org.apache.solr.update.SolrIndexWriter getDirectory
警告: No lockType configured for E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index/ assuming 'simple'
2011-12-9 15:19:34 org.apache.solr.core.SolrDeletionPolicy onInit
信息: SolrDeletionPolicy.onInit: commits:num=1
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_3,version=1323415055458,generation=3,filenames=[_0.nrm, _0.tis, _0.fnm, _1.tis, _1.frq, _1.fnm, _1.fdx, _1.prx, _0.tii, _1.fdt, _0.frq, _1.tii, _0.fdx, _0.prx, _1.nrm, segments_3, _0.fdt]
2011-12-9 15:19:34 org.apache.solr.core.SolrDeletionPolicy updateCommits
信息: newest commit = 1323415055458
2011-12-9 15:19:34 org.apache.solr.update.processor.LogUpdateProcessor finish
信息: {add=[4eded79fbf3bfa0014000006]} 0 164
2011-12-9 15:19:34 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/update params={} status=0 QTime=164 
2011-12-9 15:19:34 org.apache.solr.update.DirectUpdateHandler2 commit
信息: start commit(optimize=false,waitFlush=true,waitSearcher=true,expungeDeletes=false)
2011-12-9 15:19:35 org.apache.solr.core.SolrDeletionPolicy onCommit
信息: SolrDeletionPolicy.onCommit: commits:num=2
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_3,version=1323415055458,generation=3,filenames=[_0.nrm, _0.tis, _0.fnm, _1.tis, _1.frq, _1.fnm, _1.fdx, _1.prx, _0.tii, _1.fdt, _0.frq, _1.tii, _0.fdx, _0.prx, _1.nrm, segments_3, _0.fdt]
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_4,version=1323415055460,generation=4,filenames=[_0.tis, _1.frq, _2.tii, _1.fnm, _1.tii, _0.prx, _0.nrm, _1.tis, _0.fnm, _2.prx, _2.fdt, _2.frq, _2.fdx, _2.fnm, _1.prx, _1.fdx, _2.tis, _0.tii, _1.fdt, _0.frq, _0.fdx, _0.fdt, _1.nrm, _2.nrm, segments_4]
2011-12-9 15:19:35 org.apache.solr.core.SolrDeletionPolicy updateCommits
信息: newest commit = 1323415055460
2011-12-9 15:19:35 org.apache.solr.search.SolrIndexSearcher <init>
信息: Opening Searcher@1d449fc main
2011-12-9 15:19:35 org.apache.solr.update.DirectUpdateHandler2 commit
信息: end_commit_flush
2011-12-9 15:19:35 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming Searcher@1d449fc main from Searcher@5fa11b main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:35 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming result for Searcher@1d449fc main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:35 org.apache.solr.core.SolrCore registerSearcher
信息: [core0] Registered new searcher Searcher@1d449fc main
2011-12-9 15:19:35 org.apache.solr.search.SolrIndexSearcher close
信息: Closing Searcher@5fa11b main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:35 org.apache.solr.update.processor.LogUpdateProcessor finish
信息: {commit=} 0 735
2011-12-9 15:19:35 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/update params={} status=0 QTime=735 
2011-12-9 15:19:35 org.apache.solr.update.DirectUpdateHandler2 commit
信息: start commit(optimize=true,waitFlush=false,waitSearcher=false,expungeDeletes=false)
2011-12-9 15:19:35 org.apache.solr.update.SolrIndexWriter getDirectory
警告: No lockType configured for E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index/ assuming 'simple'
2011-12-9 15:19:35 org.apache.solr.core.SolrDeletionPolicy onInit
信息: SolrDeletionPolicy.onInit: commits:num=1
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_4,version=1323415055460,generation=4,filenames=[_0.tis, _1.frq, _2.tii, _1.fnm, _1.tii, _0.prx, _0.nrm, _1.tis, _0.fnm, _2.prx, _2.fdt, _2.frq, _2.fdx, _2.fnm, _1.prx, _1.fdx, _2.tis, _0.tii, _1.fdt, _0.frq, _0.fdx, _0.fdt, _1.nrm, _2.nrm, segments_4]
2011-12-9 15:19:35 org.apache.solr.core.SolrDeletionPolicy updateCommits
信息: newest commit = 1323415055460
2011-12-9 15:19:36 org.apache.solr.core.SolrDeletionPolicy onCommit
信息: SolrDeletionPolicy.onCommit: commits:num=2
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_4,version=1323415055460,generation=4,filenames=[_0.tis, _1.frq, _2.tii, _1.fnm, _1.tii, _0.prx, _0.nrm, _1.tis, _0.fnm, _2.prx, _2.fdt, _2.frq, _2.fdx, _2.fnm, _1.prx, _1.fdx, _2.tis, _0.tii, _1.fdt, _0.frq, _0.fdx, _0.fdt, _1.nrm, _2.nrm, segments_4]
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core0\data\index,segFN=segments_5,version=1323415055462,generation=5,filenames=[_3.nrm, _3.fdx, _3.frq, _3.tii, _3.fnm, _3.prx, _3.fdt, segments_5, _3.tis]
2011-12-9 15:19:36 org.apache.solr.core.SolrDeletionPolicy updateCommits
信息: newest commit = 1323415055462
2011-12-9 15:19:36 org.apache.solr.search.SolrIndexSearcher <init>
信息: Opening Searcher@130df8 main
2011-12-9 15:19:36 org.apache.solr.update.DirectUpdateHandler2 commit
信息: end_commit_flush
2011-12-9 15:19:36 org.apache.solr.update.processor.LogUpdateProcessor finish
信息: {optimize=} 0 764
2011-12-9 15:19:36 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/update params={} status=0 QTime=764 
2011-12-9 15:19:36 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming Searcher@130df8 main from Searcher@1d449fc main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:36 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming result for Searcher@130df8 main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:36 org.apache.solr.core.SolrCore registerSearcher
信息: [core0] Registered new searcher Searcher@130df8 main
2011-12-9 15:19:36 org.apache.solr.search.SolrIndexSearcher close
信息: Closing Searcher@1d449fc main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
2011-12-9 15:19:40 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Master's version: 1323415055462, generation: 5
2011-12-9 15:19:40 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Slave's version: 1323415058428, generation: 1
2011-12-9 15:19:40 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Starting replication process
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&command=filelist&wt=javabin} status=0 QTime=1 
2011-12-9 15:19:40 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Number of files in latest index in master: 9
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=_3.fdx&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=27 
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=_3.nrm&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=0 
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=_3.tii&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=0 
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=_3.frq&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=0 
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=_3.fdt&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=11 
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=_3.prx&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=0 
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=_3.fnm&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=0 
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=segments_5&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=1 
2011-12-9 15:19:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={indexversion=1323415055462&file=_3.tis&command=filecontent&checksum=true&compression=true&wt=filestream} status=0 QTime=0 
2011-12-9 15:19:40 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Total time taken for download : 0 secs
2011-12-9 15:19:40 org.apache.solr.update.DirectUpdateHandler2 commit
信息: start commit(optimize=false,waitFlush=true,waitSearcher=true,expungeDeletes=false)
2011-12-9 15:19:40 org.apache.solr.search.SolrIndexSearcher <init>
信息: Opening Searcher@49a1c5 main
2011-12-9 15:19:40 org.apache.solr.update.DirectUpdateHandler2 commit
信息: end_commit_flush
2011-12-9 15:19:40 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming Searcher@49a1c5 main from Searcher@14a93a6 main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:40 org.apache.solr.search.SolrIndexSearcher warm
信息: autowarming result for Searcher@49a1c5 main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:40 org.apache.solr.core.SolrCore registerSearcher
信息: [core1] Registered new searcher Searcher@49a1c5 main
2011-12-9 15:19:40 org.apache.solr.search.SolrIndexSearcher close
信息: Closing Searcher@14a93a6 main
	fieldValueCache{lookups=0,hits=0,hitratio=0.00,inserts=0,evictions=0,size=0,warmupTime=0,cumulative_lookups=0,cumulative_hits=0,cumulative_hitratio=0.00,cumulative_inserts=0,cumulative_evictions=0}
2011-12-9 15:19:40 org.apache.solr.handler.SnapPuller doCommit
信息: Force open index writer to make sure older index files get deleted
2011-12-9 15:19:40 org.apache.solr.update.SolrIndexWriter getDirectory
警告: No lockType configured for E:\Develop\myeclipse\workspace\solr35\multicore\core1\data\index/ assuming 'simple'
2011-12-9 15:19:41 org.apache.solr.core.SolrDeletionPolicy onInit
信息: SolrDeletionPolicy.onInit: commits:num=2
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core1\data\index,segFN=segments_1,version=1323415058428,generation=1,filenames=[segments_1]
	commit{dir=E:\Develop\myeclipse\workspace\solr35\multicore\core1\data\index,segFN=segments_5,version=1323415055462,generation=5,filenames=[_3.nrm, _3.fdx, _3.frq, _3.tii, _3.fnm, _3.prx, _3.fdt, segments_5, _3.tis]
2011-12-9 15:19:41 org.apache.solr.core.SolrDeletionPolicy updateCommits
信息: newest commit = 1323415055462
2011-12-9 15:20:00 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
2011-12-9 15:20:00 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Slave in sync with master.
2011-12-9 15:20:20 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
2011-12-9 15:20:20 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Slave in sync with master.
2011-12-9 15:20:40 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
2011-12-9 15:20:40 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Slave in sync with master.
2011-12-9 15:21:00 org.apache.solr.core.SolrCore execute
信息: [core0] webapp=/solr35 path=/replication params={command=indexversion&wt=javabin} status=0 QTime=0 
2011-12-9 15:21:00 org.apache.solr.handler.SnapPuller fetchLatestIndex
信息: Slave in sync with master.


發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章