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 cu...@apache.org on 2006/10/24 23:44:48 UTC
svn commit: r467497 - in /lucene/hadoop/trunk: CHANGES.txt
src/examples/org/apache/hadoop/examples/NNBench.java
Author: cutting
Date: Tue Oct 24 14:44:48 2006
New Revision: 467497
URL: http://svn.apache.org/viewvc?view=rev&rev=467497
Log:
HADOOP-626. Correct the documentation in the NNBench example code, and also remove a mistaken call there. Contributed by Nigel Daley.
Modified:
lucene/hadoop/trunk/CHANGES.txt
lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/NNBench.java
Modified: lucene/hadoop/trunk/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/CHANGES.txt?view=diff&rev=467497&r1=467496&r2=467497
==============================================================================
--- lucene/hadoop/trunk/CHANGES.txt (original)
+++ lucene/hadoop/trunk/CHANGES.txt Tue Oct 24 14:44:48 2006
@@ -40,6 +40,10 @@
11. HADOOP-554. Fix DFSShell to return -1 for errors.
(Dhruba Borthakur via cutting)
+12. HADOOP-626. Correct the documentation in the NNBench example
+ code, and also remove a mistaken call there.
+ (Nigel Daley via cutting)
+
Release 0.7.2 - 2006-10-18
Modified: lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/NNBench.java
URL: http://svn.apache.org/viewvc/lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/NNBench.java?view=diff&rev=467497&r1=467496&r2=467497
==============================================================================
--- lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/NNBench.java (original)
+++ lucene/hadoop/trunk/src/examples/org/apache/hadoop/examples/NNBench.java Tue Oct 24 14:44:48 2006
@@ -44,12 +44,15 @@
import org.apache.hadoop.util.Progressable;
/**
- * This program uses map/reduce to just run a distributed job where there is
- * no interaction between the tasks and each task creates 1M/NTasks files
- * of 8 bytes each, closes them. Opens those files again, and reads them,
- * and closes them. It is meant as a stress-test and benchmark for namenode.
+ * This program uses map/reduce to run a distributed job where there is
+ * no interaction between the tasks. Each task creates a configurable
+ * number of files. Each file has a configurable number of bytes
+ * written to it, then it is closed, re-opened, and read from, and
+ * re-closed. This program functions as a stress-test and benchmark
+ * for namenode, especially when the number of bytes written to
+ * each file is small.
*
- * @author Owen O'Malley
+ * @author Milind Bhandarkar
*/
public class NNBench extends MapReduceBase implements Reducer {
@@ -67,7 +70,8 @@
}
/**
- * Given a number of files to create, create and open those files.
+ * Given a number of files to create, create and open those files
+ * for both writing and reading a given number of bytes.
*/
public void map(WritableComparable key,
Writable value,
@@ -97,7 +101,6 @@
int toBeRead = numBytesToWrite;
while (toBeRead > 0) {
int nbytes = Math.min(buffer.length, toBeRead);
- randomizeBytes(buffer, 0, nbytes);
toBeRead -= nbytes;
in.read(buffer, 0, nbytes);
reporter.setStatus("read " + (numBytesToWrite-toBeRead) +
@@ -134,8 +137,7 @@
/**
* This is the main routine for launching a distributed namenode stress test.
- * It runs 10 maps/node and each node creates 1M/nMaps DFS files.
- * The reduce doesn't do anything.
+ * It runs 10 maps/node. The reduce doesn't do anything.
*
* @throws IOException
*/