hadoop-common-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ted Yu <yuzhih...@gmail.com>
Subject Re: KeyValueInputFormat Inputformat in showing error "cannot find symbol"
Date Wed, 09 Jun 2010 18:29:19 GMT
See:
http://www.mail-archive.com/common-user@hadoop.apache.org/msg03280.html

On Tue, Jun 8, 2010 at 8:00 AM, Jak <jakheart001@hotmail.com> 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
>
>
>
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message