collection of small bugfixes

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@3600 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
orbiter 2007-04-26 14:28:57 +00:00
parent 64a6d6e5e6
commit e192f616a2
5 changed files with 40 additions and 40 deletions

View File

@ -333,6 +333,7 @@ public class IndexControl_p {
prop.put("urlhashsimilar", 1);
while (entryIt.hasNext() && i < 256) {
entry = (indexURLEntry) entryIt.next();
if (entry == null) break;
prop.put("urlhashsimilar_rows_"+rows+"_cols_"+cols+"_urlHash", entry.hash());
cols++;
if (cols==8) {

View File

@ -266,8 +266,7 @@ public class WatchCrawler_p {
HashMap hyperlinks = (HashMap) scraper.getAnchors();
// creating a crawler profile
/* file.toURL() marked as deprecated per Sun JRE 6 */
plasmaCrawlProfile.entry profile = switchboard.profiles.newEntry(fileName, file.toURL().toString(), newcrawlingfilter, newcrawlingfilter, newcrawlingdepth, newcrawlingdepth, crawlingIfOlder, crawlingDomFilterDepth, crawlingDomMaxPages, crawlingQ, indexText, indexMedia, storeHTCache, true, crawlOrder, xsstopw, xdstopw, xpstopw);
plasmaCrawlProfile.entry profile = switchboard.profiles.newEntry(fileName, "file://" + file.toString(), newcrawlingfilter, newcrawlingfilter, newcrawlingdepth, newcrawlingdepth, crawlingIfOlder, crawlingDomFilterDepth, crawlingDomMaxPages, crawlingQ, indexText, indexMedia, storeHTCache, true, crawlOrder, xsstopw, xdstopw, xpstopw);
// loop through the contained links
Iterator interator = hyperlinks.entrySet().iterator();

View File

@ -127,6 +127,7 @@ public class yacysearch {
prop.put("input_display", display);
prop.putASIS("input_promoteSearchPageGreeting", promoteSearchPageGreeting);
prop.put("input_former", "");
prop.put("former", "");
prop.put("input_count", 10);
prop.put("input_resource", "global");
prop.put("input_time", 6);
@ -502,6 +503,7 @@ public class yacysearch {
prop.put("input_display", display);
prop.putASIS("input_promoteSearchPageGreeting", promoteSearchPageGreeting);
prop.put("input_former", post.get("search", ""));
prop.put("former", post.get("search", ""));
prop.put("input_count", count);
prop.put("input_resource", (global) ? "global" : "local");
prop.put("input_time", searchtime / 1000);

View File

@ -362,7 +362,8 @@ public final class plasmaCrawlLURL {
}
public final boolean hasNext() {
if (this.error) { return false; }
if (this.error) return false;
if (this.iter == null) return false;
return this.iter.hasNext();
}

View File

@ -1355,17 +1355,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
return network.indexOf(peer) >= 0;
} else if (clustermode.equals("publiccluster")) {
// check if we got the request from a peer in the public cluster
String network = getConfig("cluster.peers.yacydomain", "");
// check for .yacyh hexhash-domain
String hexhash = yacySeed.b64Hash2hexHash(peer);
if (hexhash == null) return false;
if (network.indexOf(hexhash + ".yacyh") >= 0) return true;
// resolve seed
yacySeed seed = yacyCore.seedDB.get(peer);
if (seed == null) return false;
// check for .yacy (name) - Domain
if (network.indexOf(seed.getName() + ".yacy") >= 0) return true;
return false;
return this.clusterhashes.contains(peer);
} else {
return false;
}
@ -1382,15 +1372,8 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
String network = getConfig("cluster.peers.ipport", "");
return network.indexOf(seed.getAddress()) >= 0;
} else if (clustermode.equals("publiccluster")) {
// check if we got the request from a peer in the public cluster
String network = getConfig("cluster.peers.yacydomain", "");
// check for .yacyh hexhash-domain
String hexhash = yacySeed.b64Hash2hexHash(seed.hash);
if (hexhash == null) return false;
if (network.indexOf(hexhash + ".yacyh") >= 0) return true;
// check for .yacy (name) - Domain
if (network.indexOf(seed.getName() + ".yacy") >= 0) return true;
return false;
// check if we got the request from a peer in the public cluster
return this.clusterhashes.contains(seed.hash);
} else {
return false;
}
@ -3049,32 +3032,46 @@ public final class plasmaSwitchboard extends serverAbstractSwitch implements ser
serverThread thread;
thread = getThread(INDEX_DIST);
setConfig(INDEX_DIST_BUSYSLEEP , thread.setBusySleep(Math.max(2000, thread.setBusySleep(newBusySleep * 2))));
thread.setIdleSleep(30000);
if (thread != null) {
setConfig(INDEX_DIST_BUSYSLEEP , thread.setBusySleep(Math.max(2000, thread.setBusySleep(newBusySleep * 2))));
thread.setIdleSleep(30000);
}
thread = getThread(CRAWLJOB_LOCAL_CRAWL);
setConfig(CRAWLJOB_LOCAL_CRAWL_BUSYSLEEP , thread.setBusySleep(newBusySleep));
thread.setIdleSleep(1000);
if (thread != null) {
setConfig(CRAWLJOB_LOCAL_CRAWL_BUSYSLEEP , thread.setBusySleep(newBusySleep));
thread.setIdleSleep(1000);
}
thread = getThread(CRAWLJOB_GLOBAL_CRAWL_TRIGGER);
setConfig(CRAWLJOB_GLOBAL_CRAWL_TRIGGER_BUSYSLEEP , thread.setBusySleep(Math.max(1000, newBusySleep * 3)));
thread.setIdleSleep(10000);
//thread = getThread(CRAWLJOB_REMOTE_TRIGGERED_CRAWL);
//setConfig(CRAWLJOB_REMOTE_TRIGGERED_CRAWL_BUSYSLEEP , thread.setBusySleep(newBusySleep * 10));
//thread.setIdleSleep(10000);
if (thread != null) {
setConfig(CRAWLJOB_GLOBAL_CRAWL_TRIGGER_BUSYSLEEP , thread.setBusySleep(Math.max(1000, newBusySleep * 3)));
thread.setIdleSleep(10000);
}
/*
thread = getThread(CRAWLJOB_REMOTE_TRIGGERED_CRAWL);
if (thread != null) {
setConfig(CRAWLJOB_REMOTE_TRIGGERED_CRAWL_BUSYSLEEP , thread.setBusySleep(newBusySleep * 10));
thread.setIdleSleep(10000);
}
*/
thread = getThread(PROXY_CACHE_ENQUEUE);
setConfig(PROXY_CACHE_ENQUEUE_BUSYSLEEP , thread.setBusySleep(0));
thread.setIdleSleep(1000);
if (thread != null) {
setConfig(PROXY_CACHE_ENQUEUE_BUSYSLEEP , thread.setBusySleep(0));
thread.setIdleSleep(1000);
}
thread = getThread(INDEXER);
setConfig(INDEXER_BUSYSLEEP , thread.setBusySleep(newBusySleep / 2));
thread.setIdleSleep(1000);
if (thread != null) {
setConfig(INDEXER_BUSYSLEEP , thread.setBusySleep(newBusySleep / 2));
thread.setIdleSleep(1000);
}
thread = getThread(CRAWLSTACK);
setConfig(CRAWLSTACK_BUSYSLEEP , thread.setBusySleep(0));
thread.setIdleSleep(5000);
if (thread != null) {
setConfig(CRAWLSTACK_BUSYSLEEP , thread.setBusySleep(0));
thread.setIdleSleep(5000);
}
}