Solution to running errors in standalone mode in Hadoop Quick Start

Source: Internet
Author: User
I tried Hadoop and did not expect to follow the tutorial. The first example reported an error ...... Error: $ binhadoopjarhadoop-mapred-examples-0.21.0.jargrepinputoutputdfs [a-z.] + Exceptioninthreadmainjava. io. IOException: erropeningjobjar: hadoop-mapred-ex

I tried Hadoop and did not expect to follow the tutorial. The first example reported an error ......

The error is as follows:

$ Bin/hadoop jar hadoop-maprEd-ExAmples-0.21.0.jarGrepInput output'DfS [a-z.] +'

Exception in thread "main" java. io. IOException: Error opening job jar: hadoop-mapred-examples-0.21.0.jar

At org. apache. hadoop. util. RunJar. main (RunJar. java: 90)

CauSedBy: java. util.Zip. ZipException: error in opening zipFile

At java.util.zip. ZipFile. open (Native Method)

At java.util.zip. ZipFile. (ZipFile. java: 127)

At java. util. jar. JarFile. (JarFile. java: 135)

At java. util. jar. JarFile. (JarFile. java: 72)

At org. apache. hadoop. util. RunJar. main (RunJar. java: 88)

A closer look, java.util.zip. ZipException is an exception that cannot be found in the file. The main reason is that the hadoop-mapred-examples-0.21.0.jar cannot be located. The solution is very simple.

1) configure the environment variables first (if you are operating in the hadoop home directory, you can try it)

$ Vim/etc/profile

Add these two rows

ExportHADOOP_HOME =/home/linrui/programfiles/dev/hadoop-0.20.203.0

Export HADOOP_CONF_DIR = $ HADOOP_HOME/conf

2) Go To The hadoop_home directory and check the jar package (this package exists, but the name may not be the same). Then write the name accurately.

Then run ~ Everything is OK!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.