- new icon for OAI-PMH loading action

- added many stack trace outputs for exceptions in crawl profile handler to find the 'missing profile handle' bug
- catched one more timeout exception in httpd file loader

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@6457 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 15 years ago
parent f0b8db93f0
commit e3025ee691

@ -67,7 +67,7 @@ public class IndexImportOAIPMHList_p {
int cnt = 0;
for (OAIPMHImporter job: jobs) {
prop.put("import_table_" + cnt + "_dark", (dark) ? "1" : "0");
prop.put("import_table_" + cnt + "_thread", (job.isAlive()) ? "<img src=\"/env/grafics/crawl.gif\" alt=\"running\" />" : "finished");
prop.put("import_table_" + cnt + "_thread", (job.isAlive()) ? "<img src=\"/env/grafics/loading.gif\" alt=\"running\" />" : "finished");
prop.put("import_table_" + cnt + "_source", job.source());
prop.put("import_table_" + cnt + "_chunkCount", job.chunkCount());
prop.put("import_table_" + cnt + "_recordsCount", job.count());

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

@ -101,6 +101,7 @@ public class CrawlProfile {
try {
return new profileIterator(up);
} catch (final IOException e) {
e.printStackTrace();
return new HashSet<entry>().iterator();
}
}
@ -117,6 +118,7 @@ public class CrawlProfile {
try {
return handleIterator.hasNext();
} catch (final kelondroException e) {
e.printStackTrace();
clear();
return false;
}
@ -126,6 +128,7 @@ public class CrawlProfile {
lastkey = new String(handleIterator.next());
return getEntry(lastkey);
} catch (final kelondroException e) {
e.printStackTrace();
clear();
return null;
}
@ -134,6 +137,7 @@ public class CrawlProfile {
if (lastkey != null) try {
removeEntry(lastkey);
} catch (final kelondroException e) {
e.printStackTrace();
clear();
}
}
@ -141,8 +145,10 @@ public class CrawlProfile {
public void removeEntry(final String handle) {
try {
profileTable.remove(handle);
} catch (final IOException e) {}
profileTable.remove(handle);
} catch (final IOException e) {
e.printStackTrace();
}
}
public entry newEntry(final Map<String, String> mem) {
@ -218,6 +224,7 @@ public class CrawlProfile {
try {
return profileTable.has(handle);
} catch (final IOException e) {
e.printStackTrace();
return false;
}
}
@ -227,6 +234,7 @@ public class CrawlProfile {
try {
m = profileTable.get(handle);
} catch (final IOException e) {
e.printStackTrace();
return null;
}
if (m == null) return null;
@ -384,6 +392,7 @@ public class CrawlProfile {
try {
return Integer.parseInt(r);
} catch (final NumberFormatException e) {
e.printStackTrace();
return 0;
}
}
@ -393,6 +402,7 @@ public class CrawlProfile {
try {
return Integer.parseInt(r);
} catch (final NumberFormatException e) {
e.printStackTrace();
return CACHE_STRATEGY_IFFRESH;
}
}
@ -405,6 +415,7 @@ public class CrawlProfile {
final long l = Long.parseLong(r);
return (l < 0) ? 0L : l;
} catch (final NumberFormatException e) {
e.printStackTrace();
return 0L;
}
}
@ -419,6 +430,7 @@ public class CrawlProfile {
if (i < 0) return Integer.MAX_VALUE;
return i;
} catch (final NumberFormatException e) {
e.printStackTrace();
return Integer.MAX_VALUE;
}
}
@ -432,6 +444,7 @@ public class CrawlProfile {
if (i < 0) return Integer.MAX_VALUE;
return i;
} catch (final NumberFormatException e) {
e.printStackTrace();
return Integer.MAX_VALUE;
}
}
@ -529,7 +542,7 @@ public class CrawlProfile {
ey = domnamesi.next();
i++;
}
if(domnamesi.hasNext()){
if (domnamesi.hasNext()) {
ey = domnamesi.next();
dp = ey.getValue();
domname = ey.getKey() + ((attr) ? ("/r=" + dp.referrer + ", d=" + dp.depth + ", c=" + dp.count) : " ");

@ -1049,14 +1049,14 @@ public final class HTTPDFileHandler {
} else {
if ((errorMsg != null) &&
(
errorMsg.contains("Broken pipe") ||
errorMsg.contains("Broken pipe") ||
errorMsg.contains("Connection reset") ||
errorMsg.contains("Read timed out") ||
errorMsg.contains("Connection timed out") ||
errorMsg.contains("Software caused connection abort")
)) {
// client closed the connection, so we just end silently
errorMessage.append("Client unexpectedly closed connection while processing query.");
} else if ((errorMsg != null) && (errorMsg.startsWith("Connection timed out"))) {
errorMessage.append("Connection timed out.");
} else {
errorMessage.append("Unexpected error while processing query.");
httpStatusCode = 500;

@ -42,6 +42,7 @@ import java.net.NetworkInterface;
import java.net.ServerSocket;
import java.net.Socket;
import java.net.SocketException;
import java.net.SocketTimeoutException;
import java.nio.channels.ClosedByInterruptException;
import java.security.KeyStore;
import java.util.ArrayList;

Loading…
Cancel
Save