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 Matthias Scherer <Ma...@1und1.de> on 2009/11/26 16:10:27 UTC

KeyValueTextInputFormat and Hadoop 0.20.1

Hi,

I started my first experimental Hadoop project with Hadoop 0.20.1 an run
in the following problem:

Job job = new Job(new Configuration(),"Myjob");
job.setInputFormatClass(KeyValueTextInputFormat.class);

The last line throws the following error: "The method
setInputFormatClass(Class<? extends InputFormat>) in the type Job is not
applicable for the arguments (Class<KeyValueTextInputFormat>)"

Job.setInputFormatClass expects a subclass of the new class
org.apache.hadoop.mapreduce.InputFormat. But KeyValueTextInputFormat is
only available as subclass of the deprecated
org.apache.hadoop.mapred.FileInputFormat.

Is there a way to use KeyValueTextInputFormat with the new classes Job
and Configuration?

Thanks,
Matthias

Re: KeyValueTextInputFormat and Hadoop 0.20.1

Posted by Jeff Zhang <zj...@gmail.com>.
It's in trunk, maybe this is not added in hadoop 0.20.1



On Thu, Nov 26, 2009 at 8:13 AM, Matthias Scherer <Matthias.Scherer@1und1.de
> wrote:

> Sorry, but I can't find it in the version control system for release
> 0.20.1:
> http://svn.apache.org/repos/asf/hadoop/common/tags/release-0.20.1/src/mapred/org/apache/hadoop/mapreduce/lib/input/
>
> Du you have another distribution?
>
> Regards,
> Matthias
>
>
> > -----Ursprüngliche Nachricht-----
> > Von: Jeff Zhang [mailto:zjffdu@gmail.com]
> > Gesendet: Donnerstag, 26. November 2009 16:35
> > An: common-user@hadoop.apache.org
> > Betreff: Re: KeyValueTextInputFormat and Hadoop 0.20.1
> >
> > There's a KeyValueInputFormat under package
> > org.apache.hadoop.mapreduce.lib.input
> > which is for hadoop new API
> >
> >
> > Jeff Zhang
> >
> >
> > On Thu, Nov 26, 2009 at 7:10 AM, Matthias Scherer
> > <Matthias.Scherer@1und1.de
> > > wrote:
> >
> > > Hi,
> > >
> > > I started my first experimental Hadoop project with Hadoop
> > 0.20.1 an
> > > run in the following problem:
> > >
> > > Job job = new Job(new Configuration(),"Myjob");
> > > job.setInputFormatClass(KeyValueTextInputFormat.class);
> > >
> > > The last line throws the following error: "The method
> > > setInputFormatClass(Class<? extends InputFormat>) in the
> > type Job is
> > > not applicable for the arguments (Class<KeyValueTextInputFormat>)"
> > >
> > > Job.setInputFormatClass expects a subclass of the new class
> > > org.apache.hadoop.mapreduce.InputFormat. But
> > KeyValueTextInputFormat
> > > is only available as subclass of the deprecated
> > > org.apache.hadoop.mapred.FileInputFormat.
> > >
> > > Is there a way to use KeyValueTextInputFormat with the new
> > classes Job
> > > and Configuration?
> > >
> > > Thanks,
> > > Matthias
> > >
> >
>

Re: AW: KeyValueTextInputFormat and Hadoop 0.20.1

Posted by Rekha Joshi <re...@yahoo-inc.com>.
https://issues.apache.org/jira/browse/MAPREDUCE-655 fixed in version 0.21.0

On 11/26/09 9:43 PM, "Matthias Scherer" <Ma...@1und1.de> wrote:

Sorry, but I can't find it in the version control system for release 0.20.1: http://svn.apache.org/repos/asf/hadoop/common/tags/release-0.20.1/src/mapred/org/apache/hadoop/mapreduce/lib/input/

Du you have another distribution?

Regards,
Matthias


