HDFS-5544. Adding Test case For Checking dfs.checksum.type as NULL value. Contributed by Sathish.
git-svn-id: https://svn.apache.org/repos/asf/hadoop/common/trunk@1544596 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
ce68f410b0
commit
8034d04c49
|
@ -629,6 +629,8 @@ Release 2.2.1 - UNRELEASED
|
||||||
|
|
||||||
HDFS-5344. Make LsSnapshottableDir as Tool interface implementation. (Sathish via umamahesh)
|
HDFS-5344. Make LsSnapshottableDir as Tool interface implementation. (Sathish via umamahesh)
|
||||||
|
|
||||||
|
HDFS-5544. Adding Test case For Checking dfs.checksum type as NULL value. (Sathish via umamahesh)
|
||||||
|
|
||||||
OPTIMIZATIONS
|
OPTIMIZATIONS
|
||||||
|
|
||||||
BUG FIXES
|
BUG FIXES
|
||||||
|
|
|
@ -135,4 +135,25 @@ public class TestFSOutputSummer {
|
||||||
cluster.shutdown();
|
cluster.shutdown();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void TestDFSCheckSumType() throws Exception{
|
||||||
|
Configuration conf = new HdfsConfiguration();
|
||||||
|
conf.setLong(DFSConfigKeys.DFS_BLOCK_SIZE_KEY, BLOCK_SIZE);
|
||||||
|
conf.setInt(DFSConfigKeys.DFS_BYTES_PER_CHECKSUM_KEY, BYTES_PER_CHECKSUM);
|
||||||
|
conf.set(DFSConfigKeys.DFS_CHECKSUM_TYPE_KEY, "NULL");
|
||||||
|
MiniDFSCluster cluster = new MiniDFSCluster.Builder(conf)
|
||||||
|
.numDataNodes(NUM_OF_DATANODES)
|
||||||
|
.build();
|
||||||
|
fileSys = cluster.getFileSystem();
|
||||||
|
try {
|
||||||
|
Path file = new Path("try.dat");
|
||||||
|
Random rand = new Random(seed);
|
||||||
|
rand.nextBytes(expected);
|
||||||
|
writeFile1(file);
|
||||||
|
} finally {
|
||||||
|
fileSys.close();
|
||||||
|
cluster.shutdown();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue