hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Harsh J <ha...@cloudera.com>
Subject Re: UDF compiling
Date Thu, 12 Apr 2012 18:49:01 GMT
The right command for javac usage in your case is:

javac -classpath /usr/lib/hadoop/hadoop-core-0.20.2-cdh3u3.jar:. WordCount.java

You need "." for javac to find the other class files/sources within
the same dir.

On Fri, Apr 13, 2012 at 12:12 AM, Barry, Sean F <sean.f.barry@intel.com> wrote:
> I am trying to compiling a customized WordCount UDF but I get this cannot
> find symbol error when I compile. And I'm not sure how to resolve this
> issue.
>
> hduser@master:~> javac -classpath
> /usr/lib/hadoop/hadoop-core-0.20.2-cdh3u3.jar WordCount.java
> WordCount.java:24: error: cannot find symbol
>                conf.setMapperClass(WordMapper.class);
>                                    ^
>  symbol:   class WordMapper
>  location: class WordCount
> WordCount.java:25: error: cannot find symbol
>                conf.setReducerClass(SumReducer.class);
>                                     ^
>  symbol:   class SumReducer
>  location: class WordCount
> 2 errors
>
>
>
> hduser@master:~> ls
>  SumReducer.class        WordMapper.class
>  SumReducer.java          WordCount.java  WordMapper.java
> hduser@master:~>
>
>



-- 
Harsh J

Mime
View raw message