MAPREDUCE-6931. Remove TestDFSIO "Total Throughput" calculation. Contributed by Dennis Huo.

(cherry picked from commit 3e0e2033cc)

Conflicts:
	hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/fs/TestDFSIO.java
This commit is contained in:
Konstantin V Shvachko 2017-08-22 11:05:47 -07:00
parent 25e9c29608
commit 9a0aac4170
1 changed files with 7 additions and 4 deletions

View File

@ -815,7 +815,7 @@ public class TestDFSIO implements Tool {
long tStart = System.currentTimeMillis();
sequentialTest(fs, testType, nrBytes, nrFiles);
long execTime = System.currentTimeMillis() - tStart;
String resultLine = "Seq Test exec time sec: " + (float)execTime / 1000;
String resultLine = "Seq Test exec time sec: " + msToSecs(execTime);
LOG.info(resultLine);
return 0;
}
@ -879,6 +879,10 @@ public class TestDFSIO implements Tool {
return ((float)bytes)/MEGA;
}
static float msToSecs(long timeMillis) {
return timeMillis / 1000.0f;
}
private void analyzeResult( FileSystem fs,
TestType testType,
long execTime,
@ -923,11 +927,10 @@ public class TestDFSIO implements Tool {
" Date & time: " + new Date(System.currentTimeMillis()),
" Number of files: " + tasks,
" Total MBytes processed: " + df.format(toMB(size)),
" Throughput mb/sec: " + df.format(size * 1000.0 / (time * MEGA)),
"Total Throughput mb/sec: " + df.format(toMB(size) / ((float)execTime)),
" Throughput mb/sec: " + df.format(toMB(size) / msToSecs(time)),
" Average IO rate mb/sec: " + df.format(med),
" IO rate std deviation: " + df.format(stdDev),
" Test exec time sec: " + df.format((float)execTime / 1000),
" Test exec time sec: " + df.format(msToSecs(execTime)),
"" };
PrintStream res = null;