Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

removed the indexing queue. This queue was superfluous since the introduction of the blocking queues last year, where documents are parsed, analysed and stored in the index with concurrency. - The indexing queue was a historic data structure that was introduced at the very beginning at the project as a part of the switchboard organisation object structure. Without the indexing queue the switchboard queue becomes also superfluous. It has been removed as well. - Removing the switchboard queue requires that all servlets are called without a opaque generic ('<?>'). That caused that all serlets had to be modified. - Many servlets displayed the indexing queue or the size of that queue. In the past months the indexer was so fast that mostly the indexing queue appeared empty, so there was no use of it any more. Because the queue has been removed, the display in the servlets had also to be removed. - The surrogate work task had been a part of the indexing queue control structure. Without the indexing queue the surrogates needed its own task management. That has been integrated here. - Because the indexing queue had a special queue entry object and properties attached to this object, the propterties had to be moved to the queue entry object which is part of the new indexing queue withing the blocking queue, the Response Object. That object has now also the new properties of the removed indexing queue entry object.

orbiter5bb80741505f
diff --git a/defaults/yacy.init b/defaults/yacy.init
index 5abb2b88f..e0daf6d0d 100644
--- a/defaults/yacy.init
+++ b/defaults/yacy.init
@@ -577,9 +577,9 @@ filterOutStopwordsFromTopwords=true
62_remotetriggeredcrawl_busysleep=1000
62_remotetriggeredcrawl_memprereq=12582912
62_remotetriggeredcrawl_isPaused=false
-80_indexing_idlesleep=1000
-80_indexing_busysleep=0
-80_indexing_memprereq=12582912
+70_surrogates_idlesleep=10000
+70_surrogates_busysleep=0
+70_surrogates_memprereq=12582912
90_cleanup_idlesleep=300000
90_cleanup_busysleep=300000
90_cleanup_memprereq=0
diff --git a/htroot/AccessTracker_p.java b/htroot/AccessTracker_p.java
index 297df91f6..d66cd1cd1 100644
--- a/htroot/AccessTracker_p.java
+++ b/htroot/AccessTracker_p.java
@@ -56,7 +56,7 @@ public class AccessTracker_p {
return accessClone;
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// return variable that accumulates replacements
diff --git a/htroot/Banner.java b/htroot/Banner.java
index 75411aad0..59e098c32 100644
--- a/htroot/Banner.java
+++ b/htroot/Banner.java
@@ -43,7 +43,7 @@ import de.anomic.ymage.ymageMatrix;
/** draw a banner with information about the peer */
public class Banner {
- public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) throws IOException {
+ public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) throws IOException {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final String IMAGE = "htroot/env/grafics/yacy.gif";
int width = 468;
diff --git a/htroot/BlacklistCleaner_p.java b/htroot/BlacklistCleaner_p.java
index 369ea0307..cc71ba08f 100644
--- a/htroot/BlacklistCleaner_p.java
+++ b/htroot/BlacklistCleaner_p.java
@@ -75,7 +75,7 @@ public class BlacklistCleaner_p {
DefaultBlacklist.class
};
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
// initialize the list manager
diff --git a/htroot/BlacklistImpExp_p.java b/htroot/BlacklistImpExp_p.java
index 47a4e3201..35cee7115 100644
--- a/htroot/BlacklistImpExp_p.java
+++ b/htroot/BlacklistImpExp_p.java
@@ -44,7 +44,7 @@ import java.util.List;
public class BlacklistImpExp_p {
private final static String DISABLED = "disabled_";
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// initialize the list manager
diff --git a/htroot/BlacklistTest_p.java b/htroot/BlacklistTest_p.java
index 5a57baa88..957475501 100644
--- a/htroot/BlacklistTest_p.java
+++ b/htroot/BlacklistTest_p.java
@@ -42,7 +42,7 @@ import de.anomic.yacy.yacyURL;
public class BlacklistTest_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// initialize the list manager
listManager.switchboard = (plasmaSwitchboard) env;
diff --git a/htroot/Blacklist_p.java b/htroot/Blacklist_p.java
index f0104bb92..fd31a2c1f 100644
--- a/htroot/Blacklist_p.java
+++ b/htroot/Blacklist_p.java
@@ -59,7 +59,7 @@ public class Blacklist_p {
private final static String BLACKLIST_FILENAME_FILTER = "^.*\\.black$";
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// initialize the list manager
listManager.switchboard = (plasmaSwitchboard) env;
diff --git a/htroot/Blog.java b/htroot/Blog.java
index 2bce969e0..6f0e0c220 100644
--- a/htroot/Blog.java
+++ b/htroot/Blog.java
@@ -56,7 +56,7 @@ public class Blog {
return SimpleFormatter.format(date);
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
blogBoard.BlogEntry page = null;
diff --git a/htroot/BlogComments.java b/htroot/BlogComments.java
index c5a609cde..d1bfa8323 100644
--- a/htroot/BlogComments.java
+++ b/htroot/BlogComments.java
@@ -58,7 +58,7 @@ public class BlogComments {
return SimpleFormatter.format(date);
}
- public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
blogBoard.BlogEntry page = null;
diff --git a/htroot/Bookmarks.java b/htroot/Bookmarks.java
index cacfb64f3..961430190 100644
--- a/htroot/Bookmarks.java
+++ b/htroot/Bookmarks.java
@@ -67,7 +67,7 @@ public class Bookmarks {
final static boolean TAGS = false;
final static boolean FOLDERS = true;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
int max_count = 10;
int start=0;
diff --git a/htroot/CacheResource_p.java b/htroot/CacheResource_p.java
index ff3441c6d..d79e459b2 100644
--- a/htroot/CacheResource_p.java
+++ b/htroot/CacheResource_p.java
@@ -36,7 +36,7 @@ import de.anomic.server.serverSwitch;
public class CacheResource_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/Collage.java b/htroot/Collage.java
index 438bbb5bf..1386ee81e 100755
--- a/htroot/Collage.java
+++ b/htroot/Collage.java
@@ -43,7 +43,7 @@ public class Collage {
private static long imgZIndex[] = new long[fifoMax];
private static final Random rand = new Random();
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final boolean authenticated = sb.verifyAuthentication(header, false);
diff --git a/htroot/ConfigAccounts_p.java b/htroot/ConfigAccounts_p.java
index 1a1e25a7b..eb9a38010 100644
--- a/htroot/ConfigAccounts_p.java
+++ b/htroot/ConfigAccounts_p.java
@@ -41,7 +41,7 @@ import de.anomic.server.serverSwitch;
public class ConfigAccounts_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
userDB.Entry entry=null;
diff --git a/htroot/ConfigAppearance_p.java b/htroot/ConfigAppearance_p.java
index 7f503bdf9..ec8964f21 100644
--- a/htroot/ConfigAppearance_p.java
+++ b/htroot/ConfigAppearance_p.java
@@ -47,7 +47,7 @@ import de.anomic.yacy.yacyURL;
public class ConfigAppearance_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final String skinPath = new File(env.getRootPath(), env.getConfig("skinPath", "DATA/SKINS")).toString();
diff --git a/htroot/ConfigBasic.java b/htroot/ConfigBasic.java
index 36bec9b6b..4dbaab0d9 100644
--- a/htroot/ConfigBasic.java
+++ b/htroot/ConfigBasic.java
@@ -54,7 +54,7 @@ public class ConfigBasic {
private static final int NEXTSTEP_PEERPORT = 3;
private static final int NEXTSTEP_RECONNECT = 4;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/ConfigLanguage_p.java b/htroot/ConfigLanguage_p.java
index a30f791d8..e58a1f226 100644
--- a/htroot/ConfigLanguage_p.java
+++ b/htroot/ConfigLanguage_p.java
@@ -50,7 +50,7 @@ import de.anomic.yacy.yacyURL;
public class ConfigLanguage_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
//listManager.switchboard = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
final String langPath = env.getConfigPath("locale.work", "DATA/LOCALE/locales").getAbsolutePath();
diff --git a/htroot/ConfigLiveSearch.java b/htroot/ConfigLiveSearch.java
index f4c08fa27..580acbfd8 100644
--- a/htroot/ConfigLiveSearch.java
+++ b/htroot/ConfigLiveSearch.java
@@ -28,7 +28,7 @@ import de.anomic.server.serverSwitch;
public class ConfigLiveSearch {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/ConfigNetwork_p.java b/htroot/ConfigNetwork_p.java
index a917128dd..26f527296 100644
--- a/htroot/ConfigNetwork_p.java
+++ b/htroot/ConfigNetwork_p.java
@@ -40,7 +40,7 @@ import de.anomic.server.serverSwitch;
public class ConfigNetwork_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/ConfigPHPBB3Search.java b/htroot/ConfigPHPBB3Search.java
index e7cef0763..f9088c9ea 100644
--- a/htroot/ConfigPHPBB3Search.java
+++ b/htroot/ConfigPHPBB3Search.java
@@ -32,7 +32,7 @@ import de.anomic.server.serverSwitch;
public class ConfigPHPBB3Search {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/ConfigParser.java b/htroot/ConfigParser.java
index c4bfc5002..c79476fff 100644
--- a/htroot/ConfigParser.java
+++ b/htroot/ConfigParser.java
@@ -32,7 +32,7 @@ import de.anomic.server.serverSwitch;
public class ConfigParser {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/ConfigPortal.java b/htroot/ConfigPortal.java
index 9e4c2b290..d45b49411 100644
--- a/htroot/ConfigPortal.java
+++ b/htroot/ConfigPortal.java
@@ -29,7 +29,7 @@ import de.anomic.server.serverSwitch;
public class ConfigPortal {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/ConfigProfile_p.java b/htroot/ConfigProfile_p.java
index 737c630b5..fc9b61058 100644
--- a/htroot/ConfigProfile_p.java
+++ b/htroot/ConfigProfile_p.java
@@ -44,7 +44,7 @@ import de.anomic.yacy.yacyNewsRecord;
public class ConfigProfile_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
final Properties profile = new Properties();
diff --git a/htroot/ConfigProperties_p.java b/htroot/ConfigProperties_p.java
index 0fad020ad..6fac6d437 100644
--- a/htroot/ConfigProperties_p.java
+++ b/htroot/ConfigProperties_p.java
@@ -39,7 +39,7 @@ import de.anomic.server.serverSwitch;
public class ConfigProperties_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
int count=0;
diff --git a/htroot/ConfigRobotsTxt_p.java b/htroot/ConfigRobotsTxt_p.java
index 381729a27..6dccc106a 100644
--- a/htroot/ConfigRobotsTxt_p.java
+++ b/htroot/ConfigRobotsTxt_p.java
@@ -39,7 +39,7 @@ import de.anomic.server.servletProperties;
public class ConfigRobotsTxt_p {
- public static servletProperties respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static servletProperties respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final servletProperties prop = new servletProperties();
diff --git a/htroot/ConfigUpdate_p.java b/htroot/ConfigUpdate_p.java
index 58865fa5d..d3e780570 100644
--- a/htroot/ConfigUpdate_p.java
+++ b/htroot/ConfigUpdate_p.java
@@ -42,7 +42,7 @@ import de.anomic.yacy.yacyVersion;
public class ConfigUpdate_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/ConfigWikiSearch.java b/htroot/ConfigWikiSearch.java
index e8074e9e0..7d8488224 100644
--- a/htroot/ConfigWikiSearch.java
+++ b/htroot/ConfigWikiSearch.java
@@ -32,7 +32,7 @@ import de.anomic.server.serverSwitch;
public class ConfigWikiSearch {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/Connections_p.java b/htroot/Connections_p.java
index 1a50bb477..be0b6369a 100644
--- a/htroot/Connections_p.java
+++ b/htroot/Connections_p.java
@@ -50,7 +50,7 @@ import de.anomic.yacy.yacySeed;
public final class Connections_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/ContentIntegrationPHPBB3_p.java b/htroot/ContentIntegrationPHPBB3_p.java
index 9321285fa..a889c9235 100644
--- a/htroot/ContentIntegrationPHPBB3_p.java
+++ b/htroot/ContentIntegrationPHPBB3_p.java
@@ -35,7 +35,7 @@ import de.anomic.server.serverSwitch;
public class ContentIntegrationPHPBB3_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/CookieMonitorIncoming_p.java b/htroot/CookieMonitorIncoming_p.java
index 945b516ab..d9df472f0 100644
--- a/htroot/CookieMonitorIncoming_p.java
+++ b/htroot/CookieMonitorIncoming_p.java
@@ -36,7 +36,7 @@ import de.anomic.server.serverSwitch;
public class CookieMonitorIncoming_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> sb) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch sb) {
final plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
// return variable that accumulates replacements
diff --git a/htroot/CookieMonitorOutgoing_p.java b/htroot/CookieMonitorOutgoing_p.java
index d3b6c2dfd..fb3226803 100644
--- a/htroot/CookieMonitorOutgoing_p.java
+++ b/htroot/CookieMonitorOutgoing_p.java
@@ -36,7 +36,7 @@ import de.anomic.server.serverSwitch;
public class CookieMonitorOutgoing_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> sb) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch sb) {
final plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
// return variable that accumulates replacements
diff --git a/htroot/CookieTest_p.java b/htroot/CookieTest_p.java
index d6eb313c1..b2cdc9e23 100644
--- a/htroot/CookieTest_p.java
+++ b/htroot/CookieTest_p.java
@@ -37,7 +37,7 @@ import de.anomic.server.servletProperties;
public class CookieTest_p {
- public static serverObjects respond(final httpResponseHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpResponseHeader header, final serverObjects post, final serverSwitch env) {
// case if no values are requested
diff --git a/htroot/CrawlProfileEditor_p.java b/htroot/CrawlProfileEditor_p.java
index 490c9e8ca..b17a68bac 100644
--- a/htroot/CrawlProfileEditor_p.java
+++ b/htroot/CrawlProfileEditor_p.java
@@ -79,7 +79,7 @@ public class CrawlProfileEditor_p {
labels.add(new eentry(entry.XPSTOPW, "Parent stop-words", false, eentry.BOOLEAN));
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final servletProperties prop = new servletProperties();
final plasmaSwitchboard sb = (plasmaSwitchboard)env;
diff --git a/htroot/CrawlResults.java b/htroot/CrawlResults.java
index 6893c88d7..1db9933af 100644
--- a/htroot/CrawlResults.java
+++ b/htroot/CrawlResults.java
@@ -42,7 +42,7 @@ import de.anomic.yacy.logging.Log;
public class CrawlResults {
- public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/CrawlStart_p.java b/htroot/CrawlStart_p.java
index ee52d04e7..2eed7b1a9 100644
--- a/htroot/CrawlStart_p.java
+++ b/htroot/CrawlStart_p.java
@@ -33,7 +33,7 @@ import de.anomic.server.serverSwitch;
public class CrawlStart_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/FeedReader_p.java b/htroot/FeedReader_p.java
index 99122866a..d2af2f211 100644
--- a/htroot/FeedReader_p.java
+++ b/htroot/FeedReader_p.java
@@ -38,7 +38,7 @@ import de.anomic.yacy.yacyURL;
public class FeedReader_p {
- public static servletProperties respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static servletProperties respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final servletProperties prop = new servletProperties();
prop.put("page", "0");
diff --git a/htroot/Help.java b/htroot/Help.java
index 40519be53..8ae4f0eb3 100644
--- a/htroot/Help.java
+++ b/htroot/Help.java
@@ -6,7 +6,7 @@ import de.anomic.server.servletProperties;
//dummy class
public class Help {
- public static servletProperties respond(final httpRequestHeader requestHeader, final serverObjects post, final serverSwitch<?> env) {
+ public static servletProperties respond(final httpRequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
final servletProperties prop = new servletProperties();
return prop;
}
diff --git a/htroot/IndexCleaner_p.java b/htroot/IndexCleaner_p.java
index babba6156..f92224736 100755
--- a/htroot/IndexCleaner_p.java
+++ b/htroot/IndexCleaner_p.java
@@ -35,7 +35,7 @@ public class IndexCleaner_p {
private static MetadataRepository.BlacklistCleaner urldbCleanerThread = null;
private static Segment.ReferenceCleaner indexCleanerThread = null;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
prop.put("title", "DbCleanup_p");
diff --git a/htroot/IndexControlRWIs_p.java b/htroot/IndexControlRWIs_p.java
index ec2edb205..e30963ffd 100644
--- a/htroot/IndexControlRWIs_p.java
+++ b/htroot/IndexControlRWIs_p.java
@@ -64,7 +64,7 @@ import de.anomic.yacy.dht.PeerSelection;
public class IndexControlRWIs_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/IndexControlURLs_p.java b/htroot/IndexControlURLs_p.java
index e0aa3d86e..c7ecb1d50 100644
--- a/htroot/IndexControlURLs_p.java
+++ b/htroot/IndexControlURLs_p.java
@@ -44,7 +44,7 @@ import de.anomic.yacy.yacyURL;
public class IndexControlURLs_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/IndexCreateIndexingQueue_p.html b/htroot/IndexCreateIndexingQueue_p.html
deleted file mode 100644
index c127527b0..000000000
--- a/htroot/IndexCreateIndexingQueue_p.html
+++ /dev/null
@@ -1,97 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
-<html xmlns="http://www.w3.org/1999/xhtml">
- <head>
- <title>YaCy '#[clientname]#': Indexing Queue</title>
- #%env/templates/metas.template%#
- </head>
- <body id="IndexCreateIndexingQueue">
- #%env/templates/header.template%#
- #%env/templates/submenuIndexCreate.template%#
- <h2>Indexing Queue</h2>
-
-
- #(indexing-queue)#
- <p>The indexing queue is empty</p>
- ::
- <form action="IndexCreateIndexingQueue_p.html" method="post" enctype="multipart/form-data">
- <fieldset>
- <input type="submit" name="clearIndexingQueue" value="clear indexing queue" />
- </fieldset>
- </form>
- <p>There are <strong>#[num]#</strong> entries in the indexing queue. Showing <strong>#[show]#</strong> entries with a total size of <strong>#[totalSize]#</strong>.</p>
- <p>Show last <a href="IndexCreateIndexingQueue_p.html?limit=50">50</a> | <a href="IndexCreateIndexingQueue_p.html?limit=100">100</a> | <a href="IndexCreateIndexingQueue_p.html?limit=250">250</a> | <a href="IndexCreateIndexingQueue_p.html?limit=500">500</a> entries.</p>
-
- <table border="0" cellpadding="2" cellspacing="1">
- <colgroup>
- <col width="60" />
- <col width="10" />
- <col width="80" />
- <col width="180" />
- <col />
- <col width="80" />
- <col width="10" />
- </colgroup>
- <tr class="TableHeader">
- <th>Initiator</th>
- <th>Depth</th>
- <th>Modified Date</th>
- <th>Anchor Name</th>
- <th>URL</th>
- <th>Size</th>
- <th>Delete</th>
- </tr>
- #{list}#
- <tr class="TableCell#(dark)#Light::Dark::Summary#(/dark)#">
- <td>#[initiator]#</td>
- <td>#[depth]#</td>
- <td>#[modified]#</td>
- <td>#[anchor]#</td>
- <td><a href="#[url]#">#[url]#</a></td>
- <td align="right">#[size]#</td>
- <td title="#[hash]#">#(inProcess)#<a href="IndexCreateIndexingQueue_p.html?deleteEntry=#[hash]#">[Delete]</a>::#(/inProcess)#</td>
- </tr>
- #{/list}#
- </table>
- #(/indexing-queue)#
-
-
- #(rejected)#
- ::
- <form action="IndexCreateIndexingQueue_p.html" method="post" enctype="multipart/form-data">
- <p><strong>Rejected URL List:</strong>&nbsp;There are #[num]# entries in the rejected-urls list. </p>
- #(only-latest)#
- <fieldset>
- ::
- <p>Showing latest #[num]# entries.</p>
- <fieldset>
- <input type="hidden" name="showRejected" value="#[newnum]#" />
- <input type="submit" name="moreRejected" value="show more" />&nbsp;
- #(/only-latest)#
- <input type="submit" name="clearRejected" value="clear list" />
- </fieldset>
- </form>
- <p>There are #[num]# entries in the rejected-queue:</p>
- <table border="0" cellpadding="2" cellspacing="1">
- <colgroup>
- <col width="60" span="2" />
- <col span="2" />
- </colgroup>
- <tr class="TableHeader">
- <th>Initiator</th>
- <th>Executor</th>
- <th>URL</th>
- <th>Fail-Reason</th>
- </tr>
- #{list}#
- <tr class="TableCell#(dark)#Light::Dark#(/dark)#">
- <td>#[initiator]#</td>
- <td>#[executor]#</td>
- <td><a href="#[url]#">#[url]#</a></td>
- <td>#[failreason]#</td>
- </tr>
- #{/list}#
- </table>
- #(/rejected)#
- #%env/templates/footer.template%#
- </body>
-</html>
diff --git a/htroot/IndexCreateIndexingQueue_p.java b/htroot/IndexCreateIndexingQueue_p.java
deleted file mode 100644
index b8492d687..000000000
--- a/htroot/IndexCreateIndexingQueue_p.java
+++ /dev/null
@@ -1,181 +0,0 @@
-// IndexCreateIndexingQueue_p.java
-// -------------------------------
-// part of the AnomicHTTPD caching proxy
-// (C) by Michael Peter Christen; [email protected]
-// first published on http://www.anomic.de
-// Frankfurt, Germany, 2004, 2005
-// last major change: 04.07.2005
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-// You must compile this file with
-// javac -classpath .:../classes IndexCreate_p.java
-// if the shell's current path is HTROOT
-
-import java.util.ArrayList;
-import java.util.Iterator;
-
-import de.anomic.crawler.IndexingStack;
-import de.anomic.crawler.ZURL;
-import de.anomic.http.httpRequestHeader;
-import de.anomic.plasma.plasmaHTCache;
-import de.anomic.plasma.plasmaSwitchboard;
-import de.anomic.server.serverObjects;
-import de.anomic.server.serverSwitch;
-import de.anomic.tools.Formatter;
-import de.anomic.yacy.yacySeed;
-import de.anomic.yacy.yacyURL;
-
-public class IndexCreateIndexingQueue_p {
-
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
- // return variable that accumulates replacements
- final plasmaSwitchboard sb = (plasmaSwitchboard) env;
- final serverObjects prop = new serverObjects();
- prop.put("rejected", "0");
- int showRejectedCount = 100;
-
- int showLimit = 100;
- if (post != null) {
- if (post.containsKey("limit")) {
- try {
- showLimit = Integer.valueOf(post.get("limit")).intValue();
- } catch (final NumberFormatException e) {}
- }
-
- if (post.containsKey("clearRejected")) {
- sb.crawlQueues.errorURL.clearStack();
- }
- if (post.containsKey("moreRejected")) {
- showRejectedCount = post.getInt("showRejected", 10);
- }
- if (post.containsKey("clearIndexingQueue")) {
- try {
- synchronized (sb.crawler.indexingStack) {
- IndexingStack.QueueEntry entry = null;
- while ((entry = sb.crawler.indexingStack.pop()) != null) {
- if ((entry != null) && (entry.profile() != null) && (!(entry.profile().storeHTCache()))) {
- plasmaHTCache.deleteFromCache(entry.url());
- }
- }
- sb.crawler.indexingStack.clear(); // reset file to clean up content completely
- }
- } catch (final Exception e) {}
- } else if (post.containsKey("deleteEntry")) {
- final String urlHash = post.get("deleteEntry");
- try {
- sb.crawler.indexingStack.remove(urlHash);
- } catch (final Exception e) {}
- prop.put("LOCATION","");
- return prop;
- }
- }
-
- yacySeed initiator;
- boolean dark;
-
- if ((sb.crawler.indexingStack.size() == 0) && (sb.getActiveQueueSize() == 0)) {
- prop.put("indexing-queue", "0"); //is empty
- } else {
- prop.put("indexing-queue", "1"); // there are entries in the queue or in process
-
- dark = true;
- IndexingStack.QueueEntry pcentry;
- int entryCount = 0, totalCount = 0;
- long totalSize = 0;
-
- // getting all entries that are currently in process
- final ArrayList<IndexingStack.QueueEntry> entryList = new ArrayList<IndexingStack.QueueEntry>();
- final int inProcessCount = entryList.size();
-
- // getting all enqueued entries
- if ((sb.crawler.indexingStack.size() > 0)) {
- final Iterator<IndexingStack.QueueEntry> i = sb.crawler.indexingStack.entryIterator(false);
- while (i.hasNext()) entryList.add(i.next());
- }
-
- final int count=entryList.size();
- totalCount = count;
- for (int i = 0; (i < count) && (entryCount < showLimit); i++) {
-
- final boolean inProcess = i < inProcessCount;
- pcentry = entryList.get(i);
- if ((pcentry != null)&&(pcentry.url() != null)) {
- final long entrySize = pcentry.size();
- totalSize += entrySize;
- initiator = sb.peers.getConnected(pcentry.initiator());
- prop.put("indexing-queue_list_"+entryCount+"_dark", inProcess ? "2" : (dark ? "1" : "0"));
- prop.putHTML("indexing-queue_list_"+entryCount+"_initiator", ((initiator == null) ? "proxy" : initiator.getName()));
- prop.put("indexing-queue_list_"+entryCount+"_depth", pcentry.depth());
- prop.put("indexing-queue_list_"+entryCount+"_modified", pcentry.getModificationDate().toString());
- prop.putHTML("indexing-queue_list_"+entryCount+"_anchor", (pcentry.anchorName()==null)?"":pcentry.anchorName());
- prop.putHTML("indexing-queue_list_"+entryCount+"_url", pcentry.url().toNormalform(false, true));
- prop.put("indexing-queue_list_"+entryCount+"_size", Formatter.bytesToString(entrySize));
- prop.put("indexing-queue_list_"+entryCount+"_inProcess", inProcess ? "1" :"0");
- prop.put("indexing-queue_list_"+entryCount+"_inProcess_hash", pcentry.url().hash());
- dark = !dark;
- entryCount++;
- }
- }
-
- prop.putNum("indexing-queue_show", entryCount);//show shown entries
- prop.putNum("indexing-queue_num", totalCount); //num entries in queue
- prop.put("indexing-queue_totalSize", Formatter.bytesToString(totalSize));//num entries in queue
- prop.putNum("indexing-queue_list", entryCount);
- }
-
- // failure cases
- if (sb.crawlQueues.errorURL.stackSize() != 0) {
- if (showRejectedCount > sb.crawlQueues.errorURL.stackSize()) showRejectedCount = sb.crawlQueues.errorURL.stackSize();
- prop.put("rejected", "1");
- prop.putNum("rejected_num", sb.crawlQueues.errorURL.stackSize());
- if (showRejectedCount != sb.crawlQueues.errorURL.stackSize()) {
- prop.put("rejected_only-latest", "1");
- prop.putNum("rejected_only-latest_num", showRejectedCount);
- prop.put("rejected_only-latest_newnum", ((int) (showRejectedCount * 1.5)));
- }else{
- prop.put("rejected_only-latest", "0");
- }
- dark = true;
- yacyURL url;
- String initiatorHash, executorHash;
- ZURL.Entry entry;
- yacySeed initiatorSeed, executorSeed;
- int j=0;
- for (int i = sb.crawlQueues.errorURL.stackSize() - 1; i >= (sb.crawlQueues.errorURL.stackSize() - showRejectedCount); i--) {
- entry = sb.crawlQueues.errorURL.top(i);
- if (entry == null) continue;
- url = entry.url();
- if (url == null) continue;
-
- initiatorHash = entry.initiator();
- executorHash = entry.executor();
- initiatorSeed = sb.peers.getConnected(initiatorHash);
- executorSeed = sb.peers.getConnected(executorHash);
- prop.putHTML("rejected_list_"+j+"_initiator", ((initiatorSeed == null) ? "proxy" : initiatorSeed.getName()));
- prop.putHTML("rejected_list_"+j+"_executor", ((executorSeed == null) ? "proxy" : executorSeed.getName()));
- prop.putHTML("rejected_list_"+j+"_url", url.toNormalform(false, true));
- prop.putHTML("rejected_list_"+j+"_failreason", entry.anycause());
- prop.put("rejected_list_"+j+"_dark", dark ? "1" : "0");
- dark = !dark;
- j++;
- }
- prop.put("rejected_list", j);
- }
-
- // return rewrite properties
- return prop;
- }
-}
diff --git a/htroot/IndexCreateLoaderQueue_p.java b/htroot/IndexCreateLoaderQueue_p.java
index 2763ead12..2ac8eb719 100644
--- a/htroot/IndexCreateLoaderQueue_p.java
+++ b/htroot/IndexCreateLoaderQueue_p.java
@@ -33,7 +33,7 @@ import de.anomic.yacy.yacySeed;
public class IndexCreateLoaderQueue_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/IndexCreateParserErrors_p.html b/htroot/IndexCreateParserErrors_p.html
new file mode 100644
index 000000000..1cffbc24e
--- /dev/null
+++ b/htroot/IndexCreateParserErrors_p.html
@@ -0,0 +1,51 @@
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml">
+ <head>
+ <title>YaCy '#[clientname]#': Parser Errors</title>
+ #%env/templates/metas.template%#
+ </head>
+ <body id="IndexCreateIndexingQueue">
+ #%env/templates/header.template%#
+ #%env/templates/submenuIndexCreate.template%#
+ <h2>Parser Errors</h2>
+
+ #(rejected)#
+ ::
+ <form action="IndexCreateParserErrors_p.html" method="post" enctype="multipart/form-data">
+ <p><strong>Rejected URL List:</strong>&nbsp;There are #[num]# entries in the rejected-urls list. </p>
+ #(only-latest)#
+ <fieldset>
+ ::
+ <p>Showing latest #[num]# entries.</p>
+ <fieldset>
+ <input type="hidden" name="showRejected" value="#[newnum]#" />
+ <input type="submit" name="moreRejected" value="show more" />&nbsp;
+ #(/only-latest)#
+ <input type="submit" name="clearRejected" value="clear list" />
+ </fieldset>
+ </form>
+ <p>There are #[num]# entries in the rejected-queue:</p>
+ <table border="0" cellpadding="2" cellspacing="1">
+ <colgroup>
+ <col width="60" span="2" />
+ <col span="2" />
+ </colgroup>
+ <tr class="TableHeader">
+ <th>Initiator</th>
+ <th>Executor</th>
+ <th>URL</th>
+ <th>Fail-Reason</th>
+ </tr>
+ #{list}#
+ <tr class="TableCell#(dark)#Light::Dark#(/dark)#">
+ <td>#[initiator]#</td>
+ <td>#[executor]#</td>
+ <td><a href="#[url]#">#[url]#</a></td>
+ <td>#[failreason]#</td>
+ </tr>
+ #{/list}#
+ </table>
+ #(/rejected)#
+ #%env/templates/footer.template%#
+ </body>
+</html>
diff --git a/htroot/IndexCreateParserErrors_p.java b/htroot/IndexCreateParserErrors_p.java
new file mode 100644
index 000000000..872aad724
--- /dev/null
+++ b/htroot/IndexCreateParserErrors_p.java
@@ -0,0 +1,96 @@
+// IndexCreateParserErrors_p.java
+// -------------------------------
+// (C) by Michael Peter Christen; [email protected]
+// first published on http://www.anomic.de
+// Frankfurt, Germany, 2004, 2005
+// last major change: 17.07.2009
+//
+// This program is free software; you can redistribute it and/or modify
+// it under the terms of the GNU General Public License as published by
+// the Free Software Foundation; either version 2 of the License, or
+// (at your option) any later version.
+//
+// This program is distributed in the hope that it will be useful,
+// but WITHOUT ANY WARRANTY; without even the implied warranty of
+// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+// GNU General Public License for more details.
+//
+// You should have received a copy of the GNU General Public License
+// along with this program; if not, write to the Free Software
+// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+
+
+import de.anomic.crawler.ZURL;
+import de.anomic.http.httpRequestHeader;
+import de.anomic.plasma.plasmaSwitchboard;
+import de.anomic.server.serverObjects;
+import de.anomic.server.serverSwitch;
+import de.anomic.yacy.yacySeed;
+import de.anomic.yacy.yacyURL;
+
+public class IndexCreateParserErrors_p {
+
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
+ // return variable that accumulates replacements
+ final plasmaSwitchboard sb = (plasmaSwitchboard) env;
+ final serverObjects prop = new serverObjects();
+ prop.put("rejected", "0");
+ int showRejectedCount = 100;
+
+ if (post != null) {
+
+ if (post.containsKey("clearRejected")) {
+ sb.crawlQueues.errorURL.clearStack();
+ }
+ if (post.containsKey("moreRejected")) {
+ showRejectedCount = post.getInt("showRejected", 10);
+ }
+ }
+ boolean dark;
+
+
+ prop.put("indexing-queue", "0"); //is empty
+
+ // failure cases
+ if (sb.crawlQueues.errorURL.stackSize() != 0) {
+ if (showRejectedCount > sb.crawlQueues.errorURL.stackSize()) showRejectedCount = sb.crawlQueues.errorURL.stackSize();
+ prop.put("rejected", "1");
+ prop.putNum("rejected_num", sb.crawlQueues.errorURL.stackSize());
+ if (showRejectedCount != sb.crawlQueues.errorURL.stackSize()) {
+ prop.put("rejected_only-latest", "1");
+ prop.putNum("rejected_only-latest_num", showRejectedCount);
+ prop.put("rejected_only-latest_newnum", ((int) (showRejectedCount * 1.5)));
+ }else{
+ prop.put("rejected_only-latest", "0");
+ }
+ dark = true;
+ yacyURL url;
+ String initiatorHash, executorHash;
+ ZURL.Entry entry;
+ yacySeed initiatorSeed, executorSeed;
+ int j=0;
+ for (int i = sb.crawlQueues.errorURL.stackSize() - 1; i >= (sb.crawlQueues.errorURL.stackSize() - showRejectedCount); i--) {
+ entry = sb.crawlQueues.errorURL.top(i);
+ if (entry == null) continue;
+ url = entry.url();
+ if (url == null) continue;
+
+ initiatorHash = entry.initiator();
+ executorHash = entry.executor();
+ initiatorSeed = sb.peers.getConnected(initiatorHash);
+ executorSeed = sb.peers.getConnected(executorHash);
+ prop.putHTML("rejected_list_"+j+"_initiator", ((initiatorSeed == null) ? "proxy" : initiatorSeed.getName()));
+ prop.putHTML("rejected_list_"+j+"_executor", ((executorSeed == null) ? "proxy" : executorSeed.getName()));
+ prop.putHTML("rejected_list_"+j+"_url", url.toNormalform(false, true));
+ prop.putHTML("rejected_list_"+j+"_failreason", entry.anycause());
+ prop.put("rejected_list_"+j+"_dark", dark ? "1" : "0");
+ dark = !dark;
+ j++;
+ }
+ prop.put("rejected_list", j);
+ }
+
+ // return rewrite properties
+ return prop;
+ }
+}
diff --git a/htroot/IndexCreateWWWGlobalQueue_p.java b/htroot/IndexCreateWWWGlobalQueue_p.java
index f8966f473..52573812f 100644
--- a/htroot/IndexCreateWWWGlobalQueue_p.java
+++ b/htroot/IndexCreateWWWGlobalQueue_p.java
@@ -46,7 +46,7 @@ public class IndexCreateWWWGlobalQueue_p {
return dayFormatter.format(date);
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/IndexCreateWWWLocalQueue_p.java b/htroot/IndexCreateWWWLocalQueue_p.java
index e08c896fd..52302b191 100644
--- a/htroot/IndexCreateWWWLocalQueue_p.java
+++ b/htroot/IndexCreateWWWLocalQueue_p.java
@@ -59,7 +59,7 @@ public class IndexCreateWWWLocalQueue_p {
private static final int INITIATOR = 5;
private static final int MODIFIED = 6;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/IndexCreateWWWRemoteQueue_p.java b/htroot/IndexCreateWWWRemoteQueue_p.java
index d6c41670b..6bb79a1cf 100644
--- a/htroot/IndexCreateWWWRemoteQueue_p.java
+++ b/htroot/IndexCreateWWWRemoteQueue_p.java
@@ -47,7 +47,7 @@ public class IndexCreateWWWRemoteQueue_p {
return dayFormatter.format(date);
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final servletProperties prop = new servletProperties();
final plasmaSwitchboard sb = (plasmaSwitchboard)env;
diff --git a/htroot/IndexImportWikimedia_p.java b/htroot/IndexImportWikimedia_p.java
index 23c9695c1..544657f46 100644
--- a/htroot/IndexImportWikimedia_p.java
+++ b/htroot/IndexImportWikimedia_p.java
@@ -33,7 +33,7 @@ import de.anomic.tools.mediawikiIndex;
public class IndexImportWikimedia_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/IndexImport_p.java b/htroot/IndexImport_p.java
index 530f90026..ac5f16393 100644
--- a/htroot/IndexImport_p.java
+++ b/htroot/IndexImport_p.java
@@ -43,7 +43,7 @@ import de.anomic.server.serverSwitch;
public final class IndexImport_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/IndexShare_p.java b/htroot/IndexShare_p.java
index b9edb58c2..17e4a9b3d 100644
--- a/htroot/IndexShare_p.java
+++ b/htroot/IndexShare_p.java
@@ -36,7 +36,7 @@ import de.anomic.server.serverSwitch;
public class IndexShare_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/MessageSend_p.java b/htroot/MessageSend_p.java
index 92338da11..b8f50b12e 100644
--- a/htroot/MessageSend_p.java
+++ b/htroot/MessageSend_p.java
@@ -45,7 +45,7 @@ public class MessageSend_p {
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/Messages_p.java b/htroot/Messages_p.java
index e4ebc6d82..cfa628a7d 100644
--- a/htroot/Messages_p.java
+++ b/htroot/Messages_p.java
@@ -51,7 +51,7 @@ public class Messages_p {
return SimpleFormatter.format(date);
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/Network.java b/htroot/Network.java
index c747124fb..1885c67fc 100644
--- a/htroot/Network.java
+++ b/htroot/Network.java
@@ -54,7 +54,7 @@ public class Network {
private static final String STR_TABLE_LIST = "table_list_";
- public static serverObjects respond(final httpRequestHeader requestHeader, final serverObjects post, final serverSwitch<?> switchboard) {
+ public static serverObjects respond(final httpRequestHeader requestHeader, final serverObjects post, final serverSwitch switchboard) {
final plasmaSwitchboard sb = (plasmaSwitchboard) switchboard;
final long start = System.currentTimeMillis();
diff --git a/htroot/NetworkPicture.java b/htroot/NetworkPicture.java
index 819ec9967..8fb5d0d48 100644
--- a/htroot/NetworkPicture.java
+++ b/htroot/NetworkPicture.java
@@ -35,7 +35,7 @@ import de.anomic.ymage.ymageMatrix;
/** draw a picture of the yacy network */
public class NetworkPicture {
- public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
int width = 768;
diff --git a/htroot/News.java b/htroot/News.java
index 444a192b4..197d35add 100644
--- a/htroot/News.java
+++ b/htroot/News.java
@@ -40,7 +40,7 @@ import de.anomic.yacy.yacySeed;
public class News {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
final boolean overview = (post == null) || (post.get("page", "0").equals("0"));
diff --git a/htroot/PeerLoadPicture.java b/htroot/PeerLoadPicture.java
index ebaef2b8d..44c5b33c9 100644
--- a/htroot/PeerLoadPicture.java
+++ b/htroot/PeerLoadPicture.java
@@ -13,7 +13,7 @@ import de.anomic.server.serverSwitch;
public class PeerLoadPicture {
- public static Image respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static Image respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
int width = 800;
int height = 600;
@@ -29,7 +29,6 @@ public class PeerLoadPicture {
final CircleThreadPiece misc = new CircleThreadPiece("Misc.", new Color(190, 50, 180));
final HashMap<String, CircleThreadPiece> pieces = new HashMap<String, CircleThreadPiece>();
pieces.put(null, idle);
- pieces.put(plasmaSwitchboardConstants.INDEXER, new CircleThreadPiece("Parsing/Indexing", new Color(255, 130, 0)));
pieces.put(plasmaSwitchboardConstants.INDEX_DIST, new CircleThreadPiece("DHT-Distribution", new Color(119, 136, 153)));
pieces.put(plasmaSwitchboardConstants.PEER_PING, new CircleThreadPiece("YaCy Core", new Color(255, 230, 160)));
diff --git a/htroot/PerformanceConcurrency_p.java b/htroot/PerformanceConcurrency_p.java
index 43bfd4de8..eb3bdcf4e 100644
--- a/htroot/PerformanceConcurrency_p.java
+++ b/htroot/PerformanceConcurrency_p.java
@@ -28,7 +28,7 @@ import de.anomic.server.serverSwitch;
public class PerformanceConcurrency_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> sb) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch sb) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
diff --git a/htroot/PerformanceGraph.java b/htroot/PerformanceGraph.java
index f65d3d308..86af900b5 100644
--- a/htroot/PerformanceGraph.java
+++ b/htroot/PerformanceGraph.java
@@ -33,7 +33,7 @@ import de.anomic.ymage.ymageMatrix;
public class PerformanceGraph {
- public static ymageMatrix respond(final httpRequestHeader header, serverObjects post, final serverSwitch<?> env) {
+ public static ymageMatrix respond(final httpRequestHeader header, serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
if (post == null) post = new serverObjects();
diff --git a/htroot/PerformanceMemory_p.java b/htroot/PerformanceMemory_p.java
index 82c0b7ad3..924dac635 100644
--- a/htroot/PerformanceMemory_p.java
+++ b/htroot/PerformanceMemory_p.java
@@ -46,7 +46,7 @@ public class PerformanceMemory_p {
private static final long MB = 1024 * KB;
private static Map<String, String> defaultSettings = null;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
if (defaultSettings == null) {
diff --git a/htroot/PerformanceQueues_p.java b/htroot/PerformanceQueues_p.java
index 7106f656f..f6a638935 100644
--- a/htroot/PerformanceQueues_p.java
+++ b/htroot/PerformanceQueues_p.java
@@ -52,7 +52,7 @@ public class PerformanceQueues_p {
performanceProfiles.put("defaults/performance_dht.profile", "prefer DHT");
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> sb) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch sb) {
// return variable that accumulates replacements
final plasmaSwitchboard switchboard = (plasmaSwitchboard) sb;
final serverObjects prop = new serverObjects();
diff --git a/htroot/PerformanceSearch_p.java b/htroot/PerformanceSearch_p.java
index cd4f6d3b6..674fa6d9b 100644
--- a/htroot/PerformanceSearch_p.java
+++ b/htroot/PerformanceSearch_p.java
@@ -35,7 +35,7 @@ import de.anomic.server.serverSwitch;
public class PerformanceSearch_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> sb) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch sb) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
diff --git a/htroot/Performance_p.java b/htroot/Performance_p.java
index bd312e193..833925791 100644
--- a/htroot/Performance_p.java
+++ b/htroot/Performance_p.java
@@ -30,7 +30,7 @@ import de.anomic.server.serverSwitch;
public class Performance_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> sb) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch sb) {
return PerformanceQueues_p.respond(header, post, sb);
}
diff --git a/htroot/ProxyIndexingMonitor_p.java b/htroot/ProxyIndexingMonitor_p.java
index 0b9243f86..f39a17b20 100644
--- a/htroot/ProxyIndexingMonitor_p.java
+++ b/htroot/ProxyIndexingMonitor_p.java
@@ -45,7 +45,7 @@ public class ProxyIndexingMonitor_p {
// if (date == null) return ""; else return dayFormatter.format(date);
// }
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/QuickCrawlLink_p.java b/htroot/QuickCrawlLink_p.java
index a6b2f380f..e79520909 100644
--- a/htroot/QuickCrawlLink_p.java
+++ b/htroot/QuickCrawlLink_p.java
@@ -53,7 +53,7 @@ public class QuickCrawlLink_p {
* @param env the serverSwitch object holding all runtime-data
* @return the rewrite-properties for the template
*/
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/Ranking_p.java b/htroot/Ranking_p.java
index 6d09c171a..8bcc3a584 100644
--- a/htroot/Ranking_p.java
+++ b/htroot/Ranking_p.java
@@ -128,7 +128,7 @@ public class Ranking_p {
}
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// clean up all search events
diff --git a/htroot/SearchEventPicture.java b/htroot/SearchEventPicture.java
index 9083ee555..7e77dcfbc 100644
--- a/htroot/SearchEventPicture.java
+++ b/htroot/SearchEventPicture.java
@@ -37,7 +37,7 @@ import de.anomic.ymage.ymageMatrix;
public class SearchEventPicture {
- public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final String eventID = header.get("event", QueryEvent.lastEventID);
if (eventID == null) return null;
diff --git a/htroot/SettingsAck_p.java b/htroot/SettingsAck_p.java
index c89e73b87..5c4870ee2 100644
--- a/htroot/SettingsAck_p.java
+++ b/htroot/SettingsAck_p.java
@@ -55,7 +55,7 @@ public class SettingsAck_p {
private static boolean nothingChanged = false;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/Settings_p.java b/htroot/Settings_p.java
index f4b2e5f24..c02dcff3e 100644
--- a/htroot/Settings_p.java
+++ b/htroot/Settings_p.java
@@ -36,7 +36,7 @@ import de.anomic.yacy.yacySeedUploader;
public final class Settings_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/Status.java b/htroot/Status.java
index 4b35899f1..2058e7ca9 100644
--- a/htroot/Status.java
+++ b/htroot/Status.java
@@ -52,7 +52,7 @@ public class Status {
private static final String SEEDSERVER = "seedServer";
private static final String PEERSTATUS = "peerStatus";
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
@@ -143,7 +143,7 @@ public class Status {
prop.put("versionpp", versionstring);
// place some more hints
- if ((adminaccess) && (sb.getThread(plasmaSwitchboardConstants.CRAWLJOB_LOCAL_CRAWL).getJobCount() == 0) && (sb.getThread(plasmaSwitchboardConstants.INDEXER).getJobCount() == 0)) {
+ if ((adminaccess) && (sb.getThread(plasmaSwitchboardConstants.CRAWLJOB_LOCAL_CRAWL).getJobCount() == 0)) {
prop.put("hintCrawlStart", "1");
}
@@ -286,13 +286,6 @@ public class Status {
prop.putNum("connectionsMax", httpd.getMaxSessionCount());
// Queue information
- final int indexingJobCount = sb.getThread("80_indexing").getJobCount() + sb.getActiveQueueSize();
- final int indexingMaxCount = (int) sb.getConfigLong(plasmaSwitchboardConstants.INDEXER_SLOTS, 30);
- final int indexingPercent = (indexingMaxCount==0)?0:indexingJobCount*100/indexingMaxCount;
- prop.putNum("indexingQueueSize", indexingJobCount);
- prop.putNum("indexingQueueMax", indexingMaxCount);
- prop.put("indexingQueuePercent",(indexingPercent>100) ? 100 : indexingPercent);
-
final int loaderJobCount = sb.crawlQueues.size();
final int loaderMaxCount = Integer.parseInt(sb.getConfig(plasmaSwitchboardConstants.CRAWLER_THREADS_ACTIVE_MAX, "10"));
final int loaderPercent = (loaderMaxCount==0)?0:loaderJobCount*100/loaderMaxCount;
diff --git a/htroot/Status_p.inc b/htroot/Status_p.inc
index bcc1f390d..780601fef 100644
--- a/htroot/Status_p.inc
+++ b/htroot/Status_p.inc
@@ -71,14 +71,6 @@
<dt>Queues</dt>
<dd>
- <a href="IndexCreateIndexingQueue_p.html">Indexing Queue</a>:
- <table>
- <tr>
- <td><div class="ProgressBar"><div class="ProgressBarFill" style="width:#[indexingQueuePercent]#%;" ></div></div></td>
- <td><div class="ProgressBarCaption">#[indexingQueueSize]#&nbsp;|&nbsp;#[indexingQueueMax]#</div></td>
- </tr>
- </table><br />
-
<a href="IndexCreateLoaderQueue_p.html">Loader Queue</a>:
<table>
<tr>
diff --git a/htroot/Steering.java b/htroot/Steering.java
index 8b701acba..dd7de8a6b 100644
--- a/htroot/Steering.java
+++ b/htroot/Steering.java
@@ -37,7 +37,7 @@ import de.anomic.yacy.yacyRelease;
public class Steering {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> ss) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch ss) {
if (post == null || ss == null) { return new serverObjects(); }
final plasmaSwitchboard sb = (plasmaSwitchboard) ss;
diff --git a/htroot/Supporter.java b/htroot/Supporter.java
index 675b011b4..a6baaadc5 100644
--- a/htroot/Supporter.java
+++ b/htroot/Supporter.java
@@ -50,7 +50,7 @@ import de.anomic.yacy.yacyURL;
public class Supporter {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/Surftips.java b/htroot/Surftips.java
index d28270172..2072754a3 100644
--- a/htroot/Surftips.java
+++ b/htroot/Surftips.java
@@ -50,7 +50,7 @@ import de.anomic.yacy.yacyURL;
public class Surftips {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/Threaddump_p.java b/htroot/Threaddump_p.java
index 738340d5d..4b82bc8b3 100644
--- a/htroot/Threaddump_p.java
+++ b/htroot/Threaddump_p.java
@@ -49,7 +49,7 @@ import de.anomic.yacy.yacyBuildProperties;
public class Threaddump_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
serverObjects prop = new serverObjects();
plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/Trails.java b/htroot/Trails.java
index 07ffc728b..755029660 100644
--- a/htroot/Trails.java
+++ b/htroot/Trails.java
@@ -6,7 +6,7 @@ import de.anomic.server.servletProperties;
//dummy class
public class Trails {
- public static servletProperties respond(final httpRequestHeader requestHeader, final serverObjects post, final serverSwitch<?> env) {
+ public static servletProperties respond(final httpRequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
final servletProperties prop = new servletProperties();
return prop;
}
diff --git a/htroot/User.java b/htroot/User.java
index e90142da8..711a9d9de 100644
--- a/htroot/User.java
+++ b/htroot/User.java
@@ -43,7 +43,7 @@ import de.anomic.server.servletProperties;
public class User{
- public static servletProperties respond(final httpRequestHeader requestHeader, final serverObjects post, final serverSwitch<?> env) {
+ public static servletProperties respond(final httpRequestHeader requestHeader, final serverObjects post, final serverSwitch env) {
final servletProperties prop = new servletProperties();
final plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
userDB.Entry entry=null;
diff --git a/htroot/ViewFile.java b/htroot/ViewFile.java
index 22793ad5d..786871f9d 100644
--- a/htroot/ViewFile.java
+++ b/htroot/ViewFile.java
@@ -65,7 +65,7 @@ public class ViewFile {
private static final String HIGHLIGHT_CSS = "searchHighlight";
private static final int MAX_HIGHLIGHTS = 6;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard)env;
diff --git a/htroot/ViewImage.java b/htroot/ViewImage.java
index 026ab9398..2ef39aacd 100644
--- a/htroot/ViewImage.java
+++ b/htroot/ViewImage.java
@@ -52,7 +52,7 @@ public class ViewImage {
}
}
- public static Image respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static Image respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard)env;
diff --git a/htroot/ViewLog_p.java b/htroot/ViewLog_p.java
index dbbd79032..114f7bd0e 100644
--- a/htroot/ViewLog_p.java
+++ b/htroot/ViewLog_p.java
@@ -41,7 +41,7 @@ import de.anomic.yacy.logging.LogalizerHandler;
public class ViewLog_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
String[] log = new String[0];
boolean reversed = false;
diff --git a/htroot/WatchCrawler_p.java b/htroot/WatchCrawler_p.java
index 08e2d99eb..0a8f477ce 100644
--- a/htroot/WatchCrawler_p.java
+++ b/htroot/WatchCrawler_p.java
@@ -63,7 +63,7 @@ public class WatchCrawler_p {
// this servlet does NOT create the WatchCrawler page content!
// this servlet starts a web crawl. The interface for entering the web crawl parameters is in IndexCreate_p.html
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// inital values for AJAX Elements (without JavaScript)
@@ -93,7 +93,7 @@ public class WatchCrawler_p {
if ((post.containsKey("autoforward")) &&
(sb.crawlQueues.coreCrawlJobSize() == 0) &&
(sb.crawlQueues.remoteTriggeredCrawlJobSize() == 0) &&
- (sb.queueSize() < 30)) {
+ (sb.getActiveQueueSize() < 30)) {
prop.put("forwardToCrawlStart", "1");
}
diff --git a/htroot/WatchWebStructure_p.java b/htroot/WatchWebStructure_p.java
index 987fd7d9e..48552b83c 100644
--- a/htroot/WatchWebStructure_p.java
+++ b/htroot/WatchWebStructure_p.java
@@ -10,7 +10,7 @@ import de.anomic.server.serverSwitch;
public class WatchWebStructure_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/WebStructurePicture_p.java b/htroot/WebStructurePicture_p.java
index 447a1ad93..4860a237f 100644
--- a/htroot/WebStructurePicture_p.java
+++ b/htroot/WebStructurePicture_p.java
@@ -46,7 +46,7 @@ public class WebStructurePicture_p {
private static final double maxlongd = Long.MAX_VALUE;
- public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
int width = 768;
diff --git a/htroot/Wiki.java b/htroot/Wiki.java
index 34ff9a17e..f68ad80c3 100644
--- a/htroot/Wiki.java
+++ b/htroot/Wiki.java
@@ -55,7 +55,7 @@ public class Wiki {
}
- public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch<?> env) throws IOException {
+ public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch env) throws IOException {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
if (post == null) {
diff --git a/htroot/WikiHelp.java b/htroot/WikiHelp.java
index 86deb29c8..da4205652 100644
--- a/htroot/WikiHelp.java
+++ b/htroot/WikiHelp.java
@@ -33,7 +33,7 @@ import de.anomic.server.serverSwitch;
public class WikiHelp {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
//final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
return prop;
diff --git a/htroot/YaCySearchPluginFF.java b/htroot/YaCySearchPluginFF.java
index cda9853a1..99f533a08 100644
--- a/htroot/YaCySearchPluginFF.java
+++ b/htroot/YaCySearchPluginFF.java
@@ -38,7 +38,7 @@ public class YaCySearchPluginFF {
* @param env the serverSwitch object holding all runtime-data
* @return the rewrite-properties for the template
*/
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/blacklists.java b/htroot/api/blacklists.java
index c56f76c76..f07ab2fb5 100644
--- a/htroot/api/blacklists.java
+++ b/htroot/api/blacklists.java
@@ -9,7 +9,7 @@ import de.anomic.server.serverSwitch;
public class blacklists {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
listManager.listsPath = new File(listManager.switchboard.getRootPath(),listManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS"));
diff --git a/htroot/api/blacklists_p.java b/htroot/api/blacklists_p.java
index ab591d010..8e538fcb2 100644
--- a/htroot/api/blacklists_p.java
+++ b/htroot/api/blacklists_p.java
@@ -11,7 +11,7 @@ import de.anomic.server.serverSwitch;
public class blacklists_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
listManager.listsPath = new File(listManager.switchboard.getRootPath(),listManager.switchboard.getConfig("listManager.listsPath", "DATA/LISTS"));
diff --git a/htroot/api/bookmarks/get_bookmarks.java b/htroot/api/bookmarks/get_bookmarks.java
index 46f0300d3..0b74a4dbf 100644
--- a/htroot/api/bookmarks/get_bookmarks.java
+++ b/htroot/api/bookmarks/get_bookmarks.java
@@ -35,7 +35,7 @@ public class get_bookmarks {
final static int RSS = 3; // .xml (.rss)
final static int RDF = 4; // .xml
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
prop.clear();
sb = (plasmaSwitchboard) env;
diff --git a/htroot/api/bookmarks/get_folders.java b/htroot/api/bookmarks/get_folders.java
index 5b713d919..563bed624 100644
--- a/htroot/api/bookmarks/get_folders.java
+++ b/htroot/api/bookmarks/get_folders.java
@@ -16,7 +16,7 @@ public class get_folders {
private static userDB.Entry user = null;
private static boolean isAdmin = false;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
prop.clear();
sb = (plasmaSwitchboard) env;
diff --git a/htroot/api/bookmarks/posts/add_p.java b/htroot/api/bookmarks/posts/add_p.java
index e633c7269..73cbfb6db 100755
--- a/htroot/api/bookmarks/posts/add_p.java
+++ b/htroot/api/bookmarks/posts/add_p.java
@@ -20,7 +20,7 @@ public class add_p {
private static userDB.Entry user = null;
private static boolean isAdmin = false;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
sb = (plasmaSwitchboard) env;
isAdmin=sb.verifyAuthentication(header, true);
diff --git a/htroot/api/bookmarks/posts/all.java b/htroot/api/bookmarks/posts/all.java
index 7d0ef1714..ec552a1f4 100755
--- a/htroot/api/bookmarks/posts/all.java
+++ b/htroot/api/bookmarks/posts/all.java
@@ -11,7 +11,7 @@ import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
public class all {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final boolean isAdmin=switchboard.verifyAuthentication(header, true);
diff --git a/htroot/api/bookmarks/posts/delete_p.java b/htroot/api/bookmarks/posts/delete_p.java
index 5241ee859..424659a2b 100755
--- a/htroot/api/bookmarks/posts/delete_p.java
+++ b/htroot/api/bookmarks/posts/delete_p.java
@@ -8,7 +8,7 @@ import de.anomic.server.serverSwitch;
import de.anomic.yacy.yacyURL;
public class delete_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/bookmarks/posts/get.java b/htroot/api/bookmarks/posts/get.java
index c52b9c805..b73df59bf 100755
--- a/htroot/api/bookmarks/posts/get.java
+++ b/htroot/api/bookmarks/posts/get.java
@@ -14,7 +14,7 @@ import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
public class get {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final boolean isAdmin=switchboard.verifyAuthentication(header, true);
diff --git a/htroot/api/bookmarks/tags/addTag_p.java b/htroot/api/bookmarks/tags/addTag_p.java
index 5486cb8ee..a9d10266b 100644
--- a/htroot/api/bookmarks/tags/addTag_p.java
+++ b/htroot/api/bookmarks/tags/addTag_p.java
@@ -7,7 +7,7 @@ import de.anomic.data.bookmarksDB.Bookmark;
public class addTag_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/bookmarks/tags/editTag_p.java b/htroot/api/bookmarks/tags/editTag_p.java
index f65de930e..75af90f42 100755
--- a/htroot/api/bookmarks/tags/editTag_p.java
+++ b/htroot/api/bookmarks/tags/editTag_p.java
@@ -5,7 +5,7 @@ import de.anomic.server.serverObjects;
import de.anomic.server.serverSwitch;
public class editTag_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/bookmarks/tags/getTag.java b/htroot/api/bookmarks/tags/getTag.java
index 0483f8f67..7a2edaeed 100755
--- a/htroot/api/bookmarks/tags/getTag.java
+++ b/htroot/api/bookmarks/tags/getTag.java
@@ -13,7 +13,7 @@ public class getTag {
final static int SORT_SIZE = 2;
final static int SHOW_ALL = -1;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final boolean isAdmin=switchboard.verifyAuthentication(header, true);
diff --git a/htroot/api/bookmarks/xbel/xbel.java b/htroot/api/bookmarks/xbel/xbel.java
index 515b1ed72..0b46c087d 100755
--- a/htroot/api/bookmarks/xbel/xbel.java
+++ b/htroot/api/bookmarks/xbel/xbel.java
@@ -18,7 +18,7 @@ public class xbel {
private static boolean isAdmin = false;
private static int R = 1; // TODO: solve the recursion problem an remove global variable
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
int count = 0;;
String root = "/";
diff --git a/htroot/api/config_p.java b/htroot/api/config_p.java
index 7bbce682d..3bd9121fe 100644
--- a/htroot/api/config_p.java
+++ b/htroot/api/config_p.java
@@ -11,7 +11,7 @@ import de.anomic.server.serverSwitch;
public class config_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
//plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/feed.java b/htroot/api/feed.java
index 9b354221a..23730f934 100755
--- a/htroot/api/feed.java
+++ b/htroot/api/feed.java
@@ -11,7 +11,7 @@ import de.anomic.server.serverSwitch;
public class feed {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// insert default values
diff --git a/htroot/api/latency_p.java b/htroot/api/latency_p.java
index 601cb421f..15ecef082 100644
--- a/htroot/api/latency_p.java
+++ b/htroot/api/latency_p.java
@@ -35,7 +35,7 @@ import de.anomic.server.serverSwitch;
public class latency_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
//final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/api/queues_p.java b/htroot/api/queues_p.java
index 904316e28..dcdb9fff6 100755
--- a/htroot/api/queues_p.java
+++ b/htroot/api/queues_p.java
@@ -1,14 +1,11 @@
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Date;
-import java.util.Iterator;
import java.util.Locale;
-import de.anomic.crawler.IndexingStack;
import de.anomic.crawler.NoticedURL;
import de.anomic.crawler.retrieval.Request;
import de.anomic.http.httpRequestHeader;
-import de.anomic.kelondro.util.kelondroException;
import de.anomic.plasma.plasmaSwitchboard;
import de.anomic.plasma.plasmaSwitchboardConstants;
import de.anomic.server.serverObjects;
@@ -26,7 +23,7 @@ public class queues_p {
return dayFormatter.format(date);
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
//wikiCode wikiTransformer = new wikiCode(switchboard);
@@ -38,59 +35,11 @@ public class queues_p {
yacySeed initiator;
- //indexing queue
- prop.putNum("indexingSize", sb.getThread(plasmaSwitchboardConstants.INDEXER).getJobCount() + sb.getActiveQueueSize());
- prop.putNum("indexingMax", (int) sb.getConfigLong(plasmaSwitchboardConstants.INDEXER_SLOTS, 30));
+ // index size
prop.putNum("urlpublictextSize", sb.indexSegment.urlMetadata().size());
prop.putNum("rwipublictextSize", sb.indexSegment.termIndex().sizesMax());
- if ((sb.crawler.indexingStack.size() == 0) && (sb.getActiveQueueSize() == 0)) {
- prop.put("list", "0"); //is empty
- } else {
- IndexingStack.QueueEntry pcentry;
- long totalSize = 0;
- int i=0; //counter
-
- // getting all entries that are currently in process
- final ArrayList<IndexingStack.QueueEntry> entryList = new ArrayList<IndexingStack.QueueEntry>();
- final int inProcessCount = entryList.size();
-
- // getting all enqueued entries
- if ((sb.crawler.indexingStack.size() > 0)) {
- final Iterator<IndexingStack.QueueEntry> i1 = sb.crawler.indexingStack.entryIterator(false);
- while (i1.hasNext()) try {
- entryList.add(i1.next());
- } catch (kelondroException e) {
- e.printStackTrace();
- }
- }
-
- int size = (post == null) ? entryList.size() : post.getInt("num", entryList.size());
- if (size > entryList.size()) size = entryList.size();
-
- int ok = 0;
- for (i = 0; i < size; i++) {
- final boolean inProcess = i < inProcessCount;
- pcentry = entryList.get(i);
- if ((pcentry != null) && (pcentry.url() != null)) {
- final long entrySize = pcentry.size();
- totalSize += entrySize;
- initiator = sb.peers.getConnected(pcentry.initiator());
- prop.put("list-indexing_"+i+"_profile", (pcentry.profile() != null) ? pcentry.profile().name() : "deleted");
- prop.putHTML("list-indexing_"+i+"_initiator", ((initiator == null) ? "proxy" : initiator.getName()));
- prop.put("list-indexing_"+i+"_depth", pcentry.depth());
- prop.put("list-indexing_"+i+"_modified", pcentry.getModificationDate());
- prop.putXML("list-indexing_"+i+"_anchor", (pcentry.anchorName()==null) ? "" : pcentry.anchorName());
- prop.putXML("list-indexing_"+i+"_url", pcentry.url().toNormalform(false, true));
- prop.putNum("list-indexing_"+i+"_size", entrySize);
- prop.put("list-indexing_"+i+"_inProcess", (inProcess) ? "1" : "0");
- prop.put("list-indexing_"+i+"_hash", pcentry.url().hash());
- ok++;
- }
- }
- prop.put("list-indexing", ok);
- }
-
- //loader queue
+
+ // loader queue
prop.put("loaderSize", Integer.toString(sb.crawlQueues.size()));
prop.put("loaderMax", sb.getConfigLong(plasmaSwitchboardConstants.CRAWLER_THREADS_ACTIVE_MAX, 10));
if (sb.crawlQueues.size() == 0) {
diff --git a/htroot/api/queues_p.xml b/htroot/api/queues_p.xml
index 23cfea8a0..018ec13e0 100644
--- a/htroot/api/queues_p.xml
+++ b/htroot/api/queues_p.xml
@@ -4,23 +4,6 @@
<urlpublictext>#[urlpublictextSize]#</urlpublictext>
<rwipublictext>#[rwipublictextSize]#</rwipublictext>
</dbsize>
-<indexingqueue>
- <size>#[indexingSize]#</size>
- <max>#[indexingMax]#</max>
-#{list-indexing}#
- <entry>
- <profile>#[profile]#</profile>
- <initiator>#[initiator]#</initiator>
- <depth>#[depth]#</depth>
- <modified>#[modified]#</modified>
- <anchor>#[anchor]#</anchor>
- <url>#[url]#</url>
- <size>#[size]#</size>
- <hash>#[hash]#</hash>
- <inProcess>#(inProcess)#false::true#(/inProcess)#</inProcess>
- </entry>
-#{/list-indexing}#
-</indexingqueue>
<loaderqueue>
<size>#[loaderSize]#</size>
<max>#[loaderMax]#</max>
diff --git a/htroot/api/status_p.java b/htroot/api/status_p.java
index edd1aec12..f10561317 100644
--- a/htroot/api/status_p.java
+++ b/htroot/api/status_p.java
@@ -13,7 +13,7 @@ import de.anomic.server.serverSwitch;
public class status_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/timeline.java b/htroot/api/timeline.java
index 8c6e443cf..720fae7ca 100644
--- a/htroot/api/timeline.java
+++ b/htroot/api/timeline.java
@@ -44,7 +44,7 @@ import de.anomic.yacy.yacyCore;
public final class timeline {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/api/trail_p.java b/htroot/api/trail_p.java
index f56f880a3..94678f947 100644
--- a/htroot/api/trail_p.java
+++ b/htroot/api/trail_p.java
@@ -32,7 +32,7 @@ import de.anomic.server.serverSwitch;
public class trail_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/util/getpageinfo_p.java b/htroot/api/util/getpageinfo_p.java
index 72cc02eaa..b26d9198f 100755
--- a/htroot/api/util/getpageinfo_p.java
+++ b/htroot/api/util/getpageinfo_p.java
@@ -14,7 +14,7 @@ import de.anomic.yacy.yacyURL;
public class getpageinfo_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/util/ynetSearch.java b/htroot/api/util/ynetSearch.java
index d5a0d94e1..531beb59b 100755
--- a/htroot/api/util/ynetSearch.java
+++ b/htroot/api/util/ynetSearch.java
@@ -14,7 +14,7 @@ import de.anomic.server.serverSwitch;
public class ynetSearch {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard switchboard = (plasmaSwitchboard) env;
final boolean isAdmin=switchboard.verifyAuthentication(header, true);
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/version.java b/htroot/api/version.java
index fb08b5fa3..bff5a59d8 100644
--- a/htroot/api/version.java
+++ b/htroot/api/version.java
@@ -7,7 +7,7 @@ import de.anomic.yacy.yacyBuildProperties;
public class version {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
diff --git a/htroot/api/webstructure.java b/htroot/api/webstructure.java
index ff2cba0d6..19d64812d 100644
--- a/htroot/api/webstructure.java
+++ b/htroot/api/webstructure.java
@@ -35,7 +35,7 @@ import de.anomic.yacy.yacyURL;
public class webstructure {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final boolean latest = ((post == null) ? false : post.containsKey("latest"));
diff --git a/htroot/api/yacydoc.java b/htroot/api/yacydoc.java
index 316c67745..6d64f2f3b 100644
--- a/htroot/api/yacydoc.java
+++ b/htroot/api/yacydoc.java
@@ -37,7 +37,7 @@ import de.anomic.yacy.yacyURL;
public class yacydoc {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/autoconfig.java b/htroot/autoconfig.java
index 9a833ab88..dc7598899 100644
--- a/htroot/autoconfig.java
+++ b/htroot/autoconfig.java
@@ -41,7 +41,7 @@ public class autoconfig {
* @param env the serverSwitch object holding all runtime-data
* @return the rewrite-properties for the template
*/
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
diff --git a/htroot/compare_yacy.java b/htroot/compare_yacy.java
index 7d0660b38..d12ca75cc 100755
--- a/htroot/compare_yacy.java
+++ b/htroot/compare_yacy.java
@@ -55,7 +55,7 @@ public class compare_yacy {
searchengines.put("Sciencenet", "http://sciencenet.fzk.de:8080/yacysearch.html?display=2&verify=true&resource=global&query=");
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final boolean authenticated = sb.adminAuthenticated(header) >= 2;
final int display = ((post == null) || (!authenticated)) ? 0 : post.getInt("display", 0);
diff --git a/htroot/cytag.java b/htroot/cytag.java
index 75c07de2d..209925992 100644
--- a/htroot/cytag.java
+++ b/htroot/cytag.java
@@ -41,7 +41,7 @@ import de.anomic.ymage.ymageImageParser;
public class cytag {
- public static Image respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static Image respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard)env;
diff --git a/htroot/env/templates/submenuIndexCreate.template b/htroot/env/templates/submenuIndexCreate.template
index 49fecdd3e..789d60f54 100644
--- a/htroot/env/templates/submenuIndexCreate.template
+++ b/htroot/env/templates/submenuIndexCreate.template
@@ -26,7 +26,7 @@
<h3>Processing Queues</h3>
<ul class="SubMenu">
<li><a href="/IndexCreateLoaderQueue_p.html" class="MenuItemLink lock">Loader</a></li>
- <li><a href="/IndexCreateIndexingQueue_p.html" class="MenuItemLink lock">Indexing</a></li>
+ <li><a href="/IndexCreateParserErrors_p.html" class="MenuItemLink lock">Parser Errors</a></li>
</ul>
</div>
diff --git a/htroot/imagetest.java b/htroot/imagetest.java
index fdb41d5c5..13b68991b 100644
--- a/htroot/imagetest.java
+++ b/htroot/imagetest.java
@@ -32,7 +32,7 @@ import de.anomic.ymage.ymageToolPrint;
public class imagetest {
- public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
/*
BufferedImage bi = new BufferedImage(640, 400, BufferedImage.TYPE_INT_RGB);
Graphics2D g = bi.createGraphics();
diff --git a/htroot/index.java b/htroot/index.java
index d5ff3cacc..b90b57756 100644
--- a/htroot/index.java
+++ b/htroot/index.java
@@ -38,7 +38,7 @@ import de.anomic.server.serverSwitch;
public class index {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/js/WatchCrawler.js b/htroot/js/WatchCrawler.js
index 14acb1667..fe4063124 100644
--- a/htroot/js/WatchCrawler.js
+++ b/htroot/js/WatchCrawler.js
@@ -127,14 +127,6 @@ function handleQueues(){
if(queuesResponse != null){
clearTable(document.getElementById("queueTable"), 1);
- indexingqueue=getFirstChild(xml, "indexingqueue");
- updateTable(indexingqueue, "indexing");
-
- indexingqueue_size=getValue(getFirstChild(indexingqueue, "size"));
- indexingqueue_max=getValue(getFirstChild(indexingqueue, "max"));
- document.getElementById("indexingqueuesize").firstChild.nodeValue=indexingqueue_size;
- document.getElementById("indexingqueuemax").firstChild.nodeValue=indexingqueue_max;
-
dbsize=getFirstChild(xml, "dbsize");
urlpublictextSize=getValue(getFirstChild(dbsize, "urlpublictext"));
rwipublictextSize=getValue(getFirstChild(dbsize, "rwipublictext"));
diff --git a/htroot/mediawiki_p.java b/htroot/mediawiki_p.java
index 3449da103..a234ee9cd 100644
--- a/htroot/mediawiki_p.java
+++ b/htroot/mediawiki_p.java
@@ -36,7 +36,7 @@ import de.anomic.tools.mediawikiIndex;
public class mediawiki_p {
//http://localhost:8080/mediawiki_p.html?dump=wikipedia.de.xml&title=Kartoffel
- public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch<?> env) throws IOException {
+ public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch env) throws IOException {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
prop.put("title", "");
diff --git a/htroot/opensearchdescription.java b/htroot/opensearchdescription.java
index ed1cc1725..ce61ec827 100644
--- a/htroot/opensearchdescription.java
+++ b/htroot/opensearchdescription.java
@@ -33,7 +33,7 @@ import de.anomic.server.serverSwitch;
public class opensearchdescription {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// generate message content for open search description
String promoteSearchPageGreeting = env.getConfig(plasmaSwitchboardConstants.GREETING, "");
diff --git a/htroot/osm.java b/htroot/osm.java
index 1044e1fab..f1d6e5a3b 100644
--- a/htroot/osm.java
+++ b/htroot/osm.java
@@ -8,7 +8,7 @@ import de.anomic.ymage.ymageOSM;
public class osm {
- public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static ymageMatrix respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
int zoom = 10;
double lat = 47.968056d;
diff --git a/htroot/rct_p.java b/htroot/rct_p.java
index 9d45f2df9..3386bf260 100644
--- a/htroot/rct_p.java
+++ b/htroot/rct_p.java
@@ -45,7 +45,7 @@ import de.anomic.yacy.dht.PeerSelection;
public class rct_p {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/robots.java b/htroot/robots.java
index 5900fb4a0..57abe179b 100644
--- a/htroot/robots.java
+++ b/htroot/robots.java
@@ -13,7 +13,7 @@ import de.anomic.server.servletProperties;
public class robots {
- public static servletProperties respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static servletProperties respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final servletProperties prop = new servletProperties();
final httpdRobotsTxtConfig rbc = ((plasmaSwitchboard)env).robotstxtConfig;
diff --git a/htroot/sharedBlacklist_p.java b/htroot/sharedBlacklist_p.java
index 58c7afd42..abc2c9140 100644
--- a/htroot/sharedBlacklist_p.java
+++ b/htroot/sharedBlacklist_p.java
@@ -67,7 +67,7 @@ public class sharedBlacklist_p {
private final static String BLACKLIST_FILENAME_FILTER = "^.*\\.black$";
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
diff --git a/htroot/ssitestservlet.java b/htroot/ssitestservlet.java
index a42271769..7009944e3 100644
--- a/htroot/ssitestservlet.java
+++ b/htroot/ssitestservlet.java
@@ -31,7 +31,7 @@ import de.anomic.server.serverSwitch;
public class ssitestservlet {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
//plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/test.java b/htroot/test.java
index 632817e30..c547c5a24 100644
--- a/htroot/test.java
+++ b/htroot/test.java
@@ -6,7 +6,7 @@ public class test {
// http://localhost:8080/test.xml?count=10
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final int count = Math.min(1000, (post == null) ? 0 : post.getInt("count", 0));
diff --git a/htroot/www/welcome.java b/htroot/www/welcome.java
index 92b0a67be..adfd8b628 100644
--- a/htroot/www/welcome.java
+++ b/htroot/www/welcome.java
@@ -43,7 +43,7 @@ import de.anomic.yacy.yacySeed;
public class welcome {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// return variable that accumulates replacements
diff --git a/htroot/yacy/crawlReceipt.java b/htroot/yacy/crawlReceipt.java
index 61bd02900..456cc19ee 100644
--- a/htroot/yacy/crawlReceipt.java
+++ b/htroot/yacy/crawlReceipt.java
@@ -47,7 +47,7 @@ public final class crawlReceipt {
* this is used to respond on a remote crawling request
*/
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/yacy/hello.java b/htroot/yacy/hello.java
index 25a4f2049..50eb5e074 100644
--- a/htroot/yacy/hello.java
+++ b/htroot/yacy/hello.java
@@ -51,7 +51,7 @@ public final class hello {
// example:
// http://localhost:8080/yacy/hello.html?count=1&seed=p|{Hash=sCJ6Tq8T0N9x,IPType=&empty;,Port=8080,IP=,Uptime=8,rI=190,Version=0.10004882,PeerType=junior,UTC=+0200,RCount=0,sI=0,LastSeen=20080605103333,Name=intratest,CCount=5.0,SCount=40,news=,USpeed=0,CRTCnt=0,CRWCnt=0,BDate=20080605081349,rU=190,LCount=187,dct=1212668923654,ICount=2,sU=0,ISpeed=0,RSpeed=0.0,NCount=0,Flags=oooo}
// http://localhost:8080/yacy/hello.html?count=10&seed=z|H4sIAAAAAAAAADWQW2vDMAyF_81eJork3GyGX-YxGigly2WFvZTQijbQJsHx1pWx_z7nMj1J4ug7B_2s6-GsP5q3G-G6vBz2e0iz8t6zfuBr7-5PUNanQfulhqyzTkuUCFXvmitrBJtq4ed3tkPTtRpXhIiRDAmq0uhHFIiQMduJ-NXYU9NCbrrP1vnjIdUqgk09uIK51V6rMBRIilAo2NajwzfhGcx8QUKsEIp5iCJo-eaTVUXPfPQ4k5dm4pp8NzaESsLzS-14QVNIMlA-ka2m1JuZJJWIBRwPo0GIIiYp4zCSkC5GQSLiJIah0p6X_rvlS-MTbWdhkCSBIni9jA_rfP3-Ae1Oye9dAQAA
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) throws InterruptedException {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) throws InterruptedException {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
long start = System.currentTimeMillis();
diff --git a/htroot/yacy/list.java b/htroot/yacy/list.java
index 16b5946e7..1653b4e1e 100644
--- a/htroot/yacy/list.java
+++ b/htroot/yacy/list.java
@@ -42,7 +42,7 @@ import de.anomic.yacy.yacySeed;
public final class list {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
if (post == null || env == null) throw new NullPointerException("post: " + post + ", sb: " + env);
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/yacy/message.java b/htroot/yacy/message.java
index 9f86307b0..fc2a34f1f 100644
--- a/htroot/yacy/message.java
+++ b/htroot/yacy/message.java
@@ -54,7 +54,7 @@ public final class message {
return SimpleFormatter.format(date);
}
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
if (post == null || env == null) { return null; }
// return variable that accumulates replacements
diff --git a/htroot/yacy/profile.java b/htroot/yacy/profile.java
index 00eabb0a5..2582a7b20 100644
--- a/htroot/yacy/profile.java
+++ b/htroot/yacy/profile.java
@@ -44,7 +44,7 @@ import de.anomic.yacy.yacyNetwork;
public final class profile {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final serverObjects prop = new serverObjects();
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/yacy/query.java b/htroot/yacy/query.java
index e336756b2..279e4a4c5 100644
--- a/htroot/yacy/query.java
+++ b/htroot/yacy/query.java
@@ -42,7 +42,7 @@ public final class query {
// example:
// http://localhost:8080/yacy/query.html?youare=sCJ6Tq8T0N9x&object=lurlcount
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> ss) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch ss) {
if (post == null || ss == null) { return null; }
// return variable that accumulates replacements
diff --git a/htroot/yacy/search.java b/htroot/yacy/search.java
index 36aa0c50e..1dc8e0623 100644
--- a/htroot/yacy/search.java
+++ b/htroot/yacy/search.java
@@ -64,7 +64,7 @@ import de.anomic.yacy.yacyURL;
public final class search {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
sb.remoteSearchLastAccess = System.currentTimeMillis();
diff --git a/htroot/yacy/transfer.java b/htroot/yacy/transfer.java
index bac3eab18..18395a816 100644
--- a/htroot/yacy/transfer.java
+++ b/htroot/yacy/transfer.java
@@ -41,7 +41,7 @@ import de.anomic.yacy.yacySeed;
public final class transfer {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
if ((post == null) || (env == null)) return prop;
diff --git a/htroot/yacy/transferRWI.java b/htroot/yacy/transferRWI.java
index 79bc8bf5e..656b6856a 100644
--- a/htroot/yacy/transferRWI.java
+++ b/htroot/yacy/transferRWI.java
@@ -51,7 +51,7 @@ import de.anomic.yacy.logging.Log;
public final class transferRWI {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) throws InterruptedException {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) throws InterruptedException {
// return variable that accumulates replacements
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
diff --git a/htroot/yacy/transferURL.java b/htroot/yacy/transferURL.java
index 69097aa77..f7fe532c8 100644
--- a/htroot/yacy/transferURL.java
+++ b/htroot/yacy/transferURL.java
@@ -46,7 +46,7 @@ import de.anomic.yacy.yacySeed;
public final class transferURL {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) throws InterruptedException {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) throws InterruptedException {
final long start = System.currentTimeMillis();
long freshdate = 0;
try {freshdate = DateFormatter.parseShortDay("20061101").getTime();} catch (final ParseException e1) {}
diff --git a/htroot/yacy/urls.java b/htroot/yacy/urls.java
index 105ba0a84..e2a8fac90 100644
--- a/htroot/yacy/urls.java
+++ b/htroot/yacy/urls.java
@@ -40,7 +40,7 @@ import de.anomic.yacy.yacyURL;
public class urls {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
// insert default values
diff --git a/htroot/yacyinteractive.java b/htroot/yacyinteractive.java
index 52f5b58f0..91fa5556c 100644
--- a/htroot/yacyinteractive.java
+++ b/htroot/yacyinteractive.java
@@ -34,7 +34,7 @@ import de.anomic.server.serverSwitch;
public class yacyinteractive {
- public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
final boolean authenticated = sb.adminAuthenticated(header) >= 2;
diff --git a/htroot/yacysearch.java b/htroot/yacysearch.java
index 0c3035ed8..7afc41248 100644
--- a/htroot/yacysearch.java
+++ b/htroot/yacysearch.java
@@ -65,7 +65,7 @@ import de.anomic.yacy.logging.Log;
public class yacysearch {
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
sb.localSearchLastAccess = System.currentTimeMillis();
diff --git a/htroot/yacysearchitem.java b/htroot/yacysearchitem.java
index 23937919d..558c79649 100644
--- a/htroot/yacysearchitem.java
+++ b/htroot/yacysearchitem.java
@@ -55,7 +55,7 @@ public class yacysearchitem {
private static final int namelength = 60;
private static final int urllength = 120;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final plasmaSwitchboard sb = (plasmaSwitchboard) env;
final serverObjects prop = new serverObjects();
diff --git a/htroot/yacysearchtrailer.java b/htroot/yacysearchtrailer.java
index 16a72fa6e..fe4c51cbb 100644
--- a/htroot/yacysearchtrailer.java
+++ b/htroot/yacysearchtrailer.java
@@ -41,7 +41,7 @@ public class yacysearchtrailer {
private static final int MAX_TOPWORDS = 10;
- public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch<?> env) {
+ public static serverObjects respond(final httpRequestHeader header, final serverObjects post, final serverSwitch env) {
final serverObjects prop = new serverObjects();
final String eventID = post.get("eventID", "");
diff --git a/source/de/anomic/crawler/CrawlProfile.java b/source/de/anomic/crawler/CrawlProfile.java
index 7c16c76b0..1fa458a5d 100644
--- a/source/de/anomic/crawler/CrawlProfile.java
+++ b/source/de/anomic/crawler/CrawlProfile.java
@@ -74,7 +74,12 @@ public class CrawlProfile {
}
public void close() {
- profileTable.close();
+ if (profileTable != null) profileTable.close();
+ this.profileTable = null;
+ }
+
+ public void finalize() {
+ this.close();
}
public int size() {
diff --git a/source/de/anomic/crawler/CrawlQueues.java b/source/de/anomic/crawler/CrawlQueues.java
index c941bc8d5..5ac32e993 100644
--- a/source/de/anomic/crawler/CrawlQueues.java
+++ b/source/de/anomic/crawler/CrawlQueues.java
@@ -303,14 +303,6 @@ public class CrawlQueues {
//log.logDebug("GlobalCrawl: queue is empty");
return false;
}
-
- value = (int) sb.getConfigLong(plasmaSwitchboardConstants.INDEXER_SLOTS, 30);
- if (sb.crawler.indexingStack.size() >= value) {
- if (this.log.isFine()) {
- log.logFine(type + "Crawl: too many processes in indexing queue, dismissed (" + "sbQueueSize=" + sb.crawler.indexingStack.size() + ")");
- }
- return false;
- }
value = (int) sb.getConfigLong(plasmaSwitchboardConstants.CRAWLER_THREADS_ACTIVE_MAX, 10);
if (this.size() >= value) {
// try a cleanup
@@ -347,11 +339,6 @@ public class CrawlQueues {
return false;
}
- if (sb.crawler.indexingStack.size() >= (int) sb.getConfigLong(plasmaSwitchboardConstants.INDEXER_SLOTS, 30) / 2) {
- if (this.log.isFine()) log.logFine("remoteCrawlLoaderJob: too many processes in indexing queue, dismissed (" + "sbQueueSize=" + sb.crawler.indexingStack.size() + ")");
- return false;
- }
-
if (this.size() >= sb.getConfigLong(plasmaSwitchboardConstants.CRAWLER_THREADS_ACTIVE_MAX, 10)) {
// try a cleanup
cleanup();
diff --git a/source/de/anomic/crawler/CrawlSwitchboard.java b/source/de/anomic/crawler/CrawlSwitchboard.java
index eb5dbda08..92ac5babd 100644
--- a/source/de/anomic/crawler/CrawlSwitchboard.java
+++ b/source/de/anomic/crawler/CrawlSwitchboard.java
@@ -58,7 +58,6 @@ public final class CrawlSwitchboard {
public static final long CRAWL_PROFILE_SURROGATE_RECRAWL_CYCLE = 60L * 24L * 30L;
private final Log log;
- public IndexingStack indexingStack;
public CrawlProfile profilesActiveCrawls, profilesPassiveCrawls;
public CrawlProfile.entry defaultProxyProfile;
public CrawlProfile.entry defaultRemoteProfile;
@@ -132,13 +131,9 @@ public final class CrawlSwitchboard {
log.logInfo("Loaded passive crawl profiles from file " + profilesPassiveFile.getName() +
", " + this.profilesPassiveCrawls.size() + " entries" +
", " + profilesPassiveFile.length()/1024);
-
- // init queues
- this.indexingStack = new IndexingStack(peers, queuesRoot, "urlNoticePreStack.stack", this.profilesActiveCrawls);
}
public void clear() {
- indexingStack.clear();
}
private void initActiveCrawlProfiles() {
@@ -228,9 +223,7 @@ public final class CrawlSwitchboard {
initActiveCrawlProfiles();
}
-
public boolean cleanProfiles() throws InterruptedException {
- if (indexingStack.size() > 0) return false;
final Iterator<CrawlProfile.entry> iter = profilesActiveCrawls.profiles(true);
CrawlProfile.entry entry;
boolean hasDoneSomething = false;
@@ -264,7 +257,6 @@ public final class CrawlSwitchboard {
public void close() {
this.profilesActiveCrawls.close();
this.profilesPassiveCrawls.close();
- this.indexingStack.close();
}
}
diff --git a/source/de/anomic/crawler/IndexingStack.java b/source/de/anomic/crawler/IndexingStack.java
deleted file mode 100644
index efcfc9bd0..000000000
--- a/source/de/anomic/crawler/IndexingStack.java
+++ /dev/null
@@ -1,648 +0,0 @@
-// IndexingStack.java
-// (C) 2005 by Michael Peter Christen; [email protected]
-// first published on http://yacy.net
-// Frankfurt, Germany, 2005
-//
-// $LastChangedDate$
-// $LastChangedRevision$
-// $LastChangedBy$
-//
-// LICENSE
-//
-// This program is free software; you can redistribute it and/or modify
-// it under the terms of the GNU General Public License as published by
-// the Free Software Foundation; either version 2 of the License, or
-// (at your option) any later version.
-//
-// This program is distributed in the hope that it will be useful,
-// but WITHOUT ANY WARRANTY; without even the implied warranty of
-// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-// GNU General Public License for more details.
-//
-// You should have received a copy of the GNU General Public License
-// along with this program; if not, write to the Free Software
-// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-
-
-package de.anomic.crawler;
-
-import java.io.File;
-import java.io.IOException;
-import java.net.MalformedURLException;
-import java.util.Date;
-import java.util.Iterator;
-
-import de.anomic.document.Parser;
-import de.anomic.http.httpHeader;
-import de.anomic.http.httpResponseHeader;
-import de.anomic.kelondro.index.Row;
-import de.anomic.kelondro.order.Base64Order;
-import de.anomic.kelondro.order.NaturalOrder;
-import de.anomic.kelondro.table.RecordStack;
-import de.anomic.kelondro.text.MetadataRepository;
-import de.anomic.kelondro.text.metadataPrototype.URLMetadataRow;
-import de.anomic.kelondro.util.DateFormatter;
-import de.anomic.plasma.plasmaHTCache;
-import de.anomic.plasma.plasmaSwitchboardConstants;
-import de.anomic.yacy.yacySeed;
-import de.anomic.yacy.yacySeedDB;
-import de.anomic.yacy.yacyURL;
-import de.anomic.yacy.logging.Log;
-
-public class IndexingStack {
-
- private static final byte[] zbytes = new byte[0];
- //private static final String queuesPrefix = "indexing";
- //private static final String sbQueueName = "sbQueueStack";
-
- protected final CrawlProfile profiles;
- protected final RecordStack sbQueueStack;
- protected final yacySeedDB peers;
-
- public IndexingStack(
- final yacySeedDB peers,
- final File queuesRoot,
- final String sbQueueStackName,
- final CrawlProfile profiles) {
- this.profiles = profiles;
- this.peers = peers;
- this.sbQueueStack = RecordStack.open(new File(queuesRoot, sbQueueStackName), rowdef);
- }
-
- public static final Row rowdef = new Row(
- "String url-256, " + // the url
- "String refhash-" + yacySeedDB.commonHashLength + ", " + // the url's referrer hash
- "Cardinal modifiedsince-11 {b64e}, " + // from ifModifiedSince
- "byte[] flags-1, " + // flags
- "String initiator-" + yacySeedDB.commonHashLength + ", " + // the crawling initiator
- "Cardinal depth-2 {b64e}, " + // the prefetch depth so far, starts at 0
- "String profile-" + yacySeedDB.commonHashLength + ", " + // the name of the prefetch profile handle
- "String urldescr-80",
- NaturalOrder.naturalOrder
- );
-
- public synchronized int size() {
- return (sbQueueStack == null) ? 0 : sbQueueStack.size();
- }
-
- public String file() {
- return this.sbQueueStack.filename;
- }
-
- public synchronized void push(final QueueEntry entry) throws IOException {
- if (entry == null) return;
- if (sbQueueStack == null) return; // may occur during shutdown
- sbQueueStack.push(sbQueueStack.row().newEntry(new byte[][]{
- entry.url.toString().getBytes(),
- (entry.referrerHash == null) ? zbytes : entry.referrerHash.getBytes(),
- Base64Order.enhancedCoder.encodeLong((entry.ifModifiedSince == null) ? 0 : entry.ifModifiedSince.getTime(), 11).getBytes(),
- new byte[]{entry.flags},
- (entry.initiator == null) ? zbytes : entry.initiator.getBytes(),
- Base64Order.enhancedCoder.encodeLong(entry.depth, rowdef.width(5)).getBytes(),
- (entry.profileHandle == null) ? zbytes : entry.profileHandle.getBytes(),
- (entry.anchorName == null) ? "-".getBytes("UTF-8") : entry.anchorName.getBytes("UTF-8")
- }));
- }
-
- public synchronized QueueEntry pop() throws IOException {
- if (sbQueueStack == null) return null;
- // this shall not return null because it may cause a emergency reset!
- int sizeBefore;
- while ((sizeBefore = sbQueueStack.size()) > 0) {
- Row.Entry b = sbQueueStack.pot();
- if (b == null) {
- Log.logInfo("IndexingStack", "sbQueueStack.pot() == null, file = " + sbQueueStack.filename);
- if (sbQueueStack.size() < sizeBefore) continue;
- Log.logSevere("IndexingStack", "sbQueueStack " + sbQueueStack.filename + " does not shrink after pot() == null; trying pop()");
- }
- if (sbQueueStack.size() < sizeBefore) {
- return new QueueEntry(b);
- }
- Log.logSevere("IndexingStack", "sbQueueStack " + sbQueueStack.filename + " does not shrink after pot() != null; trying pop()");
-
- sizeBefore = sbQueueStack.size();
- b = sbQueueStack.pop();
- if (b == null) {
- Log.logInfo("IndexingStack", "sbQueueStack.pop() == null, file = " + sbQueueStack.filename);
- if (sbQueueStack.size() < sizeBefore) continue;
- Log.logSevere("IndexingStack", "sbQueueStack does not shrink after pop() == null; failed; file = " + sbQueueStack.filename);
- return null;
- }
- return new QueueEntry(b);
- }
- Log.logInfo("IndexingStack", "sbQueueStack.size() == 0");
- return null;
- }
-
- public synchronized QueueEntry remove(final String urlHash) {
- final Iterator<Row.Entry> i = sbQueueStack.stackIterator(true);
- Row.Entry rowentry;
- QueueEntry entry;
- while (i.hasNext()) {
- rowentry = i.next();
- entry = new QueueEntry(rowentry);
- if (entry.url().hash().equals(urlHash)) {
- i.remove();
- return entry;
- }
- }
- return null;
- }
-
- public void clear() {
- sbQueueStack.clear();
- }
-
- public void close() {
- if (sbQueueStack != null) {
- sbQueueStack.close();
- }
- }
-
- protected void finalize() throws Throwable {
- try {
- close();
- } catch (final Exception e) {
- throw new IOException("plasmaSwitchboardQueue.finalize()" + e.getMessage());
- }
- super.finalize();
- }
-
- public Iterator<QueueEntry> entryIterator(final boolean up) {
- // iterates the elements in an ordered way.
- // returns plasmaSwitchboardQueue.Entry - type Objects
- return new entryIterator(up);
- }
-
- public class entryIterator implements Iterator<QueueEntry> {
-
- Iterator<Row.Entry> rows;
-
- public entryIterator(final boolean up) {
- rows = sbQueueStack.stackIterator(up);
- }
-
- public boolean hasNext() {
- return rows.hasNext();
- }
-
- public QueueEntry next() {
- return new QueueEntry(rows.next());
- }
-
- public void remove() {
- rows.remove();
- }
- }
-
- public QueueEntry newEntry(
- final yacyURL url,
- final String referrer,
- final Date ifModifiedSince,
- final boolean requestWithCookie,
- final String initiator,
- final int depth,
- final String profilehandle,
- final String anchorName) {
- return new QueueEntry(
- url,
- referrer,
- ifModifiedSince,
- requestWithCookie,
- initiator,
- depth,
- profilehandle,
- anchorName);
- }
-
- public static final int QUEUE_STATE_FRESH = 0;
- public static final int QUEUE_STATE_PARSING = 1;
- public static final int QUEUE_STATE_CONDENSING = 2;
- public static final int QUEUE_STATE_STRUCTUREANALYSIS = 3;
- public static final int QUEUE_STATE_INDEXSTORAGE = 4;
- public static final int QUEUE_STATE_FINISHED = 5;
-
- /**
- * A HarvestResponse is a object that refers to a loaded entity.
- */
- public class QueueEntry {
- yacyURL url; // plasmaURL.urlStringLength
- String referrerHash; // plasmaURL.urlHashLength
- Date ifModifiedSince; // 6
- byte flags; // 1
- String initiator; // yacySeedDB.commonHashLength
- int depth; // plasmaURL.urlCrawlDepthLength
- String profileHandle; // plasmaURL.urlCrawlProfileHandleLength
- String anchorName; // plasmaURL.urlDescrLength
- int status;
-
- // computed values
- private CrawlProfile.entry profileEntry;
- private httpResponseHeader responseHeader;
- private yacyURL referrerURL;
-
- public QueueEntry(
- final yacyURL url,
- final String referrer,
- final Date ifModifiedSince,
- final boolean requestWithCookie,
- final String initiator,
- final int depth,
- final String profileHandle,
- final String anchorName) {
- this.url = url;
- this.referrerHash = referrer;
- this.ifModifiedSince = ifModifiedSince;
- this.flags = (requestWithCookie) ? (byte) 1 : (byte) 0;
- this.initiator = initiator;
- this.depth = depth;
- this.profileHandle = profileHandle;
- this.anchorName = (anchorName==null)?"":anchorName.trim();
-
- this.profileEntry = null;
- this.responseHeader = null;
- this.referrerURL = null;
- this.status = QUEUE_STATE_FRESH;
- }
-
- public QueueEntry(final Row.Entry row) {
- final long ims = row.getColLong(2);
- final byte flags = row.getColByte(3);
- try {
- this.url = new yacyURL(row.getColString(0, "UTF-8"), null);
- } catch (final MalformedURLException e) {
- this.url = null;
- }
- this.referrerHash = row.getColString(1, "UTF-8");
- this.ifModifiedSince = (ims == 0) ? null : new Date(ims);
- this.flags = ((flags & 1) == 1) ? (byte) 1 : (byte) 0;
- this.initiator = row.getColString(4, "UTF-8");
- this.depth = (int) row.getColLong(5);
- this.profileHandle = row.getColString(6, "UTF-8");
- this.anchorName = row.getColString(7, "UTF-8");
-
- this.profileEntry = null;
- this.responseHeader = null;
- this.referrerURL = null;
- this.status = QUEUE_STATE_FRESH;
- }
-
- public QueueEntry(final byte[][] row) throws IOException {
- final long ims = (row[2] == null) ? 0 : Base64Order.enhancedCoder.decodeLong(new String(row[2], "UTF-8"));
- final byte flags = (row[3] == null) ? 0 : row[3][0];
- try {
- this.url = new yacyURL(new String(row[0], "UTF-8"), null);
- } catch (final MalformedURLException e) {
- this.url = null;
- }
- this.referrerHash = (row[1] == null) ? null : new String(row[1], "UTF-8");
- this.ifModifiedSince = (ims == 0) ? null : new Date(ims);
- this.flags = ((flags & 1) == 1) ? (byte) 1 : (byte) 0;
- this.initiator = (row[4] == null) ? null : new String(row[4], "UTF-8");
- this.depth = (int) Base64Order.enhancedCoder.decodeLong(new String(row[5], "UTF-8"));
- this.profileHandle = new String(row[6], "UTF-8");
- this.anchorName = (row[7] == null) ? null : (new String(row[7], "UTF-8")).trim();
-
- this.profileEntry = null;
- this.responseHeader = null;
- this.referrerURL = null;
- this.status = QUEUE_STATE_FRESH;
- }
-
- public void updateStatus(final int newStatus) {
- this.status = newStatus;
- }
-
- public yacyURL url() {
- return url;
- }
-
- public boolean requestedWithCookie() {
- return (flags & 1) == 1;
- }
-
- public boolean proxy() {
- // FIXME the equals seems to be incorrect: String.equals(boolean)
- return (initiator == null) || (initiator.equals(initiator.length() == 0));
- }
-
- public String initiator() {
- return (initiator == null) ? "------------" : initiator; // TODO: this may cause problems for methods that check if the initiator is the proxy
- }
-
- public yacySeed initiatorPeer() {
- if ((initiator == null) || (initiator.length() == 0)) return null;
- if (initiator.equals(peers.mySeed().hash)) {
- // normal crawling
- return null;
- }
- // this was done for remote peer (a global crawl)
- return peers.getConnected(initiator);
- }
-
- public int depth() {
- return depth;
- }
-
- public long size() {
- return plasmaHTCache.getResourceContentLength(this.url);
- }
-
- public CrawlProfile.entry profile() {
- if (profileEntry == null) profileEntry = profiles.getEntry(profileHandle);
- return profileEntry;
- }
-
- private void getResponseHeader() {
- if (this.responseHeader == null) try {
- this.responseHeader = plasmaHTCache.loadResponseHeader(this.url);
- } catch (final Exception e) {
- Log.logSevere("PLASMA", "responseHeader: failed to get header", e);
- }
- }
-
- public String getMimeType() {
- this.getResponseHeader();
- return (responseHeader == null) ? null : responseHeader.mime();
- }
-
- public String getCharacterEncoding() {
- getResponseHeader();
- return (responseHeader == null) ? null : responseHeader.getCharacterEncoding();
- }
-
- public Date getModificationDate() {
- getResponseHeader();
- return (responseHeader == null) ? new Date() : responseHeader.lastModified();
- }
-
- public yacyURL referrerURL(MetadataRepository repository) {
- if (referrerURL == null) {
- // FIXME the equals seems to be incorrect: String.equals(boolean)
- if ((referrerHash == null) || ((initiator != null) && (referrerHash.equals(initiator.length() == 0)))) return null;
- final URLMetadataRow entry = repository.load(referrerHash, null, 0);
- if (entry == null) referrerURL = null; else referrerURL = entry.metadata().url();
- }
- return referrerURL;
- }
-
- public String referrerHash() {
- return (referrerHash == null) ? "" : referrerHash;
- }
-
- public String anchorName() {
- return anchorName;
- }
-
- public int processCase() {
- // we must distinguish the following cases: resource-load was initiated by
- // 1) global crawling: the index is extern, not here (not possible here)
- // 2) result of search queries, some indexes are here (not possible here)
- // 3) result of index transfer, some of them are here (not possible here)
- // 4) proxy-load (initiator is "------------")
- // 5) local prefetch/crawling (initiator is own seedHash)
- // 6) local fetching for global crawling (other known or unknwon initiator)
- int processCase = plasmaSwitchboardConstants.PROCESSCASE_0_UNKNOWN;
- // FIXME the equals seems to be incorrect: String.equals(boolean)
- if ((initiator == null) || initiator.length() == 0 || initiator.equals("------------")) {
- // proxy-load
- processCase = plasmaSwitchboardConstants.PROCESSCASE_4_PROXY_LOAD;
- } else if (initiator.equals(peers.mySeed().hash)) {
- // normal crawling
- processCase = plasmaSwitchboardConstants.PROCESSCASE_5_LOCAL_CRAWLING;
- } else {
- // this was done for remote peer (a global crawl)
- processCase = plasmaSwitchboardConstants.PROCESSCASE_6_GLOBAL_CRAWLING;
- }
- return processCase;
- }
-
- /**
- * decide upon header information if a specific file should be indexed
- * this method returns null if the answer is 'YES'!
- * if the answer is 'NO' (do not index), it returns a string with the reason
- * to reject the crawling demand in clear text
- *
- * This function is used by plasmaSwitchboard#processResourceStack
- */
- public final String shallIndexCacheForProxy() {
- if (profile() == null) {
- return "shallIndexCacheForProxy: profile() is null !";
- }
-
- // check profile
- if (!profile().indexText() && !profile().indexMedia()) {
- return "indexing not allowed - indexText and indexMedia not set (for proxy)";
- }
-
- // -CGI access in request
- // CGI access makes the page very individual, and therefore not usable in caches
- if (!profile().crawlingQ()) {
- if (url.isPOST()) {
- return "Dynamic_(POST)";
- }
- if (url.isCGI()) {
- return "Dynamic_(CGI)";
- }
- }
-
- // -authorization cases in request
- // we checked that in shallStoreCache
-
- // -ranges in request
- // we checked that in shallStoreCache
-
- // a picture cannot be indexed
- if (plasmaHTCache.noIndexingURL(url)) {
- return "Media_Content_(forbidden)";
- }
-
- // -cookies in request
- // unfortunately, we cannot index pages which have been requested with a cookie
- // because the returned content may be special for the client
- if (requestedWithCookie()) {
-// System.out.println("***not indexed because cookie");
- return "Dynamic_(Requested_With_Cookie)";
- }
-
- getResponseHeader();
- if (responseHeader != null) {
- // -set-cookie in response
- // the set-cookie from the server does not indicate that the content is special
- // thus we do not care about it here for indexing
-
- // a picture cannot be indexed
- final String mimeType = responseHeader.mime();
- if (plasmaHTCache.isPicture(mimeType)) {
- return "Media_Content_(Picture)";
- }
- String parserError = Parser.supportsMime(mimeType);
- if (parserError != null) {
- return "Media_Content, no parser: " + parserError;
- }
-
- // -if-modified-since in request
- // if the page is fresh at the very moment we can index it
- final Date ifModifiedSince = getModificationDate();
- if ((ifModifiedSince != null) && (responseHeader.containsKey(httpHeader.LAST_MODIFIED))) {
- // parse date
- Date d = responseHeader.lastModified();
- if (d == null) {
- d = new Date(DateFormatter.correctedUTCTime());
- }
- // finally, we shall treat the cache as stale if the modification time is after the if-.. time
- if (d.after(ifModifiedSince)) {
- //System.out.println("***not indexed because if-modified-since");
- return "Stale_(Last-Modified>Modified-Since)";
- }
- }
-
- // -pragma in cached response
- if (responseHeader.containsKey(httpHeader.PRAGMA) &&
- (responseHeader.get(httpHeader.PRAGMA)).toUpperCase().equals("NO-CACHE")) {
- return "Denied_(pragma_no_cache)";
- }
-
- // see for documentation also:
- // http://www.web-caching.com/cacheability.html
-
- // look for freshnes information
-
- // -expires in cached response
- // the expires value gives us a very easy hint when the cache is stale
- // sometimes, the expires date is set to the past to prevent that a page is cached
- // we use that information to see if we should index it
- final Date expires = responseHeader.expires();
- if (expires != null && expires.before(new Date(DateFormatter.correctedUTCTime()))) {
- return "Stale_(Expired)";
- }
-
- // -lastModified in cached response
- // this information is too weak to use it to prevent indexing
- // even if we can apply a TTL heuristic for cache usage
-
- // -cache-control in cached response
- // the cache-control has many value options.
- String cacheControl = responseHeader.get(httpHeader.CACHE_CONTROL);
- if (cacheControl != null) {
- cacheControl = cacheControl.trim().toUpperCase();
- /* we have the following cases for cache-control:
- "public" -- can be indexed
- "private", "no-cache", "no-store" -- cannot be indexed
- "max-age=<delta-seconds>" -- stale/fresh dependent on date
- */
- if (cacheControl.startsWith("PRIVATE") ||
- cacheControl.startsWith("NO-CACHE") ||
- cacheControl.startsWith("NO-STORE")) {
- // easy case
- return "Stale_(denied_by_cache-control=" + cacheControl + ")";
- // } else if (cacheControl.startsWith("PUBLIC")) {
- // // ok, do nothing
- } else if (cacheControl.startsWith("MAX-AGE=")) {
- // we need also the load date
- final Date date = responseHeader.date();
- if (date == null) {
- return "Stale_(no_date_given_in_response)";
- }
- try {
- final long ttl = 1000 * Long.parseLong(cacheControl.substring(8)); // milliseconds to live
- if (DateFormatter.correctedUTCTime() - date.getTime() > ttl) {
- //System.out.println("***not indexed because cache-control");
- return "Stale_(expired_by_cache-control)";
- }
- } catch (final Exception e) {
- return "Error_(" + e.getMessage() + ")";
- }
- }
- }
- }
- return null;
- }
-
- /**
- * decide upon header information if a specific file should be indexed
- * this method returns null if the answer is 'YES'!
- * if the answer is 'NO' (do not index), it returns a string with the reason
- * to reject the crawling demand in clear text
- *
- * This function is used by plasmaSwitchboard#processResourceStack
- */
- public final String shallIndexCacheForCrawler() {
- if (profile() == null) {
- return "shallIndexCacheForCrawler: profile() is null !";
- }
-
- // check profile
- if (!profile().indexText() && !profile().indexMedia()) {
- return "indexing not allowed - indexText and indexMedia not set (for crawler)";
- }
-
- // -CGI access in request
- // CGI access makes the page very individual, and therefore not usable in caches
- if (!profile().crawlingQ()) {
- if (url().isPOST()) { return "Dynamic_(POST)"; }
- if (url().isCGI()) { return "Dynamic_(CGI)"; }
- }
-
- // -authorization cases in request
- // we checked that in shallStoreCache
-
- // -ranges in request
- // we checked that in shallStoreCache
-
- // a picture cannot be indexed
- getResponseHeader();
- if (responseHeader != null) {
- final String mimeType = responseHeader.mime();
- if (plasmaHTCache.isPicture(mimeType)) { return "Media_Content_(Picture)"; }
- String parserError = Parser.supportsMime(mimeType);
- if (parserError != null) { return "Media_Content, parser error: " + parserError; }
- }
- if (plasmaHTCache.noIndexingURL(url())) { return "Media_Content_(forbidden)"; }
-
- // -if-modified-since in request
- // if the page is fresh at the very moment we can index it
- // -> this does not apply for the crawler
-
- // -cookies in request
- // unfortunately, we cannot index pages which have been requested with a cookie
- // because the returned content may be special for the client
- // -> this does not apply for a crawler
-
- // -set-cookie in response
- // the set-cookie from the server does not indicate that the content is special
- // thus we do not care about it here for indexing
- // -> this does not apply for a crawler
-
- // -pragma in cached response
- // -> in the crawler we ignore this
-
- // look for freshnes information
-
- // -expires in cached response
- // the expires value gives us a very easy hint when the cache is stale
- // sometimes, the expires date is set to the past to prevent that a page is cached
- // we use that information to see if we should index it
- // -> this does not apply for a crawler
-
- // -lastModified in cached response
- // this information is too weak to use it to prevent indexing
- // even if we can apply a TTL heuristic for cache usage
-
- // -cache-control in cached response
- // the cache-control has many value options.
- // -> in the crawler we ignore this
-
- return null;
- }
-
- /*
- * (non-Javadoc)
- *
- * @see java.lang.Object#toString()
- */
- public String toString() {
- return "QueueEntry of "+ url.toString() + ", ref="+referrerHash +", initiator="+initiator +", flags="+ flags +", anchor="+ anchorName;
- }
- } // class Entry
-}
\ No newline at end of file
diff --git a/source/de/anomic/crawler/retrieval/Response.java b/source/de/anomic/crawler/retrieval/Response.java
index 2e07f6f8b..6e3580cb2 100755
--- a/source/de/anomic/crawler/retrieval/Response.java
+++ b/source/de/anomic/crawler/retrieval/Response.java
@@ -29,11 +29,13 @@ package de.anomic.crawler.retrieval;
import java.util.Date;
import de.anomic.crawler.CrawlProfile;
+import de.anomic.document.Parser;
import de.anomic.http.httpHeader;
import de.anomic.http.httpRequestHeader;
import de.anomic.http.httpResponseHeader;
import de.anomic.kelondro.util.DateFormatter;
import de.anomic.plasma.plasmaHTCache;
+import de.anomic.plasma.plasmaSwitchboardConstants;
import de.anomic.yacy.yacyURL;
public class Response {
@@ -57,7 +59,8 @@ public class Response {
private final httpResponseHeader responseHeader;
private final String responseStatus;
private final CrawlProfile.entry profile;
- private byte[] content; //
+ private byte[] content;
+ private int status; // tracker indexing status, see status defs below
// doctype calculation
public static char docType(final yacyURL url) {
@@ -130,24 +133,39 @@ public class Response {
return doctype;
}
+ public static final int QUEUE_STATE_FRESH = 0;
+ public static final int QUEUE_STATE_PARSING = 1;
+ public static final int QUEUE_STATE_CONDENSING = 2;
+ public static final int QUEUE_STATE_STRUCTUREANALYSIS = 3;
+ public static final int QUEUE_STATE_INDEXSTORAGE = 4;
+ public static final int QUEUE_STATE_FINISHED = 5;
+
public Response(
Request request,
final httpRequestHeader requestHeader,
final httpResponseHeader responseHeader,
final String responseStatus,
final CrawlProfile.entry profile) {
- assert responseHeader != null;
this.request = request;
+ // request and response headers may be zero in case that we process surrogates
this.requestHeader = requestHeader;
this.responseHeader = responseHeader;
this.responseStatus = responseStatus;
this.profile = profile;
+ this.status = QUEUE_STATE_FRESH;
-
// to be defined later:
this.content = null;
}
+ public void updateStatus(final int newStatus) {
+ this.status = newStatus;
+ }
+
+ public int getStatus() {
+ return this.status;
+ }
+
public String name() {
// the anchor name; can be either the text inside the anchor tag or the
// page description after loading of the page
@@ -458,6 +476,224 @@ public class Response {
return true;
}
+
+ /**
+ * decide upon header information if a specific file should be indexed
+ * this method returns null if the answer is 'YES'!
+ * if the answer is 'NO' (do not index), it returns a string with the reason
+ * to reject the crawling demand in clear text
+ *
+ * This function is used by plasmaSwitchboard#processResourceStack
+ */
+ public final String shallIndexCacheForProxy() {
+ if (profile() == null) {
+ return "shallIndexCacheForProxy: profile() is null !";
+ }
+
+ // check profile
+ if (!profile().indexText() && !profile().indexMedia()) {
+ return "indexing not allowed - indexText and indexMedia not set (for proxy)";
+ }
+
+ // -CGI access in request
+ // CGI access makes the page very individual, and therefore not usable in caches
+ if (!profile().crawlingQ()) {
+ if (url().isPOST()) {
+ return "Dynamic_(POST)";
+ }
+ if (url().isCGI()) {
+ return "Dynamic_(CGI)";
+ }
+ }
+
+ // -authorization cases in request
+ // we checked that in shallStoreCache
+
+ // -ranges in request
+ // we checked that in shallStoreCache
+
+ // a picture cannot be indexed
+ if (plasmaHTCache.noIndexingURL(url())) {
+ return "Media_Content_(forbidden)";
+ }
+
+ // -cookies in request
+ // unfortunately, we cannot index pages which have been requested with a cookie
+ // because the returned content may be special for the client
+ if (requestWithCookie()) {
+// System.out.println("***not indexed because cookie");
+ return "Dynamic_(Requested_With_Cookie)";
+ }
+
+ if (responseHeader != null) {
+ // -set-cookie in response
+ // the set-cookie from the server does not indicate that the content is special
+ // thus we do not care about it here for indexing
+
+ // a picture cannot be indexed
+ final String mimeType = responseHeader.mime();
+ if (plasmaHTCache.isPicture(mimeType)) {
+ return "Media_Content_(Picture)";
+ }
+ String parserError = Parser.supportsMime(mimeType);
+ if (parserError != null) {
+ return "Media_Content, no parser: " + parserError;
+ }
+
+ // -if-modified-since in request
+ // if the page is fresh at the very moment we can index it
+ final Date ifModifiedSince = this.requestHeader.ifModifiedSince();
+ if ((ifModifiedSince != null) && (responseHeader.containsKey(httpHeader.LAST_MODIFIED))) {
+ // parse date
+ Date d = responseHeader.lastModified();
+ if (d == null) {
+ d = new Date(DateFormatter.correctedUTCTime());
+ }
+ // finally, we shall treat the cache as stale if the modification time is after the if-.. time
+ if (d.after(ifModifiedSince)) {
+ //System.out.println("***not indexed because if-modified-since");
+ return "Stale_(Last-Modified>Modified-Since)";
+ }
+ }
+
+ // -pragma in cached response
+ if (responseHeader.containsKey(httpHeader.PRAGMA) &&
+ (responseHeader.get(httpHeader.PRAGMA)).toUpperCase().equals("NO-CACHE")) {
+ return "Denied_(pragma_no_cache)";
+ }
+
+ // see for documentation also:
+ // http://www.web-caching.com/cacheability.html
+
+ // look for freshnes information
+
+ // -expires in cached response
+ // the expires value gives us a very easy hint when the cache is stale
+ // sometimes, the expires date is set to the past to prevent that a page is cached
+ // we use that information to see if we should index it
+ final Date expires = responseHeader.expires();
+ if (expires != null && expires.before(new Date(DateFormatter.correctedUTCTime()))) {
+ return "Stale_(Expired)";
+ }
+
+ // -lastModified in cached response
+ // this information is too weak to use it to prevent indexing
+ // even if we can apply a TTL heuristic for cache usage
+
+ // -cache-control in cached response
+ // the cache-control has many value options.
+ String cacheControl = responseHeader.get(httpHeader.CACHE_CONTROL);
+ if (cacheControl != null) {
+ cacheControl = cacheControl.trim().toUpperCase();
+ /* we have the following cases for cache-control:
+ "public" -- can be indexed
+ "private", "no-cache", "no-store" -- cannot be indexed
+ "max-age=<delta-seconds>" -- stale/fresh dependent on date
+ */
+ if (cacheControl.startsWith("PRIVATE") ||
+ cacheControl.startsWith("NO-CACHE") ||
+ cacheControl.startsWith("NO-STORE")) {
+ // easy case
+ return "Stale_(denied_by_cache-control=" + cacheControl + ")";
+// } else if (cacheControl.startsWith("PUBLIC")) {
+// // ok, do nothing
+ } else if (cacheControl.startsWith("MAX-AGE=")) {
+ // we need also the load date
+ final Date date = responseHeader.date();
+ if (date == null) {
+ return "Stale_(no_date_given_in_response)";
+ }
+ try {
+ final long ttl = 1000 * Long.parseLong(cacheControl.substring(8)); // milliseconds to live
+ if (DateFormatter.correctedUTCTime() - date.getTime() > ttl) {
+ //System.out.println("***not indexed because cache-control");
+ return "Stale_(expired_by_cache-control)";
+ }
+ } catch (final Exception e) {
+ return "Error_(" + e.getMessage() + ")";
+ }
+ }
+ }
+ }
+ return null;
+ }
+
+ /**
+ * decide upon header information if a specific file should be indexed
+ * this method returns null if the answer is 'YES'!
+ * if the answer is 'NO' (do not index), it returns a string with the reason
+ * to reject the crawling demand in clear text
+ *
+ * This function is used by plasmaSwitchboard#processResourceStack
+ */
+ public final String shallIndexCacheForCrawler() {
+ if (profile() == null) {
+ return "shallIndexCacheForCrawler: profile() is null !";
+ }
+
+ // check profile
+ if (!profile().indexText() && !profile().indexMedia()) {
+ return "indexing not allowed - indexText and indexMedia not set (for crawler)";
+ }
+
+ // -CGI access in request
+ // CGI access makes the page very individual, and therefore not usable in caches
+ if (!profile().crawlingQ()) {
+ if (url().isPOST()) { return "Dynamic_(POST)"; }
+ if (url().isCGI()) { return "Dynamic_(CGI)"; }
+ }
+
+ // -authorization cases in request
+ // we checked that in shallStoreCache
+
+ // -ranges in request
+ // we checked that in shallStoreCache
+
+ // a picture cannot be indexed
+ if (responseHeader != null) {
+ final String mimeType = responseHeader.mime();
+ if (plasmaHTCache.isPicture(mimeType)) { return "Media_Content_(Picture)"; }
+ String parserError = Parser.supportsMime(mimeType);
+ if (parserError != null) { return "Media_Content, parser error: " + parserError; }
+ }
+ if (plasmaHTCache.noIndexingURL(url())) { return "Media_Content_(forbidden)"; }
+
+ // -if-modified-since in request
+ // if the page is fresh at the very moment we can index it
+ // -> this does not apply for the crawler
+
+ // -cookies in request
+ // unfortunately, we cannot index pages which have been requested with a cookie
+ // because the returned content may be special for the client
+ // -> this does not apply for a crawler
+
+ // -set-cookie in response
+ // the set-cookie from the server does not indicate that the content is special
+ // thus we do not care about it here for indexing
+ // -> this does not apply for a crawler
+
+ // -pragma in cached response
+ // -> in the crawler we ignore this
+
+ // look for freshnes information
+
+ // -expires in cached response
+ // the expires value gives us a very easy hint when the cache is stale
+ // sometimes, the expires date is set to the past to prevent that a page is cached
+ // we use that information to see if we should index it
+ // -> this does not apply for a crawler
+
+ // -lastModified in cached response
+ // this information is too weak to use it to prevent indexing
+ // even if we can apply a TTL heuristic for cache usage
+
+ // -cache-control in cached response
+ // the cache-control has many value options.
+ // -> in the crawler we ignore this
+
+ return null;
+ }
+
public String getMimeType() {
if (responseHeader == null) return null;
@@ -479,7 +715,18 @@ public class Response {
return new yacyURL(requestHeader.get(httpRequestHeader.REFERER, ""), null);
} catch (final Exception e) {
return null;
- }
+ }
+ }
+
+ public String referrerHash() {
+ if (requestHeader == null) return null;
+ String u = requestHeader.get(httpRequestHeader.REFERER, "");
+ if (u == null || u.length() == 0) return null;
+ try {
+ return new yacyURL(u, null).hash();
+ } catch (final Exception e) {
+ return null;
+ }
}
public boolean validResponseStatus() {
@@ -501,5 +748,27 @@ public class Response {
(requestHeader.get(httpHeader.X_YACY_INDEX_CONTROL)).toUpperCase().equals("NO-INDEX");
}
-
+ public int processCase(String mySeedHash) {
+ // we must distinguish the following cases: resource-load was initiated by
+ // 1) global crawling: the index is extern, not here (not possible here)
+ // 2) result of search queries, some indexes are here (not possible here)
+ // 3) result of index transfer, some of them are here (not possible here)
+ // 4) proxy-load (initiator is "------------")
+ // 5) local prefetch/crawling (initiator is own seedHash)
+ // 6) local fetching for global crawling (other known or unknwon initiator)
+ int processCase = plasmaSwitchboardConstants.PROCESSCASE_0_UNKNOWN;
+ // FIXME the equals seems to be incorrect: String.equals(boolean)
+ if ((initiator() == null) || initiator().length() == 0 || initiator().equals("------------")) {
+ // proxy-load
+ processCase = plasmaSwitchboardConstants.PROCESSCASE_4_PROXY_LOAD;
+ } else if (initiator().equals(mySeedHash)) {
+ // normal crawling
+ processCase = plasmaSwitchboardConstants.PROCESSCASE_5_LOCAL_CRAWLING;
+ } else {
+ // this was done for remote peer (a global crawl)
+ processCase = plasmaSwitchboardConstants.PROCESSCASE_6_GLOBAL_CRAWLING;
+ }
+ return processCase;
+ }
+
}
diff --git a/source/de/anomic/data/translator.java b/source/de/anomic/data/translator.java
index b3fe05a7d..2fbbf5ce5 100644
--- a/source/de/anomic/data/translator.java
+++ b/source/de/anomic/data/translator.java
@@ -219,7 +219,7 @@ public class translator {
return true;
}
- public static HashMap<String, String> langMap(final serverSwitch<?> env) {
+ public static HashMap<String, String> langMap(final serverSwitch env) {
final String[] ms = env.getConfig("locale.lang", "").split(",");
final HashMap<String, String> map = new HashMap<String, String>();
int p;
@@ -231,7 +231,7 @@ public class translator {
return map;
}
- public static boolean changeLang(final serverSwitch<?> env, final String langPath, final String lang) {
+ public static boolean changeLang(final serverSwitch env, final String langPath, final String lang) {
if ((lang.equals("default")) || (lang.equals("default.lng"))) {
env.setConfig("locale.language", "default");
return true;
diff --git a/source/de/anomic/http/httpd.java b/source/de/anomic/http/httpd.java
index 965643fa6..90f35c153 100644
--- a/source/de/anomic/http/httpd.java
+++ b/source/de/anomic/http/httpd.java
@@ -147,7 +147,7 @@ public final class httpd implements serverHandler, Cloneable {
private final static Log log = new Log("HTTPD");
// class methods
- public httpd(final serverSwitch<?> s) {
+ public httpd(final serverSwitch s) {
// handler info
httpd.switchboard = (plasmaSwitchboard)s;
httpd.virtualHost = switchboard.getConfig("fileHost","localhost");
@@ -292,7 +292,7 @@ public final class httpd implements serverHandler, Cloneable {
return persistent;
}
- public static int staticAdminAuthenticated(final String authorization, final serverSwitch<?> sw) {
+ public static int staticAdminAuthenticated(final String authorization, final serverSwitch sw) {
// the authorization string must be given with the truncated 6 bytes at the beginning
if (authorization == null) return 1;
//if (authorization.length() < 6) return 1; // no authentication information given
diff --git a/source/de/anomic/http/httpdFileHandler.java b/source/de/anomic/http/httpdFileHandler.java
index 46a85b3b2..8f326df1e 100644
--- a/source/de/anomic/http/httpdFileHandler.java
+++ b/source/de/anomic/http/httpdFileHandler.java
@@ -107,7 +107,7 @@ public final class httpdFileHandler {
private static final Properties mimeTable = new Properties();
// create a class loader
private static final serverClassLoader provider = new serverClassLoader(/*this.getClass().getClassLoader()*/);
- private static serverSwitch<?> switchboard = null;
+ private static serverSwitch switchboard = null;
private static plasmaSwitchboard sb = plasmaSwitchboard.getSwitchboard();
private static File htRootPath = null;
@@ -131,7 +131,7 @@ public final class httpdFileHandler {
private static final Log theLogger = new Log("FILEHANDLER");
static {
- final serverSwitch<?> theSwitchboard = plasmaSwitchboard.getSwitchboard();
+ final serverSwitch theSwitchboard = plasmaSwitchboard.getSwitchboard();
useTemplateCache = theSwitchboard.getConfig("enableTemplateCache","true").equalsIgnoreCase("true");
templateCache = (useTemplateCache)? new ConcurrentHashMap<File, SoftReference<TemplateCacheEntry>>() : new ConcurrentHashMap<File, SoftReference<TemplateCacheEntry>>(0);
templateMethodCache = (useTemplateCache) ? new ConcurrentHashMap<File, SoftReference<Method>>() : new ConcurrentHashMap<File, SoftReference<Method>>(0);
diff --git a/source/de/anomic/http/httpdRobotsTxtConfig.java b/source/de/anomic/http/httpdRobotsTxtConfig.java
index b2e19d3e3..c4fdd8972 100644
--- a/source/de/anomic/http/httpdRobotsTxtConfig.java
+++ b/source/de/anomic/http/httpdRobotsTxtConfig.java
@@ -83,7 +83,7 @@ public final class httpdRobotsTxtConfig {
}
}
- public static httpdRobotsTxtConfig init(final serverSwitch<?> env) {
+ public static httpdRobotsTxtConfig init(final serverSwitch env) {
final String cfg = env.getConfig(plasmaSwitchboardConstants.ROBOTS_TXT, plasmaSwitchboardConstants.ROBOTS_TXT_DEFAULT);
if (cfg == null) return new httpdRobotsTxtConfig();
return new httpdRobotsTxtConfig(cfg.split(","));
diff --git a/source/de/anomic/kelondro/blob/Heap.java b/source/de/anomic/kelondro/blob/Heap.java
index b8b75374b..1318fd0f6 100755
--- a/source/de/anomic/kelondro/blob/Heap.java
+++ b/source/de/anomic/kelondro/blob/Heap.java
@@ -258,6 +258,14 @@ public final class Heap extends HeapModifier implements BLOB {
super.close(writeIDX);
assert file == null;
}
+
+ public synchronized void close() {
+ this.close(true);
+ }
+
+ public void finalize() {
+ this.close();
+ }
/**
* write a whole byte array as BLOB to the table
diff --git a/source/de/anomic/kelondro/blob/HeapModifier.java b/source/de/anomic/kelondro/blob/HeapModifier.java
index 3eab471fe..4f5f812cc 100644
--- a/source/de/anomic/kelondro/blob/HeapModifier.java
+++ b/source/de/anomic/kelondro/blob/HeapModifier.java
@@ -108,6 +108,14 @@ public class HeapModifier extends HeapReader implements BLOB {
super.close(writeIDX);
}
+ public synchronized void close() {
+ close(true);
+ }
+
+ public void finalize() {
+ this.close();
+ }
+
/**
* remove a BLOB
* @param key the primary key
diff --git a/source/de/anomic/kelondro/blob/HeapReader.java b/source/de/anomic/kelondro/blob/HeapReader.java
index 67605a859..f43bba6db 100644
--- a/source/de/anomic/kelondro/blob/HeapReader.java
+++ b/source/de/anomic/kelondro/blob/HeapReader.java
@@ -386,6 +386,14 @@ public class HeapReader {
}
}
+ public synchronized void close() {
+ close(true);
+ }
+
+ public void finalize() {
+ this.close();
+ }
+
/**
* ask for the length of the primary key
* @return the length of the key
diff --git a/source/de/anomic/kelondro/blob/MapView.java b/source/de/anomic/kelondro/blob/MapView.java
index 3b725ef27..3e286508f 100644
--- a/source/de/anomic/kelondro/blob/MapView.java
+++ b/source/de/anomic/kelondro/blob/MapView.java
@@ -47,7 +47,7 @@ import de.anomic.kelondro.util.kelondroException;
public class MapView {
- private final BLOB blob;
+ private BLOB blob;
private ScoreCluster<String> cacheScore;
private HashMap<String, Map<String, String>> cache;
private final long startup;
@@ -292,21 +292,23 @@ public class MapView {
* @return the number of entries in the table
*/
public synchronized int size() {
- return blob.size();
+ return (blob == null) ? 0 : blob.size();
}
/**
* close the Map table
*/
public void close() {
- // finish queue
- //writeWorker.terminate(true);
-
cache = null;
cacheScore = null;
// close file
- blob.close(true);
+ if (blob != null) blob.close(true);
+ blob = null;
+ }
+
+ public void finalize() {
+ close();
}
public class objectIterator implements Iterator<Map<String, String>> {
diff --git a/source/de/anomic/plasma/plasmaSwitchboard.java b/source/de/anomic/plasma/plasmaSwitchboard.java
index 639384e42..d29d2e315 100644
--- a/source/de/anomic/plasma/plasmaSwitchboard.java
+++ b/source/de/anomic/plasma/plasmaSwitchboard.java
@@ -120,7 +120,6 @@ import de.anomic.crawler.CrawlQueues;
import de.anomic.crawler.CrawlStacker;
import de.anomic.crawler.CrawlSwitchboard;
import de.anomic.crawler.ImporterManager;
-import de.anomic.crawler.IndexingStack;
import de.anomic.crawler.NoticedURL;
import de.anomic.crawler.ResourceObserver;
import de.anomic.crawler.ResultImages;
@@ -128,7 +127,6 @@ import de.anomic.crawler.ResultURLs;
import de.anomic.crawler.RobotsTxt;
import de.anomic.crawler.ZURL;
import de.anomic.crawler.CrawlProfile.entry;
-import de.anomic.crawler.IndexingStack.QueueEntry;
import de.anomic.crawler.retrieval.HTTPLoader;
import de.anomic.crawler.retrieval.Request;
import de.anomic.crawler.retrieval.LoaderDispatcher;
@@ -201,7 +199,7 @@ import de.anomic.yacy.dht.Dispatcher;
import de.anomic.yacy.dht.PeerSelection;
import de.anomic.yacy.logging.Log;
-public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.QueueEntry> implements serverSwitch<IndexingStack.QueueEntry> {
+public final class plasmaSwitchboard extends serverAbstractSwitch implements serverSwitch {
// load slots
public static int xstackCrawlSlots = 2000;
@@ -557,10 +555,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
} catch (final IOException e) {
}
- // clean up profiles
- this.log.logConfig("Cleaning Profiles");
- try { cleanProfiles(); } catch (final InterruptedException e) { /* Ignore this here */ }
-
// init ranking transmission
/*
CRDistOn = true/false
@@ -610,35 +604,39 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
// deploy blocking threads
int indexerThreads = Math.max(1, serverProcessor.useCPU / 2);
- indexingStorageProcessor = new serverProcessor<indexingQueueEntry>(
+ this.indexingStorageProcessor = new serverProcessor<indexingQueueEntry>(
"storeDocumentIndex",
"This is the sequencing step of the indexing queue: no concurrency is wanted here, because the access of the indexer works better if it is not concurrent. Files are written as streams, councurrency would destroy IO performance. In this process the words are written to the RWI cache, which flushes if it is full.",
new String[]{"RWI/Cache/Collections"},
this, "storeDocumentIndex", serverProcessor.useCPU + 40, null, indexerThreads);
- indexingAnalysisProcessor = new serverProcessor<indexingQueueEntry>(
+ this.indexingAnalysisProcessor = new serverProcessor<indexingQueueEntry>(
"webStructureAnalysis",
"This just stores the link structure of the document into a web structure database.",
new String[]{"storeDocumentIndex"},
this, "webStructureAnalysis", serverProcessor.useCPU + 20, indexingStorageProcessor, serverProcessor.useCPU + 1);
- indexingCondensementProcessor = new serverProcessor<indexingQueueEntry>(
+ this.indexingCondensementProcessor = new serverProcessor<indexingQueueEntry>(
"condenseDocument",
"This does a structural analysis of plain texts: markup of headlines, slicing into phrases (i.e. sentences), markup with position, counting of words, calculation of term frequency.",
new String[]{"webStructureAnalysis"},
this, "condenseDocument", serverProcessor.useCPU + 10, indexingAnalysisProcessor, serverProcessor.useCPU + 1);
- indexingDocumentProcessor = new serverProcessor<indexingQueueEntry>(
+ this.indexingDocumentProcessor = new serverProcessor<indexingQueueEntry>(
"parseDocument",
"This does the parsing of the newly loaded documents from the web. The result is not only a plain text document, but also a list of URLs that are embedded into the document. The urls are handed over to the CrawlStacker. This process has two child process queues!",
new String[]{"condenseDocument", "CrawlStacker"},
this, "parseDocument", 2 * serverProcessor.useCPU + 1, indexingCondensementProcessor, 2 * serverProcessor.useCPU + 1);
+ // clean up profiles
+ this.log.logConfig("Cleaning Profiles");
+ try { cleanProfiles(); } catch (final InterruptedException e) { /* Ignore this here */ }
+
// deploy busy threads
log.logConfig("Starting Threads");
MemoryControl.gc(10000, "plasmaSwitchboard, help for profiler"); // help for profiler - thq
deployThread(plasmaSwitchboardConstants.CLEANUP, "Cleanup", "simple cleaning process for monitoring information", null,
new serverInstantBusyThread(this, plasmaSwitchboardConstants.CLEANUP_METHOD_START, plasmaSwitchboardConstants.CLEANUP_METHOD_JOBCOUNT, plasmaSwitchboardConstants.CLEANUP_METHOD_FREEMEM), 600000); // all 5 Minutes, wait 10 minutes until first run
- deployThread(plasmaSwitchboardConstants.INDEXER, "Indexing", "thread that either initiates a parsing/indexing queue, distributes the index into the DHT, stores parsed documents", "/IndexCreateIndexingQueue_p.html",
- new serverInstantBusyThread(this, plasmaSwitchboardConstants.INDEXER_METHOD_START, plasmaSwitchboardConstants.INDEXER_METHOD_JOBCOUNT, plasmaSwitchboardConstants.INDEXER_METHOD_FREEMEM), 10000);
+ deployThread(plasmaSwitchboardConstants.SURROGATES, "Surrogates", "A thread that polls the SURROGATES path and puts all Documents in one surroagte file into the indexing queue.", null,
+ new serverInstantBusyThread(this, plasmaSwitchboardConstants.SURROGATES_METHOD_START, plasmaSwitchboardConstants.SURROGATES_METHOD_JOBCOUNT, plasmaSwitchboardConstants.SURROGATES_METHOD_FREEMEM), 10000);
deployThread(plasmaSwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL, "Remote Crawl Job", "thread that performes a single crawl/indexing step triggered by a remote peer", null,
new serverInstantBusyThread(crawlQueues, plasmaSwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL_METHOD_START, plasmaSwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL_METHOD_JOBCOUNT, plasmaSwitchboardConstants.CRAWLJOB_REMOTE_TRIGGERED_CRAWL_METHOD_FREEMEM), 30000);
deployThread(plasmaSwitchboardConstants.CRAWLJOB_REMOTE_CRAWL_LOADER, "Remote Crawl URL Loader", "thread that loads remote crawl lists from other peers", "",
@@ -1088,7 +1086,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
* shutdown procedure
*/
public boolean cleanProfiles() throws InterruptedException {
- if ((crawlQueues.size() > 0) ||
+ if ((getActiveQueueSize() > 0) || (crawlQueues.size() > 0) ||
(crawlStacker != null && crawlStacker.size() > 0) ||
(crawlQueues.noticeURL.notEmpty()))
return false;
@@ -1130,7 +1128,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
doIndexing = false;
}
- synchronized (crawler.indexingStack) {
/* =========================================================================
* STORING DATA
*
@@ -1166,16 +1163,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
if (doIndexing && supportError == null) {
// enqueue for further crawling
- enQueue(this.crawler.indexingStack.newEntry(
- entry.url(),
- (entry.referrerURL() == null) ? null : entry.referrerURL().hash(),
- entry.ifModifiedSince(),
- entry.requestWithCookie(),
- entry.initiator(),
- entry.depth(),
- entry.profile().handle(),
- entry.name()
- ));
+ enQueue(entry);
} else {
if (!entry.profile().storeHTCache()) {
try {
@@ -1185,7 +1173,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
}
}
}
- }
return true;
}
@@ -1229,54 +1216,44 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
log.logConfig("SWITCHBOARD SHUTDOWN TERMINATED");
}
- public int queueSize() {
- return crawler.indexingStack.size();
- }
-
- public void enQueue(final IndexingStack.QueueEntry job) {
- assert job != null;
- try {
- crawler.indexingStack.push(job);
- } catch (final IOException e) {
- log.logSevere("IOError in plasmaSwitchboard.enQueue: " + e.getMessage(), e);
+ public void enQueue(final Response queueEntry) {
+ assert queueEntry != null;
+
+ // get next queue entry and start a queue processing
+ if (queueEntry == null) {
+ if (this.log.isFine()) log.logFine("deQueue: queue entry is null");
+ return;
}
- }
-
- public void deQueueFreeMem() {
- // empty some caches
- indexSegment.urlMetadata().clearCache();
- QueryEvent.cleanupEvents(true);
- }
-
- public IndexingStack.QueueEntry deQueue() {
- // getting the next entry from the indexing queue
- IndexingStack.QueueEntry nextentry = null;
- synchronized (crawler.indexingStack) {
- // do one processing step
- if (this.log.isFine()) log.logFine("DEQUEUE: sbQueueSize=" + crawler.indexingStack.size() +
- ", coreStackSize=" + crawlQueues.noticeURL.stackSize(NoticedURL.STACK_TYPE_CORE) +
- ", limitStackSize=" + crawlQueues.noticeURL.stackSize(NoticedURL.STACK_TYPE_LIMIT) +
- ", overhangStackSize=" + crawlQueues.noticeURL.stackSize(NoticedURL.STACK_TYPE_OVERHANG) +
- ", remoteStackSize=" + crawlQueues.noticeURL.stackSize(NoticedURL.STACK_TYPE_REMOTE));
- try {
- final int sizeBefore = crawler.indexingStack.size();
- if (sizeBefore == 0) return null;
- nextentry = crawler.indexingStack.pop();
- if (nextentry == null) {
- log.logWarning("deQueue: null entry on queue stack.");
- if (crawler.indexingStack.size() == sizeBefore) {
- // this is a severe problem: because this time a null is returned, it means that this status will last forever
- // to re-enable use of the sbQueue, it must be emptied completely
- log.logSevere("deQueue: does not shrink after pop() == null. Emergency reset of sbQueue");
- crawler.indexingStack.clear();
- }
- return null;
- }
- } catch (final IOException e) {
- log.logSevere("IOError in plasmaSwitchboard.deQueue: " + e.getMessage(), e);
- return null;
- }
- return nextentry;
+ if (queueEntry.profile() == null) {
+ if (this.log.isFine()) log.logFine("deQueue: profile is null");
+ return;
+ }
+
+ // check if the document should be indexed
+ String noIndexReason = "unspecified indexing error";
+ if (queueEntry.processCase(peers.mySeed().hash) == plasmaSwitchboardConstants.PROCESSCASE_4_PROXY_LOAD) {
+ // proxy-load
+ noIndexReason = queueEntry.shallIndexCacheForProxy();
+ } else {
+ // normal crawling
+ noIndexReason = queueEntry.shallIndexCacheForCrawler();
+ }
+
+ if (noIndexReason != null) {
+ // this document should not be indexed. log cause and close queue
+ final yacyURL referrerURL = queueEntry.referrerURL();
+ if (log.isFine()) log.logFine("deQueue: not indexed any word in URL " + queueEntry.url() + "; cause: " + noIndexReason);
+ addURLtoErrorDB(queueEntry.url(), (referrerURL == null) ? "" : referrerURL.hash(), queueEntry.initiator(), queueEntry.name(), noIndexReason);
+ // finish this entry
+ return;
+ }
+
+ // put document into the concurrent processing queue
+ if (log.isFinest()) log.logFinest("deQueue: passing entry to indexing queue");
+ try {
+ this.indexingDocumentProcessor.enQueue(new indexingQueueEntry(queueEntry, null, null));
+ } catch (InterruptedException e) {
+ e.printStackTrace();
}
}
@@ -1291,7 +1268,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
Thread readerThread = new Thread(reader, "Surrogate-Reader " + surrogateFile.getAbsolutePath());
readerThread.start();
DCEntry surrogate;
- QueueEntry queueentry;
+ Response queueentry;
while ((surrogate = reader.take()) != DCEntry.poison) {
// check if url is in accepted domain
final String urlRejectReason = crawlStacker.urlInAcceptedDomain(surrogate.url());
@@ -1302,11 +1279,19 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
// create a queue entry
Document document = surrogate.document();
- queueentry = this.crawler.indexingStack.newEntry(surrogate.url(), null, null, false, null, 0, this.crawler.defaultSurrogateProfile.handle(), null);
- /*
- * public QueueEntry newEntry(final yacyURL url, final String referrer, final Date ifModifiedSince, final boolean requestWithCookie,
- final String initiator, final int depth, final String profilehandle, final String anchorName)
- */
+ Request request = new Request(
+ peers.mySeed().hash,
+ surrogate.url(),
+ null,
+ "",
+ new Date(),
+ new Date(),
+ this.crawler.defaultSurrogateProfile.handle(),
+ 0,
+ 0,
+ 0
+ );
+ queueentry = new Response(request, null, null, "200", this.crawler.defaultSurrogateProfile);
indexingQueueEntry queueEntry = new indexingQueueEntry(queueentry, document, null);
// place the queue entry into the concurrent process of the condenser (document analysis)
@@ -1324,92 +1309,62 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
}
return moved;
}
+
+ public int surrogateQueueSize() {
+ // count surrogates
+ String[] surrogatelist = this.surrogatesInPath.list();
+ if (surrogatelist.length > 100) return 100;
+ int count = 0;
+ for (String s: surrogatelist) {
+ if (s.endsWith(".xml")) count++;
+ if (count >= 100) break;
+ }
+ return count;
+ }
- public boolean deQueueProcess() {
+ public void surrogateFreeMem() {
+ // do nothing
+ }
+
+ public boolean surrogateProcess() {
+ // work off fresh entries from the proxy or from the crawler
+ String cautionCause = onlineCaution();
+ if (cautionCause != null) {
+ if (this.log.isFine())
+ log.logFine("deQueue: online caution for " + cautionCause
+ + ", omitting resource stack processing");
+ return false;
+ }
+
try {
- // work off fresh entries from the proxy or from the crawler
- String cautionCause = onlineCaution();
- if (cautionCause != null) {
- if (this.log.isFine()) log.logFine("deQueue: online caution for " + cautionCause + ", omitting resource stack processing");
- return false;
- }
-
- // check for interruption
- checkInterruption();
-
// check surrogates
String[] surrogatelist = this.surrogatesInPath.list();
if (surrogatelist.length > 0) {
// look if the is any xml inside
- for (int i = 0; i < surrogatelist.length; i++) {
- if (surrogatelist[i].endsWith(".xml")) {
+ for (String surrogate: surrogatelist) {
+
+ // check for interruption
+ checkInterruption();
+
+ if (surrogate.endsWith(".xml")) {
// read the surrogate file and store entry in index
- if (processSurrogate(surrogatelist[i])) return true;
+ if (processSurrogate(surrogate)) return true;
}
}
}
- // getting the next entry from the indexing queue
- if (crawler.indexingStack.size() == 0) {
- if (log.isFinest()) log.logFinest("deQueue: nothing to do, queue is emtpy");
- return false; // nothing to do
- }
-
- // if we were interrupted we should return now
- if (Thread.currentThread().isInterrupted()) {
- if (this.log.isFine()) log.logFine("deQueue: thread was interrupted");
- return false;
- }
-
- // get next queue entry and start a queue processing
- final IndexingStack.QueueEntry queueEntry = deQueue();
- if (queueEntry == null) {
- if (this.log.isFine()) log.logFine("deQueue: queue entry is null");
- return false;
- }
- if (queueEntry.profile() == null) {
- if (this.log.isFine()) log.logFine("deQueue: profile is null");
- return false;
- }
-
- // check if the document should be indexed
- String noIndexReason = "unspecified indexing error";
- if (queueEntry.processCase() == plasmaSwitchboardConstants.PROCESSCASE_4_PROXY_LOAD) {
- // proxy-load
- noIndexReason = queueEntry.shallIndexCacheForProxy();
- } else {
- // normal crawling
- noIndexReason = queueEntry.shallIndexCacheForCrawler();
- }
-
- if (noIndexReason != null) {
- // this document should not be indexed. log cause and close queue
- final yacyURL referrerURL = queueEntry.referrerURL(this.indexSegment.urlMetadata());
- if (log.isFine()) log.logFine("deQueue: not indexed any word in URL " + queueEntry.url() + "; cause: " + noIndexReason);
- addURLtoErrorDB(queueEntry.url(), (referrerURL == null) ? "" : referrerURL.hash(), queueEntry.initiator(), queueEntry.anchorName(), noIndexReason);
- // finish this entry
- return true;
- }
-
- // check for interruption
- checkInterruption();
-
- // put document into the concurrent processing queue
- if (log.isFinest()) log.logFinest("deQueue: passing entry to indexing queue");
- this.indexingDocumentProcessor.enQueue(new indexingQueueEntry(queueEntry, null, null));
- return true;
- } catch (final InterruptedException e) {
- log.logInfo("DEQUEUE: Shutdown detected.");
+ } catch (InterruptedException e) {
return false;
}
+ return false;
}
public static class indexingQueueEntry extends serverProcessorJob {
- public IndexingStack.QueueEntry queueEntry;
+ public Response queueEntry;
public Document document;
public Condenser condenser;
public indexingQueueEntry(
- final IndexingStack.QueueEntry queueEntry,
+ final Response queueEntry,
final Document document,
final Condenser condenser) {
super();
@@ -1658,7 +1613,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
}
public indexingQueueEntry parseDocument(final indexingQueueEntry in) {
- in.queueEntry.updateStatus(IndexingStack.QUEUE_STATE_PARSING);
+ in.queueEntry.updateStatus(Response.QUEUE_STATE_PARSING);
// debug
if (log.isFinest()) log.logFinest("PARSE "+ in.queueEntry.toString());
@@ -1677,9 +1632,9 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
return new indexingQueueEntry(in.queueEntry, document, null);
}
- private Document parseDocument(final IndexingStack.QueueEntry entry) throws InterruptedException {
+ private Document parseDocument(Response entry) throws InterruptedException {
Document document = null;
- final int processCase = entry.processCase();
+ final int processCase = entry.processCase(peers.mySeed().hash);
if (this.log.isFine()) log.logFine("processResourceStack processCase=" + processCase +
", depth=" + entry.depth() +
@@ -1699,7 +1654,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
assert(document != null) : "Unexpected error. Parser returned null.";
} catch (final ParserException e) {
this.log.logWarning("Unable to parse the resource '" + entry.url() + "'. " + e.getMessage());
- addURLtoErrorDB(entry.url(), entry.referrerHash(), entry.initiator(), entry.anchorName(), e.getMessage());
+ addURLtoErrorDB(entry.url(), entry.referrerHash(), entry.initiator(), entry.name(), e.getMessage());
if (document != null) {
document.close();
document = null;
@@ -1710,7 +1665,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
final long parsingEndTime = System.currentTimeMillis();
// get the document date
- final Date docDate = entry.getModificationDate();
+ final Date docDate = entry.lastModified();
// put anchors on crawl stack
final long stackStartTime = System.currentTimeMillis();
@@ -1755,7 +1710,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
}
public indexingQueueEntry condenseDocument(final indexingQueueEntry in) {
- in.queueEntry.updateStatus(IndexingStack.QUEUE_STATE_CONDENSING);
+ in.queueEntry.updateStatus(Response.QUEUE_STATE_CONDENSING);
// debug
if (log.isFinest()) log.logFinest("CONDENSE "+ in.queueEntry.toString());
@@ -1778,23 +1733,23 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
}
public indexingQueueEntry webStructureAnalysis(final indexingQueueEntry in) {
- in.queueEntry.updateStatus(IndexingStack.QUEUE_STATE_STRUCTUREANALYSIS);
- in.document.notifyWebStructure(webStructure, in.condenser, in.queueEntry.getModificationDate());
+ in.queueEntry.updateStatus(Response.QUEUE_STATE_STRUCTUREANALYSIS);
+ in.document.notifyWebStructure(webStructure, in.condenser, in.queueEntry.lastModified());
return in;
}
public void storeDocumentIndex(final indexingQueueEntry in) {
- in.queueEntry.updateStatus(IndexingStack.QUEUE_STATE_INDEXSTORAGE);
+ in.queueEntry.updateStatus(Response.QUEUE_STATE_INDEXSTORAGE);
storeDocumentIndex(in.queueEntry, in.document, in.condenser);
- in.queueEntry.updateStatus(IndexingStack.QUEUE_STATE_FINISHED);
+ in.queueEntry.updateStatus(Response.QUEUE_STATE_FINISHED);
}
- private void storeDocumentIndex(final IndexingStack.QueueEntry queueEntry, final Document document, final Condenser condenser) {
+ private void storeDocumentIndex(final Response queueEntry, final Document document, final Condenser condenser) {
// CREATE INDEX
final String dc_title = document.dc_title();
- final yacyURL referrerURL = queueEntry.referrerURL(this.indexSegment.urlMetadata());
- final int processCase = queueEntry.processCase();
+ final yacyURL referrerURL = queueEntry.referrerURL();
+ final int processCase = queueEntry.processCase(peers.mySeed().hash);
// remove stopwords
log.logInfo("Excluded " + condenser.excludeWords(stopwords) + " words in URL " + queueEntry.url());
@@ -1805,7 +1760,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
newEntry = indexSegment.storeDocument(
queueEntry.url(),
referrerURL,
- queueEntry.getModificationDate(),
+ queueEntry.lastModified(),
queueEntry.size(),
document,
condenser);
@@ -1844,12 +1799,14 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
serverProfiling.update("indexed", queueEntry.url().toNormalform(true, false), false);
// if this was performed for a remote crawl request, notify requester
- final yacySeed initiatorPeer = queueEntry.initiatorPeer();
- if ((processCase == plasmaSwitchboardConstants.PROCESSCASE_6_GLOBAL_CRAWLING) && (initiatorPeer != null)) {
- log.logInfo("Sending crawl receipt for '" + queueEntry.url().toNormalform(false, true) + "' to " + initiatorPeer.getName());
- if (clusterhashes != null) initiatorPeer.setAlternativeAddress(clusterhashes.get(initiatorPeer.hash.getBytes()));
- // start a thread for receipt sending to avoid a blocking here
- new Thread(new receiptSending(initiatorPeer, newEntry), "sending receipt to " + initiatorPeer.hash).start();
+ if ((processCase == plasmaSwitchboardConstants.PROCESSCASE_6_GLOBAL_CRAWLING) && (queueEntry.initiator() != null)) {
+ final yacySeed initiatorPeer = peers.get(queueEntry.initiator());
+ if (initiatorPeer != null) {
+ log.logInfo("Sending crawl receipt for '" + queueEntry.url().toNormalform(false, true) + "' to " + initiatorPeer.getName());
+ if (clusterhashes != null) initiatorPeer.setAlternativeAddress(clusterhashes.get(queueEntry.initiator().getBytes()));
+ // start a thread for receipt sending to avoid a blocking here
+ new Thread(new receiptSending(initiatorPeer, newEntry), "sending receipt to " + queueEntry.initiator()).start();
+ }
}
}
@@ -1890,12 +1847,6 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
return null;
}
- public String toString() {
- // it is possible to use this method in the cgi pages.
- // actually it is used there for testing purpose
- return "PROPS: " + super.toString() + "; QUEUE: " + crawler.indexingStack.toString();
- }
-
// method for index deletion
public int removeAllUrlReferences(final yacyURL url, final boolean fetchOnline) {
return removeAllUrlReferences(url.hash(), fetchOnline);
@@ -2022,14 +1973,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
if (thread != null) {
setConfig(plasmaSwitchboardConstants.CRAWLJOB_LOCAL_CRAWL_BUSYSLEEP , thread.setBusySleep(newBusySleep));
thread.setIdleSleep(2000);
- }
-
- thread = getThread(plasmaSwitchboardConstants.INDEXER);
- if (thread != null) {
- setConfig(plasmaSwitchboardConstants.INDEXER_BUSYSLEEP , thread.setBusySleep(newBusySleep / 8));
- thread.setIdleSleep(2000);
- }
-
+ }
}
public static int accessFrequency(final HashMap<String, TreeSet<Long>> tracker, final String host) {
@@ -2070,10 +2014,10 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
return "no DHT distribution: not enough words - wordIndex.size() = " + indexSegment.termIndex().sizesMax();
}
if ((getConfig(plasmaSwitchboardConstants.INDEX_DIST_ALLOW_WHILE_CRAWLING, "false").equalsIgnoreCase("false")) && (crawlQueues.noticeURL.notEmptyLocal())) {
- return "no DHT distribution: crawl in progress: noticeURL.stackSize() = " + crawlQueues.noticeURL.size() + ", sbQueue.size() = " + crawler.indexingStack.size();
+ return "no DHT distribution: crawl in progress: noticeURL.stackSize() = " + crawlQueues.noticeURL.size() + ", sbQueue.size() = " + getActiveQueueSize();
}
- if ((getConfig(plasmaSwitchboardConstants.INDEX_DIST_ALLOW_WHILE_INDEXING, "false").equalsIgnoreCase("false")) && (crawler.indexingStack.size() > 1)) {
- return "no DHT distribution: indexing in progress: noticeURL.stackSize() = " + crawlQueues.noticeURL.size() + ", sbQueue.size() = " + crawler.indexingStack.size();
+ if ((getConfig(plasmaSwitchboardConstants.INDEX_DIST_ALLOW_WHILE_INDEXING, "false").equalsIgnoreCase("false")) && (getActiveQueueSize() > 1)) {
+ return "no DHT distribution: indexing in progress: noticeURL.stackSize() = " + crawlQueues.noticeURL.size() + ", sbQueue.size() = " + getActiveQueueSize();
}
return null; // this means; yes, please do dht transfer
}
diff --git a/source/de/anomic/plasma/plasmaSwitchboardConstants.java b/source/de/anomic/plasma/plasmaSwitchboardConstants.java
index e9c76c87e..a42618c63 100644
--- a/source/de/anomic/plasma/plasmaSwitchboardConstants.java
+++ b/source/de/anomic/plasma/plasmaSwitchboardConstants.java
@@ -112,17 +112,16 @@ public final class plasmaSwitchboardConstants {
public static final String CRAWLJOB_REMOTE_TRIGGERED_CRAWL_BUSYSLEEP = "62_remotetriggeredcrawl_busysleep";
// 80_indexing
/**
- * <p><code>public static final String <strong>INDEXER</strong> = "80_indexing"</code></p>
- * <p>Name of the indexer thread, performing the actual indexing of a website</p>
- */
- public static final String INDEXER = "80_indexing";
- public static final String INDEXER_MEMPREREQ = "80_indexing_memprereq";
- public static final String INDEXER_IDLESLEEP = "80_indexing_idlesleep";
- public static final String INDEXER_BUSYSLEEP = "80_indexing_busysleep";
- public static final String INDEXER_METHOD_START = "deQueueProcess";
- public static final String INDEXER_METHOD_JOBCOUNT = "queueSize";
- public static final String INDEXER_METHOD_FREEMEM = "deQueueFreeMem";
- public static final String INDEXER_SLOTS = "indexer.slots";
+ * <p><code>public static final String <strong>SURROGATES</strong> = "70_surrogates"</code></p>
+ * <p>A thread that polls the SURROGATES path and puts all Documents in one surroagte file into the indexing queue.</p>
+ */
+ public static final String SURROGATES = "70_surrogates";
+ public static final String SURROGATES_MEMPREREQ = "70_surrogates_memprereq";
+ public static final String SURROGATES_IDLESLEEP = "70_surrogates_idlesleep";
+ public static final String SURROGATES_BUSYSLEEP = "70_surrogates_busysleep";
+ public static final String SURROGATES_METHOD_START = "surrogateProcess";
+ public static final String SURROGATES_METHOD_JOBCOUNT = "surrogateQueueSize";
+ public static final String SURROGATES_METHOD_FREEMEM = "surrogateFreeMem";
// 90_cleanup
/**
* <p><code>public static final String <strong>CLEANUP</strong> = "90_cleanup"</code></p>
diff --git a/source/de/anomic/server/serverAbstractSwitch.java b/source/de/anomic/server/serverAbstractSwitch.java
index 257a8ab11..dbd52ab3d 100644
--- a/source/de/anomic/server/serverAbstractSwitch.java
+++ b/source/de/anomic/server/serverAbstractSwitch.java
@@ -29,12 +29,11 @@ import java.util.Iterator;
import java.util.Map;
import java.util.SortedMap;
import java.util.TreeMap;
-import java.util.concurrent.LinkedBlockingQueue;
import de.anomic.kelondro.util.FileUtils;
import de.anomic.yacy.logging.Log;
-public abstract class serverAbstractSwitch<E> implements serverSwitch<E> {
+public abstract class serverAbstractSwitch implements serverSwitch {
// configuration management
private final File configFile;
@@ -48,7 +47,6 @@ public abstract class serverAbstractSwitch<E> implements serverSwitch<E> {
private final HashMap<InetAddress, String> authorization;
private final TreeMap<String, serverBusyThread> workerThreads;
private final TreeMap<String, serverSwitchAction> switchActions;
- private final LinkedBlockingQueue<E> cacheStack;
private final serverAccessTracker accessTracker;
public serverAbstractSwitch(final File rootPath, final String initPath, final String configPath, final boolean applyPro) {
@@ -58,7 +56,6 @@ public abstract class serverAbstractSwitch<E> implements serverSwitch<E> {
// be deleted, but not the init file
// the only attribute that will always be read from the init is the
// file name of the config file
- this.cacheStack = new LinkedBlockingQueue<E>();
this.rootPath = rootPath;
this.configComment = "This is an automatically generated file, updated by serverAbstractSwitch and initialized by " + initPath;
final File initFile = new File(rootPath, initPath);
@@ -415,22 +412,6 @@ public abstract class serverAbstractSwitch<E> implements serverSwitch<E> {
public Iterator<String> /*of serverThread-Names (String)*/ threadNames() {
return workerThreads.keySet().iterator();
}
-
- public int queueSize() {
- return cacheStack.size();
- }
-
- public E queuePeek() {
- return cacheStack.peek();
- }
-
- public void enQueue(final E job) {
- cacheStack.add(job);
- }
-
- public E deQueue() throws InterruptedException {
- return cacheStack.take();
- }
// authentification routines:
diff --git a/source/de/anomic/server/serverCore.java b/source/de/anomic/server/serverCore.java
index 5f2c5bc09..ed06214b3 100644
--- a/source/de/anomic/server/serverCore.java
+++ b/source/de/anomic/server/serverCore.java
@@ -128,7 +128,7 @@ public final class serverCore extends serverAbstractBusyThread implements server
private final int timeout; // connection time-out of the socket
serverHandler handlerPrototype; // the command class (a serverHandler)
- private final serverSwitch<?> switchboard; // the command class switchboard
+ private final serverSwitch switchboard; // the command class switchboard
HashMap<String, String> denyHost;
int commandMaxLength;
private int maxBusySessions;
@@ -183,7 +183,7 @@ public final class serverCore extends serverAbstractBusyThread implements server
final int timeout,
final boolean blockAttack,
final serverHandler handlerPrototype,
- final serverSwitch<?> switchboard,
+ final serverSwitch switchboard,
final int commandMaxLength
) {
this.timeout = timeout;
diff --git a/source/de/anomic/server/serverPlainSwitch.java b/source/de/anomic/server/serverPlainSwitch.java
index b57eef285..0ad22ad22 100644
--- a/source/de/anomic/server/serverPlainSwitch.java
+++ b/source/de/anomic/server/serverPlainSwitch.java
@@ -28,7 +28,7 @@ package de.anomic.server;
import java.io.File;
-public class serverPlainSwitch<E> extends serverAbstractSwitch<E> implements serverSwitch<E> {
+public class serverPlainSwitch extends serverAbstractSwitch implements serverSwitch {
public serverPlainSwitch(final File rootPath, final String initPath, final String configPath, final boolean applyPro) {
super(rootPath, initPath, configPath, applyPro);
diff --git a/source/de/anomic/server/serverSwitch.java b/source/de/anomic/server/serverSwitch.java
index 57fb67189..288cef3bc 100644
--- a/source/de/anomic/server/serverSwitch.java
+++ b/source/de/anomic/server/serverSwitch.java
@@ -38,7 +38,7 @@ import java.util.SortedMap;
import de.anomic.yacy.logging.Log;
-public interface serverSwitch<E> {
+public interface serverSwitch {
// the root path for the application
public File getRootPath();
@@ -88,16 +88,7 @@ public interface serverSwitch<E> {
public void removeConfig(String key);
public Iterator<String> configKeys();
public Map<String, String> getRemoved();
-
- // the switchboard also shall maintain a job list
- // jobs can be queued by submitting a job object
- // to work off a queue job, use deQueue, which is meant to
- // work off exactly only one job, not all
- public int queueSize();
- public E queuePeek(); // looks for next element in the queue, returns but not deletes it if there is one; returns null othervise
- public void enQueue(E job);
- public E deQueue() throws InterruptedException; // returns a FIFO entry from the stack, blocks until one element is available
-
+
// authentification routines: sets and reads access attributes according to host addresses
public void setAuthentify(InetAddress host, String user, String rigth);
public void removeAuthentify(InetAddress host);
diff --git a/source/de/anomic/yacy/seedUpload/yacySeedUploadFile.java b/source/de/anomic/yacy/seedUpload/yacySeedUploadFile.java
index c625c32f9..404329fb7 100644
--- a/source/de/anomic/yacy/seedUpload/yacySeedUploadFile.java
+++ b/source/de/anomic/yacy/seedUpload/yacySeedUploadFile.java
@@ -36,7 +36,7 @@ public class yacySeedUploadFile implements yacySeedUploader {
public static final String CONFIG_FILE_PATH = "seedFilePath";
- public String uploadSeedFile(final serverSwitch<?> sb, final yacySeedDB seedDB, final File seedFile) throws Exception {
+ public String uploadSeedFile(final serverSwitch sb, final yacySeedDB seedDB, final File seedFile) throws Exception {
String seedFilePath = "";
try {
diff --git a/source/de/anomic/yacy/seedUpload/yacySeedUploadFtp.java b/source/de/anomic/yacy/seedUpload/yacySeedUploadFtp.java
index ddf15b206..d8fe807e9 100644
--- a/source/de/anomic/yacy/seedUpload/yacySeedUploadFtp.java
+++ b/source/de/anomic/yacy/seedUpload/yacySeedUploadFtp.java
@@ -39,7 +39,7 @@ public class yacySeedUploadFtp implements yacySeedUploader {
public static final String CONFIG_FTP_PASSWORD = "seedFTPPassword";
public static final String CONFIG_FTP_PATH = "seedFTPPath";
- public String uploadSeedFile (final serverSwitch<?> sb, final yacySeedDB seedDB, final File seedFile) throws Exception {
+ public String uploadSeedFile (final serverSwitch sb, final yacySeedDB seedDB, final File seedFile) throws Exception {
try {
if (sb == null) throw new NullPointerException("Reference to serverSwitch must not be null.");
if (seedDB == null) throw new NullPointerException("Reference to seedDB must not be null.");
diff --git a/source/de/anomic/yacy/seedUpload/yacySeedUploadScp.java b/source/de/anomic/yacy/seedUpload/yacySeedUploadScp.java
index d1f9f7be1..5c7cc1dac 100644
--- a/source/de/anomic/yacy/seedUpload/yacySeedUploadScp.java
+++ b/source/de/anomic/yacy/seedUpload/yacySeedUploadScp.java
@@ -51,7 +51,7 @@ public class yacySeedUploadScp implements yacySeedUploader {
public static final String CONFIG_SCP_PASSWORD = "seedScpPassword";
public static final String CONFIG_SCP_PATH = "seedScpPath";
- public String uploadSeedFile(final serverSwitch<?> sb, final yacySeedDB seedDB, final File seedFile) throws Exception {
+ public String uploadSeedFile(final serverSwitch sb, final yacySeedDB seedDB, final File seedFile) throws Exception {
try {
if (sb == null) throw new NullPointerException("Reference to serverSwitch nut not be null.");
if (seedDB == null) throw new NullPointerException("Reference to seedDB must not be null.");
diff --git a/source/de/anomic/yacy/yacyNetwork.java b/source/de/anomic/yacy/yacyNetwork.java
index cc5e6b941..9f1fb560e 100644
--- a/source/de/anomic/yacy/yacyNetwork.java
+++ b/source/de/anomic/yacy/yacyNetwork.java
@@ -43,7 +43,7 @@ import de.anomic.server.serverSwitch;
public class yacyNetwork {
- public static final boolean authentifyRequest(final serverObjects post, final serverSwitch<?> env) {
+ public static final boolean authentifyRequest(final serverObjects post, final serverSwitch env) {
if ((post == null) || (env == null)) return false;
// identify network
diff --git a/source/de/anomic/yacy/yacySeedDB.java b/source/de/anomic/yacy/yacySeedDB.java
index 86be28aef..1510bca2e 100644
--- a/source/de/anomic/yacy/yacySeedDB.java
+++ b/source/de/anomic/yacy/yacySeedDB.java
@@ -749,7 +749,7 @@ public final class yacySeedDB implements httpdAlternativeDomainNames {
}
public String uploadCache(final yacySeedUploader uploader,
- final serverSwitch<?> sb,
+ final serverSwitch sb,
final yacySeedDB seedDB,
// String seedFTPServer,
// String seedFTPAccount,
diff --git a/source/de/anomic/yacy/yacySeedUploader.java b/source/de/anomic/yacy/yacySeedUploader.java
index 2fa320d96..76858bad2 100644
--- a/source/de/anomic/yacy/yacySeedUploader.java
+++ b/source/de/anomic/yacy/yacySeedUploader.java
@@ -29,7 +29,7 @@ import java.io.File;
import de.anomic.server.serverSwitch;
public interface yacySeedUploader {
- public String uploadSeedFile(serverSwitch<?> sb, yacySeedDB seedDB, File seedFile) throws Exception;
+ public String uploadSeedFile(serverSwitch sb, yacySeedDB seedDB, File seedFile) throws Exception;
public String[] getConfigurationOptions();
public String[] getLibxDependencies();
}