MAPREDUCE-3818. Fixed broken compilation in TestSubmitJob after the patch for HDFS-2895. Contributed by Suresh Srinivas.

git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1241253 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Vinod Kumar Vavilapalli 2012-02-06 23:16:37 +00:00
parent 4f6839f23d
commit 08479378c2
2 changed files with 9 additions and 12 deletions

View File

@ -87,6 +87,9 @@ Trunk (unreleased changes)
MAPREDUCE-3740. Fixed broken mapreduce compilation after the patch for MAPREDUCE-3740. Fixed broken mapreduce compilation after the patch for
HADOOP-7965. (Devaraj K via vinodkv) HADOOP-7965. (Devaraj K via vinodkv)
MAPREDUCE-3818. Fixed broken compilation in TestSubmitJob after the patch
for HDFS-2895. (Suresh Srinivas via vinodkv)
Release 0.23.1 - Unreleased Release 0.23.1 - Unreleased
INCOMPATIBLE CHANGES INCOMPATIBLE CHANGES

View File

@ -33,7 +33,7 @@ import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path; import org.apache.hadoop.fs.Path;
import org.apache.hadoop.hdfs.MiniDFSCluster; import org.apache.hadoop.hdfs.MiniDFSCluster;
import org.apache.hadoop.hdfs.protocol.HdfsFileStatus; import org.apache.hadoop.hdfs.protocol.HdfsFileStatus;
import org.apache.hadoop.hdfs.protocolR23Compatible.ClientNamenodeWireProtocol; import org.apache.hadoop.hdfs.protocolPB.ClientNamenodeProtocolTranslatorPB;
import org.apache.hadoop.hdfs.server.namenode.NameNode; import org.apache.hadoop.hdfs.server.namenode.NameNode;
import org.apache.hadoop.ipc.RPC; import org.apache.hadoop.ipc.RPC;
import org.apache.hadoop.ipc.RemoteException; import org.apache.hadoop.ipc.RemoteException;
@ -148,16 +148,10 @@ public class TestSubmitJob {
conf, NetUtils.getSocketFactory(conf, ClientProtocol.class)); conf, NetUtils.getSocketFactory(conf, ClientProtocol.class));
} }
static ClientNamenodeWireProtocol getDFSClient( static org.apache.hadoop.hdfs.protocol.ClientProtocol getDFSClient(
Configuration conf, UserGroupInformation ugi) Configuration conf, UserGroupInformation ugi) throws IOException {
throws IOException { return new ClientNamenodeProtocolTranslatorPB(NameNode.getAddress(conf),
return (ClientNamenodeWireProtocol) conf, ugi);
RPC.getProxy(ClientNamenodeWireProtocol.class,
ClientNamenodeWireProtocol.versionID,
NameNode.getAddress(conf), ugi,
conf,
NetUtils.getSocketFactory(conf,
ClientNamenodeWireProtocol.class));
} }
/** /**
@ -226,7 +220,7 @@ public class TestSubmitJob {
UserGroupInformation user2 = UserGroupInformation user2 =
TestMiniMRWithDFSWithDistinctUsers.createUGI("user2", false); TestMiniMRWithDFSWithDistinctUsers.createUGI("user2", false);
JobConf conf_other = mr.createJobConf(); JobConf conf_other = mr.createJobConf();
ClientNamenodeWireProtocol client = org.apache.hadoop.hdfs.protocol.ClientProtocol client =
getDFSClient(conf_other, user2); getDFSClient(conf_other, user2);
// try accessing mapred.system.dir/jobid/* // try accessing mapred.system.dir/jobid/*