- fixed re-setting of DHT Send/Receive settings

- small change to network grafics: smaller circles / more URLs necessary for full radius; more PPM necessary for full crawling circles
- fixed exclusion search ('-' did not work any more)
- fixed NPE bug when FTP loader wrote to the error-db

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@5218 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent f7003aa75f
commit ce57de6cb3

@ -277,7 +277,7 @@ public class FTPLoader {
} else {
// if the response has not the right file type then reject file
log.logInfo("REJECTED WRONG MIME/EXT TYPE " + mimeType + " for URL " + entry.url().toString());
sb.crawlQueues.errorURL.newEntry(entry, null, new Date(), 1, ErrorURL.DENIED_WRONG_MIMETYPE_OR_EXT);
sb.crawlQueues.errorURL.newEntry(entry, this.sb.webIndex.seedDB.mySeed().hash, new Date(), 1, ErrorURL.DENIED_WRONG_MIMETYPE_OR_EXT);
throw new Exception("response has not the right file type -> rejected");
}
return htCache;

@ -253,7 +253,7 @@ public class plasmaGrafics {
//System.out.println("Seed " + seed.hash + " has distance " + seed.dhtDistance() + ", angle = " + angle);
int linelength = 20 + outerradius * (20 * (name.length() - shortestName) / (longestName - shortestName) + Math.abs(seed.hash.hashCode() % 20)) / 60;
if (linelength > outerradius) linelength = outerradius;
int dotsize = 6 + 2 * (int) (seed.getLinkCount() / 500000L);
int dotsize = 5 + (int) (seed.getLinkCount() / 1000000L);
if (dotsize > 18) dotsize = 18;
// draw dot
img.setColor(colorDot);
@ -266,16 +266,16 @@ public class plasmaGrafics {
ymageToolPrint.arcPrint(img, x, y, innerradius + linelength, angle, name);
// draw corona around dot for crawling activity
int ppm10 = seed.getPPM() / 10;
if ((corona) && (ppm10 > 0)) {
if (ppm10 > 3) ppm10 = 3;
int ppm20 = seed.getPPM() / 20;
if ((corona) && (ppm20 > 0)) {
if (ppm20 > 3) ppm20 = 3;
// draw a wave around crawling peers
long strength;
img.setColor("303030");
img.arcArc(x, y, innerradius, angle, dotsize + 1, dotsize + 1, 0, 360);
final int waveradius = innerradius / 2;
for (int r = 0; r < waveradius; r++) {
strength = (waveradius - r) * (long) (0x08 * ppm10 * (1.0 + Math.sin(Math.PI * 16 * r / waveradius))) / waveradius;
strength = (waveradius - r) * (long) (0x08 * ppm20 * (1.0 + Math.sin(Math.PI * 16 * r / waveradius))) / waveradius;
//System.out.println("r = " + r + ", Strength = " + strength);
img.setColor((strength << 16) | (strength << 8) | strength);
img.arcArc(x, y, innerradius, angle, dotsize + r, dotsize + r, 0, 360);

@ -231,7 +231,7 @@ public final class plasmaSearchQuery {
return kelondroMSetTools.anymatch(wordhashes, keyhashes);
}
private static String seps = "'.,/&-_"; static {seps += '"';}
private static String seps = "'.,/&_"; static {seps += '"';}
@SuppressWarnings("unchecked")
public static TreeSet<String>[] cleanQuery(String querystring) {

@ -162,7 +162,6 @@ import de.anomic.server.serverProcessorJob;
import de.anomic.server.serverProfiling;
import de.anomic.server.serverSemaphore;
import de.anomic.server.serverSwitch;
import de.anomic.server.serverSystem;
import de.anomic.server.serverThread;
import de.anomic.server.logging.serverLog;
import de.anomic.tools.crypt;
@ -184,7 +183,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
private int dhtTransferIndexCount = 100;
public static long lastPPMUpdate = System.currentTimeMillis()- 30000;
// couloured list management
// colored list management
public static TreeSet<String> badwords = null;
public static TreeSet<String> blueList = null;
public static TreeSet<String> stopwords = null;
@ -702,6 +701,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
acceptGlobalURLs = "global.any".indexOf(getConfig("network.unit.domain", "global")) >= 0;
acceptLocalURLs = "local.any".indexOf(getConfig("network.unit.domain", "global")) >= 0;
/*
// in intranet and portal network set robinson mode
if (networkUnitDefinition.equals("defaults/yacy.network.webportal.unit") ||
networkUnitDefinition.equals("defaults/yacy.network.intranet.unit")) {
@ -718,7 +718,7 @@ public final class plasmaSwitchboard extends serverAbstractSwitch<IndexingStack.
setConfig(plasmaSwitchboardConstants.INDEX_DIST_ALLOW, true);
setConfig(plasmaSwitchboardConstants.INDEX_RECEIVE_ALLOW, true);
}
*/
}
public void switchNetwork(final String networkDefinition) {

Loading…
Cancel
Save