mirror of
https://github.com/yacy/yacy_search_server.git
synced 2024-09-19 00:01:41 +02:00
*) displaying current active + current idle threads in PerformanceQueues_p.html now
git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1470 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
parent
859c6a88f5
commit
56e4dbeb71
|
@ -118,6 +118,8 @@ Changes take effect immediately</td>
|
|||
<td class="small" width="80">maximum Active</td>
|
||||
<td class="small" width="80">maximum Idle</td>
|
||||
<td class="small" width="80">minimum Idle</td>
|
||||
<td class="small" width="80">current Active</td>
|
||||
<td class="small" width="80">current Idle</td>
|
||||
<td class="small">Full Description</td>
|
||||
</tr>
|
||||
#{pool}#
|
||||
|
@ -126,11 +128,13 @@ Changes take effect immediately</td>
|
|||
<td class="small" align="right"><input name="#[name]#_maxActive" type="text" size="8" maxlength="8" value="#[maxActive]#"></td>
|
||||
<td class="small" align="right"><input name="#[name]#_maxIdle" type="text" size="8" maxlength="8" value="#[maxIdle]#"></td>
|
||||
<td class="small" align="right"><input name="#[name]#_minIdle" type="text" size="8" maxlength="8" value="#[minIdle]#"></td>
|
||||
<td class="small" align="right">#[numActive]#</td>
|
||||
<td class="small" align="right">#[numIdle]#</td>
|
||||
<td class="small" align="left"></td>
|
||||
</tr>
|
||||
#{/pool}#
|
||||
<tr class="TableCellLight">
|
||||
<td class="small" align="left" colspan="5">
|
||||
<td class="small" align="left" colspan="7">
|
||||
<input type="submit" name="poolConfig" value="Enter new Threadpool Configuration">
|
||||
Changes take effect immediately</td>
|
||||
</tr>
|
||||
|
|
|
@ -279,19 +279,25 @@ public class PerformanceQueues_p {
|
|||
prop.put("pool_0_maxActive",crawlerPoolConfig.maxActive);
|
||||
prop.put("pool_0_maxIdle",crawlerPoolConfig.maxIdle);
|
||||
prop.put("pool_0_minIdle",crawlerPoolConfig.minIdle);
|
||||
prop.put("pool_0_numActive",switchboard.cacheLoader.getNumActiveWorker());
|
||||
prop.put("pool_0_numIdle",switchboard.cacheLoader.getNumIdleWorker());
|
||||
|
||||
serverThread httpd = switchboard.getThread("10_httpd");
|
||||
GenericObjectPool.Config httpdPoolConfig = ((serverCore)httpd).getPoolConfig();
|
||||
prop.put("pool_1_name","httpd Session Pool");
|
||||
prop.put("pool_1_maxActive",httpdPoolConfig.maxActive);
|
||||
prop.put("pool_1_maxIdle",httpdPoolConfig.maxIdle);
|
||||
prop.put("pool_1_minIdle",httpdPoolConfig.minIdle);
|
||||
prop.put("pool_1_minIdle",httpdPoolConfig.minIdle);
|
||||
prop.put("pool_1_numActive",((serverCore)httpd).getActiveSessionCount());
|
||||
prop.put("pool_1_numIdle",((serverCore)httpd).getIdleSessionCount());
|
||||
|
||||
GenericObjectPool.Config stackerPoolConfig = switchboard.sbStackCrawlThread.getPoolConfig();
|
||||
prop.put("pool_2_name","CrawlStacker Session Pool");
|
||||
prop.put("pool_2_maxActive",stackerPoolConfig.maxActive);
|
||||
prop.put("pool_2_maxIdle",stackerPoolConfig.maxIdle);
|
||||
prop.put("pool_2_minIdle",stackerPoolConfig.minIdle);
|
||||
prop.put("pool_2_minIdle",stackerPoolConfig.minIdle);
|
||||
prop.put("pool_2_numActive",switchboard.sbStackCrawlThread.getNumActiveWorker());
|
||||
prop.put("pool_2_numIdle",switchboard.sbStackCrawlThread.getNumIdleWorker());
|
||||
prop.put("pool",3);
|
||||
|
||||
// return rewrite values for templates
|
||||
|
|
|
@ -200,6 +200,14 @@ public final class plasmaCrawlLoader extends Thread {
|
|||
}
|
||||
}
|
||||
|
||||
public int getNumIdleWorker() {
|
||||
return crawlwerPool.getNumIdle();
|
||||
}
|
||||
|
||||
public int getNumActiveWorker() {
|
||||
return size();
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return crawlwerPool.getNumActive();
|
||||
}
|
||||
|
|
|
@ -137,6 +137,14 @@ public final class plasmaCrawlStacker {
|
|||
}
|
||||
}
|
||||
|
||||
public int getNumActiveWorker() {
|
||||
return this.theWorkerPool.getNumActive();
|
||||
}
|
||||
|
||||
public int getNumIdleWorker() {
|
||||
return this.theWorkerPool.getNumIdle();
|
||||
}
|
||||
|
||||
public int size() {
|
||||
return this.queue.size();
|
||||
}
|
||||
|
@ -636,7 +644,9 @@ public final class plasmaCrawlStacker {
|
|||
public void destroyObject(Object obj) {
|
||||
if (obj instanceof Worker) {
|
||||
Worker theWorker = (Worker) obj;
|
||||
((Worker)obj).setName("stackCrawlThread_destroyed");
|
||||
theWorker.setStopped(true);
|
||||
theWorker.interrupt();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -719,6 +729,7 @@ public final class plasmaCrawlStacker {
|
|||
if (this.isClosed) return;
|
||||
if (obj instanceof Worker) {
|
||||
try {
|
||||
((Worker)obj).setName("stackCrawlThread_invalidated");
|
||||
((Worker)obj).setStopped(true);
|
||||
super.invalidateObject(obj);
|
||||
} catch (Exception e) {
|
||||
|
@ -834,6 +845,7 @@ public final class plasmaCrawlStacker {
|
|||
}
|
||||
|
||||
public void run() {
|
||||
boolean interrupted = false;
|
||||
this.running = true;
|
||||
|
||||
try {
|
||||
|
@ -856,9 +868,10 @@ public final class plasmaCrawlStacker {
|
|||
}
|
||||
}
|
||||
} catch (InterruptedException ex) {
|
||||
interrupted = true;
|
||||
serverLog.logInfo("STACKCRAWL-POOL","Interruption of thread '" + this.getName() + "' detected.");
|
||||
} finally {
|
||||
if (plasmaCrawlStacker.this.theWorkerPool != null)
|
||||
if (plasmaCrawlStacker.this.theWorkerPool != null && !interrupted)
|
||||
plasmaCrawlStacker.this.theWorkerPool.invalidateObject(this);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user