MAPREDUCE-2797. Update mapreduce tests and RAID for HDFS-2239.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1156215 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
5d5b1c6c10
commit
2d653c994c
|
@ -381,6 +381,8 @@ Trunk (unreleased changes)
|
||||||
MAPREDUCE-2760. mapreduce.jobtracker.split.metainfo.maxsize typoed
|
MAPREDUCE-2760. mapreduce.jobtracker.split.metainfo.maxsize typoed
|
||||||
in mapred-default.xml. (todd via eli)
|
in mapred-default.xml. (todd via eli)
|
||||||
|
|
||||||
|
MAPREDUCE-2797. Update mapreduce tests and RAID for HDFS-2239. (szetszwo)
|
||||||
|
|
||||||
Release 0.22.0 - Unreleased
|
Release 0.22.0 - Unreleased
|
||||||
|
|
||||||
INCOMPATIBLE CHANGES
|
INCOMPATIBLE CHANGES
|
||||||
|
|
|
@ -543,7 +543,7 @@ public class BlockPlacementPolicyRaid extends BlockPlacementPolicy {
|
||||||
}
|
}
|
||||||
// remove the prefix
|
// remove the prefix
|
||||||
String src = parity.substring(prefix.length());
|
String src = parity.substring(prefix.length());
|
||||||
if (NameNodeRaidUtil.getFileInfo(namesystem.dir, src, true) == null) {
|
if (NameNodeRaidUtil.getFileInfo(namesystem, src, true) == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return src;
|
return src;
|
||||||
|
@ -575,7 +575,7 @@ public class BlockPlacementPolicyRaid extends BlockPlacementPolicy {
|
||||||
private String getParityFile(String parityPrefix, String src)
|
private String getParityFile(String parityPrefix, String src)
|
||||||
throws IOException {
|
throws IOException {
|
||||||
String parity = parityPrefix + src;
|
String parity = parityPrefix + src;
|
||||||
if (NameNodeRaidUtil.getFileInfo(namesystem.dir, parity, true) == null) {
|
if (NameNodeRaidUtil.getFileInfo(namesystem, parity, true) == null) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
return parity;
|
return parity;
|
||||||
|
|
|
@ -32,6 +32,7 @@ import org.apache.hadoop.conf.Configuration;
|
||||||
import org.apache.hadoop.fs.FileSystem;
|
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.server.namenode.NameNodeAdapter;
|
||||||
import org.apache.hadoop.io.IntWritable;
|
import org.apache.hadoop.io.IntWritable;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.mapred.JobConf;
|
import org.apache.hadoop.mapred.JobConf;
|
||||||
|
@ -147,7 +148,7 @@ public class TestBinaryTokenFile {
|
||||||
dfsCluster.getFileSystem().getUri().toString(), 1, null, null, null,
|
dfsCluster.getFileSystem().getUri().toString(), 1, null, null, null,
|
||||||
jConf);
|
jConf);
|
||||||
|
|
||||||
dfsCluster.getNamesystem().getDelegationTokenSecretManager().startThreads();
|
NameNodeAdapter.getDtSecretManager(dfsCluster.getNamesystem()).startThreads();
|
||||||
FileSystem fs = dfsCluster.getFileSystem();
|
FileSystem fs = dfsCluster.getFileSystem();
|
||||||
|
|
||||||
p1 = new Path("file1");
|
p1 = new Path("file1");
|
||||||
|
|
|
@ -45,6 +45,7 @@ import org.apache.hadoop.hdfs.MiniDFSCluster;
|
||||||
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
|
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenIdentifier;
|
||||||
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager;
|
import org.apache.hadoop.hdfs.security.token.delegation.DelegationTokenSecretManager;
|
||||||
import org.apache.hadoop.hdfs.server.namenode.NameNode;
|
import org.apache.hadoop.hdfs.server.namenode.NameNode;
|
||||||
|
import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter;
|
||||||
import org.apache.hadoop.io.IntWritable;
|
import org.apache.hadoop.io.IntWritable;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
import org.apache.hadoop.mapred.JobConf;
|
import org.apache.hadoop.mapred.JobConf;
|
||||||
|
@ -157,7 +158,7 @@ public class TestTokenCache {
|
||||||
|
|
||||||
createTokenFileJson();
|
createTokenFileJson();
|
||||||
verifySecretKeysInJSONFile();
|
verifySecretKeysInJSONFile();
|
||||||
dfsCluster.getNamesystem().getDelegationTokenSecretManager().startThreads();
|
NameNodeAdapter.getDtSecretManager(dfsCluster.getNamesystem()).startThreads();
|
||||||
FileSystem fs = dfsCluster.getFileSystem();
|
FileSystem fs = dfsCluster.getFileSystem();
|
||||||
|
|
||||||
p1 = new Path("file1");
|
p1 = new Path("file1");
|
||||||
|
@ -303,7 +304,7 @@ public class TestTokenCache {
|
||||||
HftpFileSystem hfs = mock(HftpFileSystem.class);
|
HftpFileSystem hfs = mock(HftpFileSystem.class);
|
||||||
|
|
||||||
DelegationTokenSecretManager dtSecretManager =
|
DelegationTokenSecretManager dtSecretManager =
|
||||||
dfsCluster.getNamesystem().getDelegationTokenSecretManager();
|
NameNodeAdapter.getDtSecretManager(dfsCluster.getNamesystem());
|
||||||
String renewer = "renewer";
|
String renewer = "renewer";
|
||||||
jConf.set(JTConfig.JT_USER_NAME,renewer);
|
jConf.set(JTConfig.JT_USER_NAME,renewer);
|
||||||
DelegationTokenIdentifier dtId =
|
DelegationTokenIdentifier dtId =
|
||||||
|
|
|
@ -40,6 +40,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.server.namenode.NameNode;
|
import org.apache.hadoop.hdfs.server.namenode.NameNode;
|
||||||
|
import org.apache.hadoop.hdfs.server.namenode.NameNodeAdapter;
|
||||||
import org.apache.hadoop.io.IntWritable;
|
import org.apache.hadoop.io.IntWritable;
|
||||||
import org.apache.hadoop.io.NullWritable;
|
import org.apache.hadoop.io.NullWritable;
|
||||||
import org.apache.hadoop.io.Text;
|
import org.apache.hadoop.io.Text;
|
||||||
|
@ -185,8 +186,7 @@ public class TestTokenCacheOldApi {
|
||||||
|
|
||||||
createTokenFileJson();
|
createTokenFileJson();
|
||||||
verifySecretKeysInJSONFile();
|
verifySecretKeysInJSONFile();
|
||||||
dfsCluster.getNamesystem()
|
NameNodeAdapter.getDtSecretManager(dfsCluster.getNamesystem()).startThreads();
|
||||||
.getDelegationTokenSecretManager().startThreads();
|
|
||||||
FileSystem fs = dfsCluster.getFileSystem();
|
FileSystem fs = dfsCluster.getFileSystem();
|
||||||
|
|
||||||
p1 = new Path("file1");
|
p1 = new Path("file1");
|
||||||
|
|
Loading…
Reference in New Issue