Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-2911: Added InterruptedException to throws to allow propagation

prakharchaube6662081bd3bf
diff --git a/src/java/org/apache/nutch/fetcher/Fetcher.java b/src/java/org/apache/nutch/fetcher/Fetcher.java
index 0eaee2db5..21e0f87d7 100644
--- a/src/java/org/apache/nutch/fetcher/Fetcher.java
+++ b/src/java/org/apache/nutch/fetcher/Fetcher.java
@@ -191,7 +191,8 @@ public class Fetcher extends NutchTool implements Tool {
}
@Override
- public void run(Context innerContext) throws IOException {
+ public void run(Context innerContext)
+ throws IOException, InterruptedException {
setup(innerContext);
try {
@@ -437,11 +438,7 @@ public class Fetcher extends NutchTool implements Tool {
} while (activeThreads.get() > 0);
LOG.info("-activeThreads={}", activeThreads);
} finally {
- try {
- cleanup(innerContext);
- } catch (InterruptedException e) {
- LOG.info("Clean up interrupted");
- }
+ cleanup(innerContext);
}
}
}