You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-commits@hadoop.apache.org by ta...@apache.org on 2021/11/10 02:44:19 UTC
[hadoop] branch branch-3.2 updated: HDFS-16301. Improve
BenchmarkThroughput#SIZE naming standardization. (#3622)
This is an automated email from the ASF dual-hosted git repository.
tasanuma pushed a commit to branch branch-3.2
in repository https://gitbox.apache.org/repos/asf/hadoop.git
The following commit(s) were added to refs/heads/branch-3.2 by this push:
new 9ddafb2 HDFS-16301. Improve BenchmarkThroughput#SIZE naming standardization. (#3622)
9ddafb2 is described below
commit 9ddafb2eee667e880af19f4c36d0c6ac24ad4bde
Author: jianghuazhu <74...@qq.com>
AuthorDate: Wed Nov 10 10:32:52 2021 +0800
HDFS-16301. Improve BenchmarkThroughput#SIZE naming standardization. (#3622)
(cherry picked from commit b307f18a584b207782124bee0a377b2dbfc13df0)
---
.../test/java/org/apache/hadoop/hdfs/BenchmarkThroughput.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/BenchmarkThroughput.java b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/BenchmarkThroughput.java
index 515a0a0..e22e07e 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/BenchmarkThroughput.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/BenchmarkThroughput.java
@@ -187,7 +187,7 @@ public class BenchmarkThroughput extends Configured implements Tool {
}
Configuration conf = getConf();
// 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);
BUFFER_SIZE = conf.getInt("dfsthroughput.buffer.size", 4 * 1024);
@@ -203,9 +203,9 @@ public class BenchmarkThroughput extends Configured implements Tool {
ChecksumFileSystem checkedLocal = FileSystem.getLocal(conf);
FileSystem rawLocal = checkedLocal.getRawFileSystem();
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;
try {
@@ -214,7 +214,7 @@ public class BenchmarkThroughput extends Configured implements Tool {
cluster.waitActive();
FileSystem dfs = cluster.getFileSystem();
for(int i=0; i < reps; ++i) {
- writeAndReadFile(dfs, "dfs", conf, SIZE);
+ writeAndReadFile(dfs, "dfs", conf, fileSize);
}
} finally {
if (cluster != null) {
---------------------------------------------------------------------
To unsubscribe, e-mail: common-commits-unsubscribe@hadoop.apache.org
For additional commands, e-mail: common-commits-help@hadoop.apache.org