Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chapter 2: MapReduce: hadoop command doesn't work without class package #35

Open
Tradunsky opened this issue Jul 17, 2018 · 7 comments
Open

Comments

@Tradunsky
Copy link

On the 25th page of the book there is a command to execute MaxTemperature map reduce job:

hadoop MaxTemperature input/ncdc/sample.txt output

with the execution logs output. However, as for my environment the execution result is different:

ERROR: MaxTemperature is not COMMAND nor fully qualified CLASSNAME.

After a quick look it turns out that it works only with class specified including package:

hadoop oldapi.MaxTemperature input/ncdc/sample.txt output

Not sure if it is something important, but want to highlight in the case somebody stumble as I did.

uname -a
Darwin viacheslavt-mac.local 17.6.0 Darwin Kernel Version 17.6.0: Tue May 8 15:22:16 PDT 2018; root:xnu-4570.61.1~1/RELEASE_X86_64 x86_64
hadoop version
Hadoop 3.0.3

@lthing
Copy link

lthing commented Aug 1, 2018

same error, thanks for reminding.

@cmestera
Copy link

According to latest hadoop shellcommand documentation, "the class must be part of the package":
http://hadoop.apache.org/docs/r3.1.1/hadoop-project-dist/hadoop-common/CommandsManual.html#CLASSNAME

Probably the error is happening only for newer versions of hadoop

@dpstart
Copy link

dpstart commented May 28, 2019

What if I want to run it with the new api?

@gyosh
Copy link

gyosh commented Aug 11, 2019

@dpstart I can run it with

hadoop jar hadoop-examples.jar MaxTemperature input/ncdc/sample.txt output

@datng2
Copy link

datng2 commented Aug 15, 2019

Confirm that the command by @gyosh works on new Hadoop version.

@yinhongyan
Copy link

@dpstart I can run it with

hadoop jar hadoop-examples.jar MaxTemperature input/ncdc/sample.txt output

it works!

@marvinb8930
Copy link

Same error, drove me crazy, chapter two and already struggling to follow the instructions. Thanks.
Both works for me, including the package as well as command by @gyosh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants