of #[locurls]# URLs
-
- #(shiftloc)#::
- Shifted #[value]# URLs from Local Crawler Queue to URL Fetcher Stack::
- Shifting URLs from Local Crawler Queue to URL Fetcher Stack was unsuccessful: #[error]##(/shiftloc)#
+ #(shiftloc)#::
+ Shifted #[value]# URLs from Local Crawler Queue to URL Fetcher Stack (not bound: #[failed]#)#(/shiftloc)#
:
of #[remurls]# URLs
-
- #(shiftrem)#::
- Shifted #[value]# URLs from Remote Crawler Queue to URL Fetcher Stack::
- Shifting URLs from Remote Crawler Queue to URL Fetcher Stack was unsuccessful: #[error]##(/shiftrem)#
+ #(shiftrem)#::
+ Shifted #[value]# URLs from Remote Crawler Queue to URL Fetcher Stack (not bound: #[failed]#)#(/shiftrem)#
:
#(uploadError)#:: No file entered for upload#(/uploadError)#
-
+
#(upload)#::
Added #[added]# and rejected #[failed]# URLs from uploaded file successfully::
diff --git a/htroot/CrawlURLFetchStack_p.java b/htroot/CrawlURLFetchStack_p.java
index ed8005fce..6d9c469ff 100644
--- a/htroot/CrawlURLFetchStack_p.java
+++ b/htroot/CrawlURLFetchStack_p.java
@@ -94,26 +94,18 @@ public class CrawlURLFetchStack_p {
}
}
else if (post.containsKey("shiftlcq")) {
- int count = Math.min(post.getInt("shiftloc", 0), sb.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_CORE));
- try {
- shiftFromNotice(sb.noticeURL, plasmaCrawlNURL.STACK_TYPE_CORE, getURLFetcherStack(env), count);
- prop.put("shiftloc", 1);
- prop.put("shiftloc_value", count);
- } catch (IOException e) {
- prop.put("shiftloc", 2);
- prop.put("shiftloc_error", e.getMessage());
- }
+ final int count = Math.min(post.getInt("shiftloc", 0), sb.noticeURL.stackSize(plasmaCrawlNURL.STACK_TYPE_CORE));
+ final int failed = shiftFromNotice(sb.noticeURL, plasmaCrawlNURL.STACK_TYPE_CORE, getURLFetcherStack(env), count);
+ prop.put("shiftloc", 1);
+ prop.put("shiftloc_value", count - failed);
+ prop.put("shiftloc_failed", failed);
}
else if (post.containsKey("shiftrcq")) {
- int count = post.getInt("shiftrem", 0);
- try {
- shiftFromNotice(sb.noticeURL, plasmaCrawlNURL.STACK_TYPE_LIMIT, getURLFetcherStack(env), count);
- prop.put("shiftrem", 1);
- prop.put("shiftrem_value", count);
- } catch (IOException e) {
- prop.put("shiftrem", 2);
- prop.put("shiftrem_error", e.getMessage());
- }
+ final int count = post.getInt("shiftrem", 0);
+ final int failed = shiftFromNotice(sb.noticeURL, plasmaCrawlNURL.STACK_TYPE_LIMIT, getURLFetcherStack(env), count);
+ prop.put("shiftrem", 1);
+ prop.put("shiftrem_value", count - failed);
+ prop.put("shiftrem_failed", failed);
}
else if (post.containsKey("subupload")) {
if (post.get("upload", "").length() == 0) {
@@ -190,12 +182,14 @@ public class CrawlURLFetchStack_p {
return count;
}
- private static void shiftFromNotice(plasmaCrawlNURL nurl, int fromStackType, URLFetcherStack stack, int count) throws IOException {
+ private static int shiftFromNotice(plasmaCrawlNURL nurl, int fromStackType, URLFetcherStack stack, int count) {
plasmaCrawlNURL.Entry entry;
- for (int i=0; i