wordcount
次のよう
に、なしで実行してみてください。hadoop jar /usr/local/hadoop/hadoop-examples-1.1.2.jar input output
次のようなものを受け取ります。
Unknown program 'input' chosen.
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.
dbcount: An example job that count the pageview counts from a database.
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 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.
sleep: A job that sleeps at each map and reduce task.
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.
したがって、基本的に最初の引数はメインクラス名ではなく、実行するサンプルプログラムの名前です。
だから、それは受け入れるべきWordCount
ではありません、それは私のためではありません. 次のコマンドは、上記と同じ結果になります。
bin/hadoop jar hadoop-examples-1.0.4.jar WordCount LICENSE.txt output
参考までに:META-INF/MANIFEST.MF
main-class は、jar に含まれるファイル
で既に定義されています。Main-Class: org/apache/hadoop/examples/ExampleDriver