Apache Nutch is an extensible and scalable web crawler
NUTCH-341 - if -workingdir is specified, always create a unique subdir. Also, use unique directory names to allow multiple IndexMergers to run simultaneously.
Andrzej Bialecki438d78afc399
diff --git a/src/java/org/apache/nutch/indexer/IndexMerger.java b/src/java/org/apache/nutch/indexer/IndexMerger.javaindex ff3fc6dc6..c50d8eb55 100644--- a/src/java/org/apache/nutch/indexer/IndexMerger.java+++ b/src/java/org/apache/nutch/indexer/IndexMerger.java@@ -118,13 +118,13 @@ public class IndexMerger {//Configuration conf = NutchConfiguration.create();FileSystem fs = FileSystem.get(conf);- Path workDir = new Path("indexmerger");+ Path workDir = new Path("indexmerger-" + System.currentTimeMillis());List indexDirs = new ArrayList();int i = 0;if ("-workingdir".equals(args[i])) {i++;- workDir = new Path(args[i++]);+ workDir = new Path(args[i++], "indexmerger-" + System.currentTimeMillis());}Path outputIndex = new Path(args[i++]);