Return-Path: X-Original-To: apmail-hadoop-common-dev-archive@www.apache.org Delivered-To: apmail-hadoop-common-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 186B2EB79 for ; Mon, 18 Mar 2013 01:58:20 +0000 (UTC) Received: (qmail 33003 invoked by uid 500); 18 Mar 2013 01:58:18 -0000 Delivered-To: apmail-hadoop-common-dev-archive@hadoop.apache.org Received: (qmail 32787 invoked by uid 500); 18 Mar 2013 01:58:18 -0000 Mailing-List: contact common-dev-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-dev@hadoop.apache.org Delivered-To: mailing list common-dev@hadoop.apache.org Received: (qmail 32778 invoked by uid 99); 18 Mar 2013 01:58:18 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Mar 2013 01:58:18 +0000 X-ASF-Spam-Status: No, hits=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of harsh@cloudera.com designates 209.85.223.181 as permitted sender) Received: from [209.85.223.181] (HELO mail-ie0-f181.google.com) (209.85.223.181) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 18 Mar 2013 01:58:14 +0000 Received: by mail-ie0-f181.google.com with SMTP id 17so6458303iea.12 for ; Sun, 17 Mar 2013 18:57:53 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=x-received:mime-version:in-reply-to:references:from:date:message-id :subject:to:content-type:x-gm-message-state; bh=7mUgIGnwCR3GPTxGOFEb8zge/xj1Eg8SuxbQXSF1Qiw=; b=lHX+vAKMbxPKNCSgcttPErPxBC3jFnm0xtlbroAvEGN6qFlzdLcr1eM6NyMRENKNGT J/fMWPsfAugVUyYun3dtl2AewYIRql4huLHBXs3Tycq/wikKcTP6QXVqSip5+NfOLL7C H5w2uCTO1d7WgRUjBdS8PkO/D5WorsXSVh6VFp4D2guarD7qrzlJBdJX88XFQrOK8yWS bwK+47jdJuIrwhkcQMkOvNGbLWeFn/rrqH/JPPQZKmi8gOT15zUVEuOjoYpktDtKNoca wm5zXymZh0i+3V2y6ThfahG/3psNSRaXJgTgUSI61FgxddX7Bsrnj1fc455Wqk2DAaN/ byUQ== X-Received: by 10.42.148.71 with SMTP id q7mr8141951icv.53.1363571873576; Sun, 17 Mar 2013 18:57:53 -0700 (PDT) MIME-Version: 1.0 Received: by 10.50.181.198 with HTTP; Sun, 17 Mar 2013 18:57:33 -0700 (PDT) In-Reply-To: <4f482037.e5df.13d7b32544d.Coremail.springring@126.com> References: <190fc5fd.121dd.13d6d57947e.Coremail.springring@126.com> <4f482037.e5df.13d7b32544d.Coremail.springring@126.com> From: Harsh J Date: Mon, 18 Mar 2013 07:27:33 +0530 Message-ID: Subject: Re: Re: how to define new InputFormat with streaming? To: "common-dev@hadoop.apache.org" Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQkbeoftt1QWFpi6548kc+CxEQXnZtomHivK5yFDG0W57BFcwNDdx+aT+7vFwY2q7FemgvRp X-Virus-Checked: Checked by ClamAV on apache.org It isn't as easy as changing that import line: > package org.apache.hadoop.mapred.lib.input does not exist The right package is package org.apache.hadoop.mapred. On Mon, Mar 18, 2013 at 7:22 AM, springring wrote: > thanks > I modify the java file with old "mapred" API, but there is still error > > javac -classpath /usr/lib/hadoop/hadoop-core-0.20.2-cdh3u3.jar:/usr/lib/hadoop/lib/* -d class9 ./*.java > ./WholeFileInputFormat.java:16: error: package org.apache.hadoop.mapred.lib.input does not exist > import org.apache.hadoop.mapred.lib.input.*; > > does it because hadoop-0.20.2-cdh3u3 not include "mapred" API? > > > > > > > At 2013-03-17 14:22:43,"Harsh J" wrote: >>The issue is that Streaming expects the old/stable MR API >>(org.apache.hadoop.mapred.InputFormat) as its input format class, but your >>WholeFileInputFormat is using the new MR API >>(org.apache.hadoop.mapreduce.lib.input.InputFormat). Using the older form >>will let you pass. >> >>This has nothing to do with your version/distribution of Hadoop. >> >> >>On Fri, Mar 15, 2013 at 4:28 PM, Steve Loughran wrote: >> >>> On 15 March 2013 09:18, springring wrote: >>> >>> > Hi, >>> > >>> > my hadoop version is Hadoop 0.20.2-cdh3u3 and I want to define new >>> > InputFormat in hadoop book , but there is error >>> > "class org.apache.hadoop.streaming.WholeFileInputFormat not >>> > org.apache.hadoop.mapred.InputFormat" >>> > >>> > Hadoop version is 0.20, but the streaming still depend on 0.10 mapred >>> api? >>> > >>> >>> >>> 1. please don't spam all the lists >>> 2. grab a later version of the apache releases if you want help on them on >>> these mailing lists, or go to the cloudera lists, where they will probably >>> say "upgrade to CDH 4.x" before asking questions. >>> >>> thanks >>> >> >> >> >>-- >>Harsh J -- Harsh J