diff --git a/indexing-hadoop/src/main/java/io/druid/indexer/JobHelper.java b/indexing-hadoop/src/main/java/io/druid/indexer/JobHelper.java index d4eda3aeaed..b2cc58fe496 100644 --- a/indexing-hadoop/src/main/java/io/druid/indexer/JobHelper.java +++ b/indexing-hadoop/src/main/java/io/druid/indexer/JobHelper.java @@ -76,7 +76,6 @@ public class JobHelper { private static final Logger log = new Logger(JobHelper.class); - private static final Set existing = Sets.newHashSet(); private static final int NUM_RETRIES = 8; private static final int SECONDS_BETWEEN_RETRIES = 2; @@ -250,11 +249,9 @@ public class JobHelper { // Snapshot jars are uploaded to non shared intermediate directory. final Path hdfsPath = new Path(intermediateClassPath, jarFile.getName()); - - // existing is used to prevent uploading file multiple times in same run. - if (!existing.contains(hdfsPath)) { + // Prevent uploading same file multiple times in same run. + if (!fs.exists(hdfsPath)) { uploadJar(jarFile, hdfsPath, fs); - existing.add(hdfsPath); } job.addFileToClassPath(hdfsPath); }