Return-Path: X-Original-To: apmail-hadoop-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 5C0F5DAE0 for ; Wed, 21 Nov 2012 06:12:08 +0000 (UTC) Received: (qmail 81011 invoked by uid 500); 21 Nov 2012 06:12:02 -0000 Delivered-To: apmail-hadoop-user-archive@hadoop.apache.org Received: (qmail 80653 invoked by uid 500); 21 Nov 2012 06:12:01 -0000 Mailing-List: contact user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hadoop.apache.org Delivered-To: mailing list user@hadoop.apache.org Received: (qmail 80620 invoked by uid 99); 21 Nov 2012 06:12:00 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2012 06:12:00 +0000 X-ASF-Spam-Status: No, hits=2.7 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_REPLY,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of bharathvissapragada1990@gmail.com designates 209.85.220.48 as permitted sender) Received: from [209.85.220.48] (HELO mail-pa0-f48.google.com) (209.85.220.48) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 21 Nov 2012 06:11:54 +0000 Received: by mail-pa0-f48.google.com with SMTP id kp12so4883871pab.35 for ; Tue, 20 Nov 2012 22:11:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=hiESU+i7MjMP71UFNHj3nBanZUmsGeaem0hQLSfyWAw=; b=oKxm7ZRO1E5MuhQZLMW4cyh43rzdm8IzH5fatoILQDIreOup677zgj9hD2N+hv3q1K 9hMSvoLLCvt5Xt2tEa9h8y7dQ4hI0/BZuLBafHb89XbPtu0hKYmvfvYXI2tzuvxgskrz IAr2lKr+C9xN4PwEAEfMYBJQEXV/S10Eg5i7mn9gMxwNm0Z2/rgnI8nmMCF6Jvdr2eRc nh8nO5DGkV4gUDcOeNXFvKRZPdMggrbvEV/2Fs738AEd6dV4718d8kvbpjevqZkQ/LkC dWghEgQv6pwrD1gQ4aqMdkHbJnBo/gJLtZg1Li3eAEsa9vGA9h1pByvm/4nL/LP5PL1d SuJw== Received: by 10.69.3.161 with SMTP id bx1mr50975574pbd.91.1353478293020; Tue, 20 Nov 2012 22:11:33 -0800 (PST) MIME-Version: 1.0 Received: by 10.67.14.9 with HTTP; Tue, 20 Nov 2012 22:11:11 -0800 (PST) In-Reply-To: References: From: bharath vissapragada Date: Wed, 21 Nov 2012 11:41:11 +0530 Message-ID: Subject: Re: ISSUE while configuring ECLIPSE with MAP-REDUCE To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=047d7b5dadcedddf6d04cefb3865 X-Virus-Checked: Checked by ClamAV on apache.org --047d7b5dadcedddf6d04cefb3865 Content-Type: text/plain; charset=ISO-8859-1 Switch to the new api and use 'Job' class ! That should solve the problem! On Wed, Nov 21, 2012 at 11:24 AM, yogesh dhari wrote: > I am using Apache Hadoop-0.20.2 > > Regards > Yogesh Kumar > > ------------------------------ > From: yogeshdhari@live.com > To: user@hadoop.apache.org > Subject: ISSUE while configuring ECLIPSE with MAP-REDUCE > Date: Wed, 21 Nov 2012 11:17:42 +0530 > > > Hi Hadoop Champs, > > *I am facing this issue while trying to configure Eclipse with Map-Reduce. > * > > Exception in thread "main" java.lang.Error: Unresolved compilation > problems: > The method setInputFormat(Class) in the type > JobConf is not applicable for the arguments (Class) > The method setOutputFormat(Class) in the type > JobConf is not applicable for the arguments (Class) > The method setInputPaths(Job, String) in the type FileInputFormat is > not applicable for the arguments (JobConf, Path) > The method setOutputPath(Job, Path) in the type FileOutputFormat is > not applicable for the arguments (JobConf, Path) > > at TestDriver.main(TestDriver.java:30) > > > > > *I have these classes and flow pattern.* > > > import org.apache.hadoop.fs.Path; > import org.apache.hadoop.io.IntWritable; > import org.apache.hadoop.io.Text; > import org.apache.hadoop.mapred.JobClient; > import org.apache.hadoop.mapred.JobConf; > import org.apache.hadoop.mapred.Mapper; > import org.apache.hadoop.mapred.Reducer; > import org.apache.hadoop.mapreduce.lib.input.TextInputFormat; > import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat; > import org.apache.hadoop.mapreduce.lib.input.FileInputFormat; > import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat; > import org.apache.hadoop.mapreduce.lib.output.FileOutputCommitter; > > > > public class TestDriver { > > public static void main(String[] args) { > JobClient client = new JobClient(); > JobConf conf = new JobConf(TestDriver.class); > > // TODO: specify output types > conf.setOutputKeyClass(Text.class); > conf.setOutputValueClass(IntWritable.class); > > // TODO: specify input and output DIRECTORIES (not files) > //conf.setInputPath(new Path("src")); > //conf.setOutputPath(new Path("out")); > > * *conf.*setInputFormat*(TextInputFormat.class); * /* ERROR > shown is :: The method setInputFormat(Class) in > the type JobConf is not applicable for the arguments > (Class) */* > > conf.*setOutputFormat*(TextOutputFormat.class); * /* ERROR > shown is :: The method setOutputFormat(Class) in > the type JobConf is not applicable for the arguments > (Class)* */ > > FileInputFormat.*setInputPaths*(conf, new Path("In")); * /* ERROR > shown is :: The method setInputPaths(Job, String) in the type > FileInputFormat is not applicable for the arguments (JobConf, Path) */* > > > FileOutputFormat.*setOutputPath*(conf, new Path("Out")); * /* > ERROR shown is :: The method setOutputPath(Job, Path) in the type > FileOutputFormat is not applicable for the arguments (JobConf, Path) */ > * > > > // TODO: specify a mapper > > conf.setMapperClass(org.apache.hadoop.mapred.lib.IdentityMapper.class); > > // TODO: specify a reducer > > conf.setReducerClass(org.apache.hadoop.mapred.lib.IdentityReducer.class); > > client.setConf(conf); > try { > JobClient.runJob(conf); > } catch (Exception e) { > e.printStackTrace(); > } > } > > } > > > Please suggest & Help > > Thanks & Regards > Yogesh Kumar > > -- Regards, Bharath .V w:http://researchweb.iiit.ac.in/~bharath.v --047d7b5dadcedddf6d04cefb3865 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Switch to the new api and use 'Job' class ! That should solve the p= roblem!

On Wed, Nov 21, 2012 at 11:24 AM,= yogesh dhari <yogeshdhari@live.com> wrote:
I am using Apache Hadoop-0.20.2

Regards
Yogesh Kumar


From: yogeshdhari@live.com
To: user@hadoop.apache.org
Subject: ISSUE while configuring ECLIPSE with MAP-REDUCE
Date: Wed, 21 N= ov 2012 11:17:42 +0530


Hi Hadoop Champs,

I am facing this issue while trying to configur= e Eclipse with Map-Reduce.

Exception in thread "main" = java.lang.Error: Unresolved compilation problems:
=A0=A0=A0 The method = setInputFormat(Class<? extends InputFormat>) in the type JobConf is n= ot applicable for the arguments (Class<TextInputFormat>)
=A0=A0=A0 The method setOutputFormat(Class<? extends OutputFormat>) i= n the type JobConf is not applicable for the arguments (Class<TextOutput= Format>)
=A0=A0=A0 The method setInputPaths(Job, String) in the type = FileInputFormat is not applicable for the arguments (JobConf, Path)
=A0=A0=A0 The method setOutputPath(Job, Path) in the type FileOutputFormat = is not applicable for the arguments (JobConf, Path)

=A0=A0=A0 at Tes= tDriver.main(TestDriver.java:30)




I have these classes= and flow pattern.


import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.In= tWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop= .mapred.JobClient;
import org.apache.hadoop.mapred.JobConf;
import or= g.apache.hadoop.mapred.Mapper;
import org.apache.hadoop.mapred.Reducer;
import org.apache.hadoop.mapred= uce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.ou= tput.TextOutputFormat;
import org.apache.hadoop.mapreduce.lib.input.File= InputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import o= rg.apache.hadoop.mapreduce.lib.output.FileOutputCommitter;



p= ublic class TestDriver {

=A0=A0=A0 public static void main(String[] = args) {
=A0=A0=A0 =A0=A0=A0 JobClient client =3D new JobClient();
=A0=A0=A0 =A0= =A0=A0 JobConf conf =3D new JobConf(TestDriver.class);

=A0=A0=A0 =A0= =A0=A0 // TODO: specify output types
=A0=A0=A0 =A0=A0=A0 conf.setOutputK= eyClass(Text.class);
=A0=A0=A0 =A0=A0=A0 conf.setOutputValueClass(IntWri= table.class);

=A0=A0=A0 =A0=A0=A0 // TODO: specify input and output DIRECTORIES (not = files)
=A0=A0=A0 =A0=A0=A0 //conf.setInputPath(new Path("src")= );
=A0=A0=A0 =A0=A0=A0 //conf.setOutputPath(new Path("out"));<= br>=A0=A0=A0 =A0=A0=A0
=A0=A0=A0 =A0=A0=A0 conf.setInputFormat(TextInputFormat.class);=A0 /= * =A0 ERROR shown is :: The method setInputFormat(C= lass<? extends InputFormat>) in the type JobConf is not applicable fo= r the=A0 arguments (Class<TextInputFormat= >) */

=A0=A0=A0 =A0=A0=A0 conf.setOutputF= ormat(TextOutputFormat.class);=A0=A0 /*=A0 ERROR s= hown is :: The method setOutputFormat(Class<? ex= tends OutputFormat>) in the type JobConf is not applicable for the=A0 ar= guments (Class<TextOutputFormat>)=A0 */

=A0=A0=A0 =A0=A0=A0 FileInputFormat.setIn= putPaths(conf, new Path("In"));=A0 /* ERROR sho= wn is ::=A0 The method setInputPaths(Job, String) i= n the type FileInputFormat is not applicable for the arguments (JobConf, Pa= th)=A0 */


=A0=A0=A0 =A0=A0=A0 FileOutputFormat.= setOutputPath(conf, new Path("Out"));=A0 /* ERR= OR shown is :: The method setOutputPath(Job, Path) = in the type FileOutputFormat is not applicable for the arguments (JobConf, = Path)=A0=A0 */


=A0=A0=A0 =A0=A0=A0 // TODO: specify a mapper
=A0=A0=A0 =A0=A0= =A0 conf.setMapperClass(org.apache.hadoop.mapred.lib.IdentityMapper.class);=

=A0=A0=A0 =A0=A0=A0 // TODO: specify a reducer
=A0=A0=A0 =A0=A0= =A0 conf.setReducerClass(org.apache.hadoop.mapred.lib.IdentityReducer.class= );

=A0=A0=A0 =A0=A0=A0 client.setConf(conf);
=A0=A0=A0 =A0=A0=A0 try {<= br>=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 JobClient.runJob(conf);
=A0=A0=A0 =A0= =A0=A0 } catch (Exception e) {
=A0=A0=A0 =A0=A0=A0 =A0=A0=A0 e.printStac= kTrace();
=A0=A0=A0 =A0=A0=A0 }
=A0=A0=A0 }

}


Pleas= e suggest & Help

Thanks & Regards
Yogesh Kumar




--
Regards,
= Bharath .V
w:http://researchweb.iiit.ac.in/~bharath.v
--047d7b5dadcedddf6d04cefb3865--