Reply
Highlighted
New Contributor
Posts: 1
Registered: ‎02-06-2015

problem wordcount tutorial CDH 5

Hello

 

I am using the free demo of cloudera on GoGrid (CDH5)

 

and cannot seem to make the WordCount tutorial work http://www.cloudera.com/content/cloudera/en/documentation/HadoopTutorial/CDH4/Hadoop-Tutorial/ht_wor...

 

I have tried many approaches. I read somewhere that the tutorial was for an old version of CDH hence you needed to change the code:

https://cloudcelebrity.wordpress.com/2011/12/31/hadoop-wordcount-compilation-errors-related-with-out...

 

So I changed the code

 

But even with that it does'nt work.

 

I want to compile using a command like

assuming I put the WordCount.java code in the folder /TEST/wordcount_classes I go to this folder and do

 

javac -classpath /usr/lib/hadoop/client-0.20/\* WordCount.java

 

but it fails producing an error of the type:

 


WordCount.java:51: cannot find symbol
symbol : variable FileOutputFormat
location: class org.myorg.AvkashWordCount
FileOutputFormat.setOutputPath(job, new Path(args[1]));
^
45 errors

 

 

What am I doing wrong ??

 

 

Thanks so much

Cloudera Employee
Posts: 435
Registered: ‎07-12-2013

Re: problem wordcount tutorial CDH 5

In addition to any differences between CDH 4 and 5, you're also using
parcels instead of RPM packages. This means that any reference to /usr/lib
should be replaced with /opt/cloudera/parcels/CDH/lib.

Announcements