mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
- added information about segment count to status_p.xml
- also moved this information from the old index structure, which is still in use for the RWI/DHT index to that front-end
This commit is contained in:
parent
6fb2811e68
commit
056b42f5aa
|
@ -72,8 +72,11 @@ public class status_p {
|
|||
|
||||
// index size
|
||||
prop.putNum("urlpublictextSize", segment.fulltext().collectionSize());
|
||||
prop.putNum("webgraphSize", segment.fulltext().webgraphSize());
|
||||
prop.putNum("urlpublictextSegmentCount", segment.fulltext().getDefaultConnector().getSegmentCount());
|
||||
prop.putNum("webgraphSize", segment.fulltext().writeToWebgraph() ? segment.fulltext().webgraphSize() : 0);
|
||||
prop.putNum("webgraphSegmentCount", segment.fulltext().writeToWebgraph() ? segment.fulltext().getWebgraphConnector().getSegmentCount() : 0);
|
||||
prop.putNum("rwipublictextSize", segment.RWICount());
|
||||
prop.putNum("rwipublictextSegmentCount", segment.RWISegmentCount());
|
||||
|
||||
// loader queue
|
||||
prop.putNum("loaderSize", sb.crawlQueues.workerSize());
|
||||
|
|
|
@ -21,8 +21,11 @@
|
|||
|
||||
<dbsize>
|
||||
<urlpublictext>#[urlpublictextSize]#</urlpublictext>
|
||||
<urlpublictextSegmentCount>#[urlpublictextSegmentCount]#</urlpublictextSegmentCount>
|
||||
<webgraph>#[webgraphSize]#</webgraph>
|
||||
<rwipublictext>#[rwipublictextSize]#</rwipublictext>
|
||||
<webgraphSegmentCount>#[webgraphSegmentCount]#</webgraphSegmentCount>
|
||||
<rwipublictext>#[rwipublictextSize]#</rwipublictext>
|
||||
<rwipublictextSegmentCount>#[rwipublictextSegmentCount]#</rwipublictextSegmentCount>
|
||||
</dbsize>
|
||||
|
||||
<loaderqueue>
|
||||
|
|
|
@ -306,4 +306,10 @@ public class CachedSolrConnector extends AbstractSolrConnector implements SolrCo
|
|||
public void optimize(int maxSegments) {
|
||||
this.solr.optimize(maxSegments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSegmentCount() {
|
||||
return this.solr.getSegmentCount();
|
||||
}
|
||||
|
||||
}
|
|
@ -246,6 +246,11 @@ public class ConcurrentUpdateSolrConnector implements SolrConnector {
|
|||
this.connector.optimize(maxSegments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSegmentCount() {
|
||||
return this.connector.getSegmentCount();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void close() {
|
||||
ensureAliveDeletionHandler();
|
||||
|
|
|
@ -98,6 +98,13 @@ public class MirrorSolrConnector extends AbstractSolrConnector implements SolrCo
|
|||
if (this.solr0 != null) this.solr0.optimize(maxSegments);
|
||||
if (this.solr1 != null) this.solr1.optimize(maxSegments);
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getSegmentCount() {
|
||||
int s0 = this.solr0 == null ? 0 : this.solr0.getSegmentCount();
|
||||
int s1 = this.solr1 == null ? 0 : this.solr1.getSegmentCount();
|
||||
return Math.max(s0, s1);
|
||||
}
|
||||
|
||||
@Override
|
||||
public synchronized void close() {
|
||||
|
|
|
@ -54,6 +54,12 @@ public interface SolrConnector extends Iterable<String> /* Iterable of document
|
|||
*/
|
||||
public void optimize(int maxSegments);
|
||||
|
||||
/**
|
||||
* ask the solr subsystem about it's segment number
|
||||
* @return the segment count, which corresponds to the number of files for an index
|
||||
*/
|
||||
public int getSegmentCount();
|
||||
|
||||
/**
|
||||
* close the server connection
|
||||
*/
|
||||
|
|
|
@ -595,6 +595,10 @@ public final class IndexCell<ReferenceType extends Reference> extends AbstractBu
|
|||
return m;
|
||||
}
|
||||
|
||||
public int getSegmentCount() {
|
||||
return this.array.entries();
|
||||
}
|
||||
|
||||
@Override
|
||||
public int minMem() {
|
||||
return 10 * 1024 * 1024;
|
||||
|
|
|
@ -374,6 +374,11 @@ public class Segment {
|
|||
if (this.termIndex == null) return 0;
|
||||
return this.termIndex.sizesMax();
|
||||
}
|
||||
|
||||
public long RWISegmentCount() {
|
||||
if (this.termIndex == null) return 0;
|
||||
return this.termIndex.getSegmentCount();
|
||||
}
|
||||
|
||||
public int RWIBufferCount() {
|
||||
if (this.termIndex == null) return 0;
|
||||
|
|
Loading…
Reference in New Issue
Block a user