FAQ
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

Search Discussions

  • Jeff Zhang at Nov 26, 2009 at 3:35 pm
    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 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
  • Matthias Scherer at Nov 26, 2009 at 4:13 pm
    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
    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
  • Jeff Zhang at Nov 26, 2009 at 4:18 pm
    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 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
    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
  • Rekha Joshi at Nov 27, 2009 at 12:18 pm
    https://issues.apache.org/jira/browse/MAPREDUCE-655 fixed in version 0.21.0

    On 11/26/09 9:43 PM, "Matthias Scherer" 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
    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

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-user @
categorieshadoop
postedNov 26, '09 at 3:10p
activeNov 27, '09 at 12:18p
posts5
users3
websitehadoop.apache.org...
irc#hadoop

People

Translate

site design / logo © 2022 Grokbase