參考:
http://wiki.apache.org/hadoop/RandomWriter
http://blog.csdn.net/xw13106209/article/details/6881001
step2:
command:
yarn jar /usr/local/hadoop/share/hadoop/mapreduce/hadoop-mapreduce-examples-2.6.0.jar randomwriter /random
結果:產生1GB的資料:
細部過程:
16/05/19 14:43:33 INFO output.FileOutputCommitter: Saved output of task 'attempt_local636254_0001_m_000000_0' to hdfs://localhost:9000/user/hduser/rand/_temporary/0/task_local636254_0001_m_000000
--------------- 所有的範例 命令----------------------------------------------------
An example program must be given as the first argument.
Valid program names are:
1.
aggregatewordcount: An Aggregate based map/reduce program that counts the words in the input files.
2.
aggregatewordhist: An Aggregate based map/reduce program that computes the histogram of the words in the input files.
3.
bbp: A map/reduce program that uses Bailey-Borwein-Plouffe to compute exact digits of Pi.
4.
dbcount: An example job that count the pageview counts from a database.
5.
distbbp: A map/reduce program that uses a BBP-type formula to compute exact bits of Pi.
6.
grep: A map/reduce program that counts the matches of a regex in the input.
7.
join: A job that effects a join over sorted, equally partitioned datasets
8.
multifilewc: A job that counts words from several files.
9.
pentomino: A map/reduce tile laying program to find solutions to pentomino problems.
10.
pi: A map/reduce program that estimates Pi using a quasi-Monte Carlo method.
11.
randomtextwriter: A map/reduce program that writes 10GB of random textual data per node.
12.
randomwriter: A map/reduce program that writes 10GB of random data per node.
13.
secondarysort: An example defining a secondary sort to the reduce.
14. --> done 5.19
sort: A map/reduce program that sorts the data written by the random writer.
15.
sudoku: A sudoku solver.
16.
teragen: Generate data for the terasort
17.
terasort: Run the terasort
18.
teravalidate: Checking results of terasort
19.
wordcount: A map/reduce program that counts the words in the input files.
20.
wordmean: A map/reduce program that counts the average length of the words in the input files.
21.
wordmedian: A map/reduce program that counts the median length of the words in the input files.
22.
wordstandarddeviation: A map/reduce program that counts the standard deviation of the length of the words in the input files.

No comments:
Post a Comment