> -----Ursprüngliche Nachricht-----
> Von: Jeff Zhang [mailto:zjffdu@gmail.com]
> Gesendet: Donnerstag, 26. November 2009 16:35
> An: common-user@hadoop.apache.org
> Betreff: Re: KeyValueTextInputFormat and Hadoop 0.20.1
>
> There's a KeyValueInputFormat under package
> org.apache.hadoop.mapreduce.lib.input
> which is for hadoop new API
>
>
> Jeff Zhang
>
>
> On Thu, Nov 26, 2009 at 7:10 AM, Matthias Scherer
> <Matthias.Scherer@1und1.de
> > wrote:
>
> > Hi,
> >
> > I started my first experimental Hadoop project with Hadoop
> 0.20.1 an
> > run in the following problem:
> >
> > Job job = new Job(new Configuration(),"Myjob");
> > job.setInputFormatClass(KeyValueTextInputFormat.class);
> >
> > The last line throws the following error: "The method
> > setInputFormatClass(Class<? extends InputFormat>) in the
> type Job is
> > not applicable for the arguments (Class<KeyValueTextInputFormat>)"
> >
> > Job.setInputFormatClass expects a subclass of the new class
> > org.apache.hadoop.mapreduce.InputFormat. But
> KeyValueTextInputFormat
> > is only available as subclass of the deprecated
> > org.apache.hadoop.mapred.FileInputFormat.
> >
> > Is there a way to use KeyValueTextInputFormat with the new
> classes Job
> > and Configuration?
> >
> > Thanks,
> > Matthias
> >
>


AW: KeyValueTextInputFormat and Hadoop 0.20.1

Posted by Matthias Scherer <Ma...@1und1.de>.
Sorry, but I can't find it in the version control system for release 0.20.1: http://svn.apache.org/repos/asf/hadoop/common/tags/release-0.20.1/src/mapred/org/apache/hadoop/mapreduce/lib/input/

Du you have another distribution?

Regards,
Matthias
 

> -----Ursprüngliche Nachricht-----
> Von: Jeff Zhang [mailto:zjffdu@gmail.com] 
> Gesendet: Donnerstag, 26. November 2009 16:35
> An: common-user@hadoop.apache.org
> Betreff: Re: KeyValueTextInputFormat and Hadoop 0.20.1
> 
> There's a KeyValueInputFormat under package 
> org.apache.hadoop.mapreduce.lib.input
> which is for hadoop new API
> 
> 
> Jeff Zhang
> 
> 
> On Thu, Nov 26, 2009 at 7:10 AM, Matthias Scherer 
> <Matthias.Scherer@1und1.de
> > wrote:
> 
> > Hi,
> >
> > I started my first experimental Hadoop project with Hadoop 
> 0.20.1 an 
> > run in the following problem:
> >
> > Job job = new Job(new Configuration(),"Myjob"); 
> > job.setInputFormatClass(KeyValueTextInputFormat.class);
> >
> > The last line throws the following error: "The method 
> > setInputFormatClass(Class<? extends InputFormat>) in the 
> type Job is 
> > not applicable for the arguments (Class<KeyValueTextInputFormat>)"
> >
> > Job.setInputFormatClass expects a subclass of the new class 
> > org.apache.hadoop.mapreduce.InputFormat. But 
> KeyValueTextInputFormat 
> > is only available as subclass of the deprecated 
> > org.apache.hadoop.mapred.FileInputFormat.
> >
> > Is there a way to use KeyValueTextInputFormat with the new 
> classes Job 
> > and Configuration?
> >
> > Thanks,
> > Matthias
> >
> 

Re: KeyValueTextInputFormat and Hadoop 0.20.1

Posted by Jeff Zhang <zj...@gmail.com>.
There's a KeyValueInputFormat under package
org.apache.hadoop.mapreduce.lib.input
which is for hadoop new API


Jeff Zhang


On Thu, Nov 26, 2009 at 7:10 AM, Matthias Scherer <Matthias.Scherer@1und1.de
> wrote:

> Hi,
>
> I started my first experimental Hadoop project with Hadoop 0.20.1 an run
> in the following problem:
>
> Job job = new Job(new Configuration(),"Myjob");
> job.setInputFormatClass(KeyValueTextInputFormat.class);
>
> The last line throws the following error: "The method
> setInputFormatClass(Class<? extends InputFormat>) in the type Job is not
> applicable for the arguments (Class<KeyValueTextInputFormat>)"
>
> Job.setInputFormatClass expects a subclass of the new class
> org.apache.hadoop.mapreduce.InputFormat. But KeyValueTextInputFormat is
> only available as subclass of the deprecated
> org.apache.hadoop.mapred.FileInputFormat.
>
> Is there a way to use KeyValueTextInputFormat with the new classes Job
> and Configuration?
>
> Thanks,
> Matthias
>