Merge pull request #1261 from metamx/fix-hadoop-snapshot-jar-uploading

always re-upload snapshot self-contained jars to hdfs
This commit is contained in:
Fangjin Yang 2015-04-07 09:58:18 -07:00
commit 9d0267d6f3
1 changed files with 1 additions and 1 deletions

View File

@ -75,7 +75,7 @@ public class JobHelper
final Path hdfsPath = new Path(distributedClassPath, jarFile.getName()); final Path hdfsPath = new Path(distributedClassPath, jarFile.getName());
if (!existing.contains(hdfsPath)) { if (!existing.contains(hdfsPath)) {
if (jarFile.getName().endsWith("SNAPSHOT.jar") || !fs.exists(hdfsPath)) { if (jarFile.getName().matches(".*SNAPSHOT(-selfcontained)?\\.jar$") || !fs.exists(hdfsPath)) {
log.info("Uploading jar to path[%s]", hdfsPath); log.info("Uploading jar to path[%s]", hdfsPath);
ByteStreams.copy( ByteStreams.copy(
Files.newInputStreamSupplier(jarFile), Files.newInputStreamSupplier(jarFile),