mardi 2 juin 2015

Error in running sample mapreduce java program on AWS EMR using putty

I am trying to use AWS EMR cluster using putty. I am trying sample java program for word count.

Using this command and getting 15 errors. Do I need to install some package or set some classpath.

javac -classpath /home/hadoop/.versions/2.4.0-amzn-3/share/hadoop/common/hadoop-common-2.4.0-amzn-3.jar -d wordcount_classes WordCount.java

WordCount.java:9: error: package org.apache.hadoop.mapred does not exist import org.apache.hadoop.mapred.*; ^ WordCount.java:15: error: cannot find symbol public static class Map extends MapReduceBase implements Mapper { ^ symbol: class MapReduceBase location: class WordCount WordCount.java:15: error: cannot find symbol public static class Map extends MapReduceBase implements Mapper { ^ symbol: class Mapper location: class WordCount WordCount.java:19: error: cannot find symbol public void map(LongWritable key, Text value, OutputCollector output, Reporter reporter) throws IOException { ^ symbol: class OutputCollector location: class Map WordCount.java:19: error: cannot find symbol public void map(LongWritable key, Text value, OutputCollector output, Reporter reporter) throws IOException { ^ symbol: class Reporter location: class Map WordCount.java:29: error: cannot find symbol public static class Reduce extends MapReduceBase implements Reducer { ^ symbol: class MapReduceBase location: class WordCount WordCount.java:29: error: cannot find symbol public static class Reduce extends MapReduceBase implements Reducer { ^ symbol: class Reducer location: class WordCount WordCount.java:30: error: cannot find symbol public void reduce(Text key, Iterator values, OutputCollector output, Reporter reporter) throws IOException {

hadoop version

Hadoop 2.4.0-amzn-3 Subversion http://ift.tt/lurlOe -r d99c64d21bf338dcdd524bd08d7c393b6d1ac1d8 Compiled by Elastic MapReduce on 2015-02-11T20:22Z Compiled with protoc 2.5.0 From source with checksum 6c725e3b3ecb9592e4617fccf This command was run using /home/hadoop/.versions/2.4.0-amzn-3/share/hadoop/common/hadoop-common-2.4.0-amzn-3.jar

$ echo $PATH

/home/hadoop/pig/bin:/usr/local/cuda/bin:/usr/java/latest/bin:/home/hadoop/bin:/home/hadoop/mahout/bin:/home/hadoop/hive/bin:/home/hadoop/hbase/bin:/home/hadoop/impala/bin:/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/aws/bin:/home/hadoop/cascading/tools/multitool-20140224/bin:/home/hadoop/cascading/tools/load-20140223/bin:/home/hadoop/cascading/tools/lingual-client/bin:/home/hadoop/cascading/driven/bin




Aucun commentaire:

Enregistrer un commentaire