|
@@ -190,7 +190,7 @@ public class BenchmarkThroughput extends Configured implements Tool {
|
|
}
|
|
}
|
|
Configuration conf = getConf();
|
|
Configuration conf = getConf();
|
|
// the size of the file to write
|
|
// the size of the file to write
|
|
- long SIZE = conf.getLong("dfsthroughput.file.size",
|
|
|
|
|
|
+ long fileSize = conf.getLong("dfsthroughput.file.size",
|
|
10L * 1024 * 1024 * 1024);
|
|
10L * 1024 * 1024 * 1024);
|
|
BUFFER_SIZE = conf.getInt("dfsthroughput.buffer.size", 4 * 1024);
|
|
BUFFER_SIZE = conf.getInt("dfsthroughput.buffer.size", 4 * 1024);
|
|
|
|
|
|
@@ -206,9 +206,9 @@ public class BenchmarkThroughput extends Configured implements Tool {
|
|
ChecksumFileSystem checkedLocal = FileSystem.getLocal(conf);
|
|
ChecksumFileSystem checkedLocal = FileSystem.getLocal(conf);
|
|
FileSystem rawLocal = checkedLocal.getRawFileSystem();
|
|
FileSystem rawLocal = checkedLocal.getRawFileSystem();
|
|
for(int i=0; i < reps; ++i) {
|
|
for(int i=0; i < reps; ++i) {
|
|
- writeAndReadLocalFile("local", conf, SIZE);
|
|
|
|
- writeAndReadFile(rawLocal, "raw", conf, SIZE);
|
|
|
|
- writeAndReadFile(checkedLocal, "checked", conf, SIZE);
|
|
|
|
|
|
+ writeAndReadLocalFile("local", conf, fileSize);
|
|
|
|
+ writeAndReadFile(rawLocal, "raw", conf, fileSize);
|
|
|
|
+ writeAndReadFile(checkedLocal, "checked", conf, fileSize);
|
|
}
|
|
}
|
|
MiniDFSCluster cluster = null;
|
|
MiniDFSCluster cluster = null;
|
|
try {
|
|
try {
|
|
@@ -217,7 +217,7 @@ public class BenchmarkThroughput extends Configured implements Tool {
|
|
cluster.waitActive();
|
|
cluster.waitActive();
|
|
FileSystem dfs = cluster.getFileSystem();
|
|
FileSystem dfs = cluster.getFileSystem();
|
|
for(int i=0; i < reps; ++i) {
|
|
for(int i=0; i < reps; ++i) {
|
|
- writeAndReadFile(dfs, "dfs", conf, SIZE);
|
|
|
|
|
|
+ writeAndReadFile(dfs, "dfs", conf, fileSize);
|
|
}
|
|
}
|
|
} finally {
|
|
} finally {
|
|
if (cluster != null) {
|
|
if (cluster != null) {
|