This commit is contained in:
Hamlet Lee 2016-08-17 01:19:44 +08:00 committed by Himanshu
parent eafafce1aa
commit e4f0eac8e6
1 changed files with 2 additions and 5 deletions

View File

@ -76,7 +76,6 @@ public class JobHelper
{
private static final Logger log = new Logger(JobHelper.class);
private static final Set<Path> 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);
}