From 806ee8c9de7fc52311db81335529a38c9ca8b907 Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Sat, 9 May 2009 05:38:47 +0000 Subject: [PATCH] HBASE-1397 Better distribution in the PerformanceEvaluation MapReduce when rows run to the Billions git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@773166 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ .../hadoop/hbase/PerformanceEvaluation.java | 15 +++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index bb1b59fe967..b66340871e9 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -213,6 +213,8 @@ Release 0.20.0 - Unreleased HBASE-1286 Thrift should support next(nbRow) like functionality (Alex Newman via Stack) HBASE-1392 change how we build/configure lzocodec (Ryan Rawson via Stack) + HBASE-1397 Better distribution in the PerformanceEvaluation MapReduce + when rows run to the Billions OPTIMIZATIONS diff --git a/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java b/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java index 9bbb686cd53..3bfca3bfeca 100644 --- a/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java +++ b/src/test/org/apache/hadoop/hbase/PerformanceEvaluation.java @@ -314,15 +314,15 @@ public class PerformanceEvaluation implements HConstants { fs.mkdirs(subdir); Path inputFile = new Path(subdir, "input.txt"); PrintStream out = new PrintStream(fs.create(inputFile)); + int perClientRows = (this.R / this.N); try { - for (int i = 0; i < (this.N * 10); i++) { - // Write out start row, total number of rows per client run: 1/10th of - // (R/N). - int perClientRows = (this.R / this.N); - out.println("startRow=" + i * perClientRows + + for (int i = 0; i < 10; i++) { + for (int j = 0; j < N; j++) { + out.println("startRow=" + ((j * perClientRows) + (i * perClientRows)) + ", perClientRunRows=" + (perClientRows / 10) + ", totalRows=" + this.R + ", clients=" + this.N); + } } } finally { out.close(); @@ -730,9 +730,8 @@ public class PerformanceEvaluation implements HConstants { } N = Integer.parseInt(args[start]); - if (N > 500 || N < 1) { - throw new IllegalArgumentException("Number of clients must be between " + - "1 and 500."); + if (N < 1) { + throw new IllegalArgumentException("Number of clients must be > 1"); } // Set total number of rows to write.