Skip to content

armgit / nutch

Public Imported from GitHub
0

Apache Nutch is an extensible and scalable web crawler

NUTCH-1670 set same crawldb directory in mergedb parameter

Tejas Patil756b3527d8f4
diff --git a/CHANGES.txt b/CHANGES.txt
index 330ed1abf..694ce4bb1 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -2,6 +2,8 @@ Nutch Change Log
Nutch Development Trunk
+* NUTCH-1670 set same crawldb directory in mergedb parameter (lufeng via tejasp)
+
* NUTCH-1080 Type safe members, arguments for better readability (tejasp)
* NUTCH-1360 Suport the storing of IP address connected to when web crawling (lewismc, ferdy and Yasin Kılınç)
diff --git a/src/java/org/apache/nutch/crawl/CrawlDbMerger.java b/src/java/org/apache/nutch/crawl/CrawlDbMerger.java
index d68a238ab..b5816de28 100644
--- a/src/java/org/apache/nutch/crawl/CrawlDbMerger.java
+++ b/src/java/org/apache/nutch/crawl/CrawlDbMerger.java
@@ -125,6 +125,8 @@ public class CrawlDbMerger extends Configured implements Tool {
}
JobClient.runJob(job);
FileSystem fs = FileSystem.get(getConf());
+ if(fs.exists(output))
+ fs.delete(output,true);
fs.mkdirs(output);
fs.rename(FileOutputFormat.getOutputPath(job), new Path(output, CrawlDb.CURRENT_NAME));
long end = System.currentTimeMillis();