You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-user@hadoop.apache.org by Ted Yu <yu...@gmail.com> on 2010/06/09 20:29:19 UTC

Re: KeyValueInputFormat Inputformat in showing error "cannot find symbol"

See:
http://www.mail-archive.com/common-user@hadoop.apache.org/msg03280.html

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

RE: KeyValueInputFormat Inputformat in showing error "cannot find symbol"

Posted by Ankit Bhatnagar <ab...@vantage.com>.
Whats' your hadoop version.

Ankit


-----Original Message-----
From: Ted Yu [mailto:yuzhihong@gmail.com] 
Sent: Wednesday, June 09, 2010 2:29 PM
To: common-user@hadoop.apache.org
Subject: Re: KeyValueInputFormat Inputformat in showing error "cannot find symbol"

See:
http://www.mail-archive.com/common-user@hadoop.apache.org/msg03280.html

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