Hadoop mapreduce示例文档

时间:2012-07-19 05:26:05

标签: hadoop mapreduce

我在哪里可以找到下面提到的示例程序的详细文档,我无法在文档中找到它。

hduser@canberra:~/work/software/cloudera/hadoop-2.0.0-cdh4.0.0$ hadoop jar src/hadoop-mapreduce-project/hadoop-mapreduce-examples/target/hadoop-mapreduce-examples-2.0.0-cdh4.0.0.jar 
An example program must be given as the first argument.
Valid program names are:
  aggregatewordcount: An Aggregate based map/reduce program that counts the words in the input files.
  aggregatewordhist: An Aggregate based map/reduce program that computes the histogram of the words in the input files.
  bbp: A map/reduce program that uses Bailey-Borwein-Plouffe to compute exact digits of Pi.
  dbcount: An example job that count the pageview counts from a database.
  distbbp: A map/reduce program that uses a BBP-type formula to compute exact bits of Pi.
  grep: A map/reduce program that counts the matches of a regex in the input.
  join: A job that effects a join over sorted, equally partitioned datasets
  multifilewc: A job that counts words from several files.
  pentomino: A map/reduce tile laying program to find solutions to pentomino problems.
  pi: A map/reduce program that estimates Pi using a quasi-Monte Carlo method.
  randomtextwriter: A map/reduce program that writes 10GB of random textual data per node.
  randomwriter: A map/reduce program that writes 10GB of random data per node.
  secondarysort: An example defining a secondary sort to the reduce.
  sort: A map/reduce program that sorts the data written by the random writer.
  sudoku: A sudoku solver.
  teragen: Generate data for the terasort
  terasort: Run the terasort
  teravalidate: Checking results of terasort
  wordcount: A map/reduce program that counts the words in the input files.

2 个答案:

答案 0 :(得分:2)

AFAIK,所有示例都没有单独的文档。因此,代码是唯一的信息来源。

首先,必须从ExampleDriver.java找到有效程序名称(distbbp)和java类(o.a.h.examples.pi.DistBbp)之间的关联。大多数情况下的实际代码(o.a.h.examples.pi.DistBbp)都有要发送的参数及其在评论中的描述,如果没有通过代码的话。

答案 1 :(得分:0)

为了完整性,直接链接到(对我来说)更愉快的浏览界面代码:

http://svn.apache.org/viewvc/hadoop/common/trunk/hadoop-mapreduce-project/hadoop-mapreduce-examples/src/main/java/org/apache/hadoop/examples/

this related SO question找到此链接(并轻轻更新)。