0

昨晚我通过 Solr 管理 Web 控制台为我们的 Cassandra 集群启动了完整的重新索引(我选择了“完整重新索引”)。集群中的每个节点也运行 Solr。

截至大约 2 小时前,它似乎已完成,因为每个节点的 Web 控制台除了索引行之外都有“否”,但是我想查看日志并验证它是否为每个节点成功完成,因为 Web 控制台每个节点都有一个红色圆圈,在“当前”旁边有一条线穿过它。

在过去,我已经看到了这个,然后将其更改为绿色复选标记,但我认为如果我知道要在日志中查找什么,那么这将是一种更方便和可靠的方法来确定重新索引是否在事实成功完成。

4

2 回答 2

0

卷曲

您可以使用: curl -v " http://127.0.0.1:8983/solr/admin/cores?action=STATUS&name=demo.solr

返回的 xml 中应该有一个“索引”标签

管理控制台

你在正确的轨道上。Web 管理控制台可能是您检查索引是否完整的最简单的地方。一旦您的索引完成并且您没有对表进行任何写入,索引将拒绝并且当前将有一个复选标记而不是一个交叉的红色圆圈。Current 表示是否有任何已知的未软提交的索引更改(请记住在 solrconfig.xml 中设置的自动提交阈值)。因此,您的完整重新索引可能已完成,但您仍在为新数据编制索引。DSE 搜索——本质上——始终基于 C* 写入进行索引。

另一种可以进行快速健全性检查的方法是在查询面板中为您的核心执行一个开放的 *:* 查询并查看 numFound。您必须大致了解您的表中有多少条记录。

日志

这有点涉及,但这里是您在执行完整重新索引时将在 system.out 日志中看到的内容的摘要。如果你想检查你的日志以确认你可以。在这种情况下 DSP1375Test.index 是我的核心名称:

重新加载文件(模式/配置):

 INFO [http-8983-exec-2] 2015-03-18 08:59:28,725 SolrCoreResourceManager.java (line 382) Reloading core: DSP1375Test.index
 INFO [http-8983-exec-2] 2015-03-18 08:59:28,727 SolrCoreResourceManager.java (line 532) Trying to load resource solrconfig.xml for core DSP1375Test.index by querying from local node with CL QUORUM
 INFO [http-8983-exec-2] 2015-03-18 08:59:28,734 SolrCoreResourceManager.java (line 542) Successfully loaded resource solrconfig.xml for core DSP1375Test.index by querying from local node.
 INFO [http-8983-exec-2] 2015-03-18 08:59:28,946 SolrCoreResourceManager.java (line 532) Trying to load resource schema.xml.bak for core DSP1375Test.index by querying from local node with CL QUORUM
 INFO [http-8983-exec-2] 2015-03-18 08:59:28,951 SolrCoreResourceManager.java (line 542) Successfully loaded resource schema.xml.bak for core DSP1375Test.index by querying from local node.
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,003 SolrCoreResourceManager.java (line 532) Trying to load resource schema.xml for core DSP1375Test.index by querying from local node with CL QUORUM
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,009 SolrCoreResourceManager.java (line 542) Successfully loaded resource schema.xml for core DSP1375Test.index by querying from local node.
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,468 CoreContainer.java (line 472) replacing core: DSP1375Test.index
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,469 SolrCoreResourceManager.java (line 532) Trying to load resource dse-search.properties for core DSP1375Test.index by querying from local node with CL QUORUM
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,474 SolrCoreResourceManager.java (line 548) No resource dse-search.properties found for core DSP1375Test.index by querying from local node.
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,474 SolrCoreResourceManager.java (line 558) Trying to load resource dse-search.properties for core DSP1375Test.index by looking for legacy resources...
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,474 SolrCoreResourceManager.java (line 580) No resource dse-search.properties found for core DSP1375Test.index on any live node.
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,474 DSESearchProperties.java (line 79) Using default DSE search properties for Solr core DSP1375Test.index
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,474 DSESearchProperties.java (line 104) Refreshed DSE search properties for: DSP1375Test.index
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,477 SolrCoreResourceManager.java (line 532) Trying to load resource solrconfig.xml for core DSP1375Test.index by querying from local node with CL QUORUM
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,483 SolrCoreResourceManager.java (line 542) Successfully loaded resource solrconfig.xml for core DSP1375Test.index by querying from local node.
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,495 SolrCoreResourceManager.java (line 666) Wrote resource 'solrconfig.xml.bak' for core 'DSP1375Test.index'
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,495 SolrCoreResourceManager.java (line 532) Trying to load resource schema.xml for core DSP1375Test.index by querying from local node with CL QUORUM
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,498 SolrCoreResourceManager.java (line 542) Successfully loaded resource schema.xml for core DSP1375Test.index by querying from local node.
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,503 SolrCoreResourceManager.java (line 666) Wrote resource 'schema.xml.bak' for core 'DSP1375Test.index'

开始重新索引:

 INFO [SolrSecondaryIndex DSP1375Test.index index reloader.] 2015-03-18 08:59:29,508 AbstractSolrSecondaryIndex.java (line 1390) Reindexing on keyspace DSP1375Test and column family index
  INFO [SolrSecondaryIndex DSP1375Test.index index reloader.] 2015-03-18 08:59:29,508 AbstractSolrSecondaryIndex.java (line 1390) Reindexing on keyspace DSP1375Test and column family index
 INFO [SolrSecondaryIndex DSP1375Test.index index reloader.] 2015-03-18 08:59:29,523 SecondaryIndex.java (line 190) Submitting index build of DSP1375Test.index for data in 
 INFO [SolrSecondaryIndex DSP1375Test.index index reloader.] 2015-03-18 08:59:29,528 AbstractSolrSecondaryIndex.java (line 1006) Executing hard commit on index DSP1375Test.index

构建索引完成:

 INFO [SolrSecondaryIndex DSP1375Test.index index reloader.] 2015-03-18 08:59:29,530 SecondaryIndex.java (line 208) Index build of DSP1375Test.index complete

 INFO [http-8983-exec-3] 2015-03-18 08:59:29,765 SolrDispatchFilter.java (line 672) [admin] webapp=null path=/admin/cores params={slave=true&deleteAll=true&name=DSP1375Test.index&distributed=false&action=RELOAD&reindex=true&core=DSP1375Test.index&wt=javabin&version=2} status=0 QTime=0 
 INFO [http-8983-exec-2] 2015-03-18 08:59:29,782 SolrDispatchFilter.java (line 672) [admin] webapp=null path=/admin/cores params={deleteAll=true&action=RELOAD&reindex=true&_=1426683568718&core=DSP1375Test.index&wt=json} status=0 QTime=1058 
于 2015-03-18T13:11:57.280 回答
0

我可能是错的,但是由于 Solr reindexing直接连接到 Cassandra 二级索引 rebuiding,我的猜测是如果 Cassandra 完成了索引重建,那么 Solr 也很好。

于 2015-03-17T18:46:29.990 回答