hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jak <jakheart...@hotmail.com>
Subject KeyValueInputFormat Inputformat in showing error "cannot find symbol"
Date Tue, 08 Jun 2010 15:00:40 GMT
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
                                                                             



Mime
View raw message