Ошибка - hadoop jar hadoop-*-examples.jar Exception in thread "main" java.io.IOException: Error opening job jar: hadoop
Primary tabs
Forums:
hadoop jar hadoop-*-examples.jar Exception in thread "main" java.io.IOException: Error opening job jar: hadoop-*-examples.jar at org.apache.hadoop.util.RunJar.main(RunJar.java:135) Caused by: java.util.zip.ZipException: error in opening zip file at java.util.zip.ZipFile.open(Native Method) at java.util.zip.ZipFile.<init>(ZipFile.java:127) at java.util.jar.JarFile.<init>(JarFile.java:135) at java.util.jar.JarFile.<init>(JarFile.java:72) at org.apache.hadoop.util.RunJar.main(RunJar.java:133) [training@localhost /]$ ^C [training@localhost /]$
То есть файл найти не удаётся чтобы справится с ней на нужно указать конкретное имя файла (hadoop-examples.jar) - переходим в папку где действительно лежит файл
например путь может быть таким:
cd /usr/lib/hadoop-0.20-mapreduce
и выполняем команду:
hadoop jar hadoop-examples.jar
(кстати, в моём случае, hadoop-examples.jar - это просто ярлык который ссылается - как-раз таки на конкретный файл с немного более сложным именем hadoop-examples-2.0.0-mr1-cdh4.1.1.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. 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.
- Log in to post comments
- 3177 reads