See: http://www.mail-archive.com/[email protected]/msg03280.html
On Tue, Jun 8, 2010 at 8:00 AM, Jak <[email protected]> wrote: > Hi All, > I newbie to hadoop, Actually i followed the tutorial, configured and worked > with > wordcount example. it is worked great. I read yahoo developer tutorial in > module > 4, they mentioned input format. when i tried this format > "KeyValueInputFormat" i > got the following error while compiling the java code with javac compiler, > Iam Stuck Help ,me on this, Thanks in advance,Jak > > Source Code : > ============= > > public static void main(String[] args) throws Exception { > JobConf conf = new JobConf(WordCount.class); > conf.setJobName("wordcount"); > conf.setOutputKeyClass(Text.class); > conf.setOutputValueClass(IntWritable.class); > conf.setMapperClass(Map.class); > conf.setCombinerClass(Reduce.class); > conf.setReducerClass(Reduce.class); > // conf.setInputFormat(TextInputFormat.class); > // conf.setOutputFormat(TextOutputFormat.class); > conf.setInputFormat(KeyValueInputFormat.class); > conf.setOutputFormat(KeyValueInputFormat.class); > FileInputFormat.setInputPaths(conf, new Path(args[0])); > FileOutputFormat.setOutputPath(conf, new Path(args[1])); > JobClient.runJob(conf); > } > } > Error When I compile : > ====================== > Arunexmples1/WordCount.java:53: cannot find symbol > symbol : class KeyValueInputFormat > location: class WordCount > conf.setInputFormat(KeyValueInputFormat.class); > ^ > Arunexmples1/WordCount.java:54: cannot find symbol > symbol : class KeyValueInputFormat > location: class WordCount > conf.setOutputFormat(KeyValueInputFormat.class); > ^ > Note: Arunexmples1/WordCount.java uses or overrides a deprecated API. > Note: Recompile with -Xlint:deprecation for details. > 2 errors > > > >
