MAPREDUCE-2082. Fixes Pipes to create the jobtoken file in the right place. Contributed by Jitendra Pandey.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/mapreduce/trunk@1003690 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/CHANGES.txt b/CHANGES.txt
index fbb884d..0b93517 100644
--- a/CHANGES.txt
+++ b/CHANGES.txt
@@ -319,6 +319,9 @@
MAPREDUCE-1816. HAR files used for RAID parity-bite have configurable
partfile size. (Ramkumar Vadali via dhruba)
+ MAPREDUCE-2082. Fixes Pipes to create the jobtoken file in the right
+ place. (Jitendra Pandey via ddas)
+
Release 0.21.0 - Unreleased
INCOMPATIBLE CHANGES
diff --git a/src/java/org/apache/hadoop/mapred/pipes/Application.java b/src/java/org/apache/hadoop/mapred/pipes/Application.java
index e634a92..cb8b476 100644
--- a/src/java/org/apache/hadoop/mapred/pipes/Application.java
+++ b/src/java/org/apache/hadoop/mapred/pipes/Application.java
@@ -101,7 +101,7 @@
// This password is used as shared secret key between this application and
// child pipes process
byte[] password = jobToken.getPassword();
- String localPasswordFile = conf.getJobLocalDir() + Path.SEPARATOR
+ String localPasswordFile = new File(".") + Path.SEPARATOR
+ "jobTokenPassword";
writePasswordToLocalFile(localPasswordFile, password, conf);
env.put("hadoop.pipes.shared.secret.location", localPasswordFile);
@@ -168,10 +168,6 @@
byte[] password, JobConf conf) throws IOException {
FileSystem localFs = FileSystem.getLocal(conf);
Path localPath = new Path(localPasswordFile);
- if (localFs.isFile(localPath)) {
- LOG.debug("Password file is already created by previous path");
- return;
- }
FSDataOutputStream out = FileSystem.create(localFs, localPath,
new FsPermission("400"));
out.write(password);