From 30099a36c6b0f658d25fb505a9f3ce15d19f7ba6 Mon Sep 17 00:00:00 2001 From: Jason Lowe Date: Fri, 8 May 2015 22:28:50 +0000 Subject: [PATCH] MAPREDUCE-5248. Let NNBenchWithoutMR specify the replication factor for its test. Contributed by Erik Paulson --- hadoop-mapreduce-project/CHANGES.txt | 3 +++ .../apache/hadoop/hdfs/NNBenchWithoutMR.java | 23 +++++++++++-------- 2 files changed, 17 insertions(+), 9 deletions(-) diff --git a/hadoop-mapreduce-project/CHANGES.txt b/hadoop-mapreduce-project/CHANGES.txt index ba9da73f741..45075459667 100644 --- a/hadoop-mapreduce-project/CHANGES.txt +++ b/hadoop-mapreduce-project/CHANGES.txt @@ -322,6 +322,9 @@ Release 2.8.0 - UNRELEASED MAPREDUCE-5981. Log levels of certain MR logs can be changed to DEBUG. (Varun Saxena via devaraj) + MAPREDUCE-5248. Let NNBenchWithoutMR specify the replication factor for + its test (Erik Paulson via jlowe) + OPTIMIZATIONS BUG FIXES diff --git a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBenchWithoutMR.java b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBenchWithoutMR.java index 352d734df0f..8cd6f36100b 100644 --- a/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBenchWithoutMR.java +++ b/hadoop-mapreduce-project/hadoop-mapreduce-client/hadoop-mapreduce-client-jobclient/src/test/java/org/apache/hadoop/hdfs/NNBenchWithoutMR.java @@ -54,6 +54,7 @@ public class NNBenchWithoutMR { private static long bytesPerBlock = 1; private static long blocksPerFile = 0; private static long bytesPerFile = 1; + private static short replicationFactorPerFile = 1; // default is 1 private static Path baseDir = null; // variables initialized in main() @@ -106,7 +107,7 @@ public class NNBenchWithoutMR { try { out = fileSys.create( new Path(taskDir, "" + index), false, 512, - (short)1, bytesPerBlock); + (short)replicationFactorPerFile, bytesPerBlock); success = true; } catch (IOException ioe) { success=false; @@ -263,14 +264,15 @@ public class NNBenchWithoutMR { String usage = "Usage: nnbench " + - " -operation " + - " -baseDir " + - " -startTime