mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
added noload statistic to servlets
This commit is contained in:
parent
361146dd7a
commit
992dbdf4bb
|
@ -204,7 +204,7 @@ public class CrawlStartScanner_p
|
|||
final DigestURI url = pkmap.get(pk);
|
||||
if ( url != null ) {
|
||||
String path =
|
||||
"/Crawler_p.html?createBookmark=off&xsstopw=off&crawlingDomMaxPages=10000&intention=&range=domain&indexMedia=on&recrawl=nodoubles&xdstopw=off&storeHTCache=on&sitemapURL=&repeat_time=7&crawlingQ=on&cachePolicy=iffresh&indexText=on&crawlingMode=url&mustnotmatch=&crawlingDomFilterDepth=1&crawlingDomFilterCheck=off&crawlingstart=Start%20New%20Crawl&xpstopw=off&repeat_unit=seldays&crawlingDepth=99";
|
||||
"/Crawler_p.html?createBookmark=off&xsstopw=off&crawlingDomMaxPages=10000&intention=&range=domain&indexMedia=on&recrawl=nodoubles&xdstopw=off&storeHTCache=on&sitemapURL=&repeat_time=7&crawlingQ=on&cachePolicy=iffresh&indexText=on&crawlingMode=url&mustnotmatch=&crawlingDomFilterDepth=1&crawlingDomFilterCheck=off&crawlingstart=Start%20New%20Crawl&xpstopw=off&repeat_unit=seldays&crawlingDepth=99&directDocByURL=off";
|
||||
path += "&crawlingURL=" + url.toNormalform(true, false);
|
||||
WorkTables.execAPICall(
|
||||
"localhost",
|
||||
|
|
|
@ -85,8 +85,10 @@ public class Crawler_p {
|
|||
prop.put("localCrawlState", "");
|
||||
prop.put("limitCrawlSize", sb.crawlQueues.limitCrawlJobSize());
|
||||
prop.put("limitCrawlState", "");
|
||||
prop.put("remoteCrawlSize", sb.crawlQueues.limitCrawlJobSize());
|
||||
prop.put("remoteCrawlSize", sb.crawlQueues.remoteTriggeredCrawlJobSize());
|
||||
prop.put("remoteCrawlState", "");
|
||||
prop.put("noloadCrawlSize", sb.crawlQueues.noloadCrawlJobSize());
|
||||
prop.put("noloadCrawlState", "");
|
||||
prop.put("list-remote", 0);
|
||||
prop.put("forwardToCrawlStart", "0");
|
||||
|
||||
|
|
|
@ -79,7 +79,7 @@ public class queues_p {
|
|||
prop.put("limitCrawlState", STATE_RUNNING);
|
||||
stackSize = sb.crawlQueues.noticeURL.stackSize(NoticedURL.StackType.LIMIT);
|
||||
|
||||
//global crawl queue
|
||||
//remote crawl queue
|
||||
prop.putNum("remoteCrawlSize", sb.getThread(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL).getJobCount());
|
||||
prop.put("remoteCrawlState", sb.crawlJobIsPaused(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL) ? STATE_PAUSED : STATE_RUNNING);
|
||||
stackSize = sb.crawlQueues.noticeURL.stackSize(NoticedURL.StackType.LIMIT);
|
||||
|
@ -89,6 +89,12 @@ public class queues_p {
|
|||
} else {
|
||||
addNTable(sb, prop, "list-remote", sb.crawlQueues.noticeURL.top(NoticedURL.StackType.LIMIT, Math.min(10, stackSize)));
|
||||
}
|
||||
|
||||
//noload crawl queue
|
||||
prop.putNum("noloadCrawlSize", sb.crawlQueues.noloadCrawlJobSize());
|
||||
prop.put("noloadCrawlState", STATE_RUNNING);
|
||||
//stackSize = sb.crawlQueues.noticeURL.stackSize(NoticedURL.StackType.NOLOAD);
|
||||
|
||||
|
||||
// return rewrite properties
|
||||
return prop;
|
||||
|
|
|
@ -64,4 +64,8 @@
|
|||
</entry>
|
||||
#{/list-remote}#
|
||||
</remotecrawlerqueue>
|
||||
<noloadcrawlerqueue>
|
||||
<size>#[noloadCrawlSize]#</size>
|
||||
<state>#[noloadCrawlState]#</state>
|
||||
</noloadcrawlerqueue>
|
||||
</queues>
|
||||
|
|
|
@ -38,6 +38,7 @@ public class status_p {
|
|||
prop.putNum("localCrawlSize", sb.getThread(SwitchboardConstants.CRAWLJOB_LOCAL_CRAWL).getJobCount());
|
||||
prop.putNum("limitCrawlSize", sb.crawlQueues.limitCrawlJobSize());
|
||||
prop.putNum("remoteCrawlSize", sb.getThread(SwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL).getJobCount());
|
||||
prop.putNum("noloadCrawlSize", sb.crawlQueues.noloadCrawlJobSize());
|
||||
prop.putNum("loaderSize", sb.crawlQueues.workerSize());
|
||||
prop.putNum("loaderMax", sb.getConfigLong(SwitchboardConstants.CRAWLER_THREADS_ACTIVE_MAX, 10));
|
||||
|
||||
|
|
|
@ -17,6 +17,9 @@
|
|||
<remotecrawlerqueue>
|
||||
<size>#[remoteCrawlSize]#</size>
|
||||
</remotecrawlerqueue>
|
||||
<noloadcrawlerqueue>
|
||||
<size>#[noloadCrawlSize]#</size>
|
||||
</noloadcrawlerqueue>
|
||||
|
||||
<memory>
|
||||
<free>#[freeMemory]#</free>
|
||||
|
|
|
@ -499,6 +499,10 @@ public class CrawlQueues {
|
|||
return this.noticeURL.stackSize(NoticedURL.StackType.LIMIT);
|
||||
}
|
||||
|
||||
public int noloadCrawlJobSize() {
|
||||
return this.noticeURL.stackSize(NoticedURL.StackType.NOLOAD);
|
||||
}
|
||||
|
||||
public int remoteTriggeredCrawlJobSize() {
|
||||
return this.noticeURL.stackSize(NoticedURL.StackType.REMOTE);
|
||||
}
|
||||
|
|
|
@ -1284,6 +1284,7 @@ public final class Switchboard extends serverSwitch {
|
|||
this.crawlQueues.coreCrawlJobSize() > 0 ||
|
||||
this.crawlQueues.limitCrawlJobSize() > 0 ||
|
||||
this.crawlQueues.remoteTriggeredCrawlJobSize() > 0 ||
|
||||
this.crawlQueues.noloadCrawlJobSize() > 0 ||
|
||||
(this.crawlStacker != null && !this.crawlStacker.isEmpty()) ||
|
||||
this.crawlQueues.noticeURL.notEmpty())
|
||||
return false;
|
||||
|
|
Loading…
Reference in New Issue
Block a user