MAPREDUCE-4642. MiniMRClientClusterFactory should not use job.setJar() (rkanter via tucu)

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/branches/branch-2@1382094 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Alejandro Abdelnur 2012-09-07 17:06:55 +00:00
parent ebb1a16f62
commit 2cdffe63d5
2 changed files with 8 additions and 2 deletions

View File

@ -69,6 +69,8 @@ Branch-2 ( Unreleased changes )
MAPREDUCE-4629. Remove JobHistory.DEBUG_MODE (Karthik Kambatla via bobby)
MAPREDUCE-4642. MiniMRClientClusterFactory should not use job.setJar() (rkanter via tucu)
Release 2.1.0-alpha - Unreleased
INCOMPATIBLE CHANGES

View File

@ -58,8 +58,12 @@ public class MiniMRClientClusterFactory {
Job job = Job.getInstance(conf);
job.addFileToClassPath(appJar);
String callerJar = JarFinder.getJar(caller);
job.setJar(callerJar);
Path callerJar = new Path(JarFinder.getJar(caller));
Path remoteCallerJar = new Path(testRootDir, callerJar.getName());
fs.copyFromLocalFile(callerJar, remoteCallerJar);
fs.setPermission(remoteCallerJar, new FsPermission("744"));
job.addFileToClassPath(remoteCallerJar);
MiniMRYarnCluster miniMRYarnCluster = new MiniMRYarnCluster(caller
.getName(), noOfNMs);