Return-Path: Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: (qmail 56053 invoked from network); 16 Feb 2011 11:02:35 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 16 Feb 2011 11:02:35 -0000 Received: (qmail 85712 invoked by uid 500); 16 Feb 2011 11:02:35 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 85382 invoked by uid 500); 16 Feb 2011 11:02:32 -0000 Mailing-List: contact mapreduce-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: mapreduce-user@hadoop.apache.org Delivered-To: mailing list mapreduce-user@hadoop.apache.org Received: (qmail 85370 invoked by uid 99); 16 Feb 2011 11:02:31 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 11:02:31 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=FREEMAIL_FROM,HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS,T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of wenhao.xu@gmail.com designates 209.85.214.176 as permitted sender) Received: from [209.85.214.176] (HELO mail-iw0-f176.google.com) (209.85.214.176) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 16 Feb 2011 11:02:24 +0000 Received: by iwn2 with SMTP id 2so1236605iwn.35 for ; Wed, 16 Feb 2011 03:02:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:date:message-id:subject:from:to :content-type; bh=ecsQNRxJJtp1oM7P8oa43O7GIkYK1QjgKai2/SnvWbE=; b=Ru7Zo/qeOJxkjeI6pNKdiEYQ2n7vis3xTFYT+R9xyoFdJm0l0MDS4B17DendDP2BzI +lX1PJxqvsaSstvWR0gJrS9iGMyTah10FaHS3QCqyhN21+9BN1T41FUhDZi7IVDfLmg8 fSPkAiwPFjx46yha4ncEVwVRl4mZhuDcSJ+g8= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=xNX1rLf7A/7e4iZSttbtxkhHw2j0JQtdOcwSYH3/5xLw/q2psTBOueP+WRdbGyFUz4 rqLEszj/MuoLUnajDPNObS/FIfS0EkbuWcUt1QR4gchiVJ2/7g09jwYado+V/ZbCmH+c k6VJb3MI3nG/mQtMHeysom4cxdtCf90fA2jtY= MIME-Version: 1.0 Received: by 10.42.230.137 with SMTP id jm9mr608519icb.256.1297854124416; Wed, 16 Feb 2011 03:02:04 -0800 (PST) Received: by 10.42.163.6 with HTTP; Wed, 16 Feb 2011 03:02:04 -0800 (PST) Date: Wed, 16 Feb 2011 19:02:04 +0800 Message-ID: Subject: Could we use different output Format for the Mapper and Combiner? From: Stanley Xu To: mapreduce-user@hadoop.apache.org Content-Type: multipart/alternative; boundary=20cf304346c60e5f1b049c6436ed --20cf304346c60e5f1b049c6436ed Content-Type: text/plain; charset=ISO-8859-1 Dear all, I am writing a map-reduce job today. Which I hope I could use different format for the Mapper and Combiner. I am using the Text as the format of the Mapper and MapWritable as the format of the format. But it looks the hadoop didn't support that yet? I have some code like the following: public class RawLogMapper extends Mapper { public class RawLogCombiner extends Reducer { job.setMapOutputKeyClass(Text.class); job.setMapOutputValueClass(Text.class); job.setOutputKeyClass(Text.class); job.setOutputValueClass(MapWritable.class); job.setOutputFormatClass(TextOutputFormat.class); But it failed and the logs told me that there are type mismatch. Is there anyway I could use different type for the VALUEOUT for the mapper and combiner? Thanks Best wishes, Xu Wenhao --20cf304346c60e5f1b049c6436ed Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Dear all,

I am writing a map-reduce job today. Which I h= ope I could use different format for the Mapper and Combiner. I am using th= e Text as the format of the Mapper and MapWritable as the format of the for= mat.

But it looks the hadoop didn't support that yet?

I have some code like the following:

<= /div>
public class RawLogMapper extends Mapper<LongWritable, Te= xt, Text, Text> {

public class RawLogCombiner extends Reducer<Tex= t, Text, Text, MapWritable> {

job.se= tMapOutputKeyClass(Text.class);
job.setMapOutputValueClass(Text.c= lass);

job.setOutputKeyClass(Text.class);
job.setOut= putValueClass(MapWritable.class);
job.setOutputFormatClass(TextOu= tputFormat.class);

But it failed and the log= s told me that there are type mismatch. Is there anyway I could use differe= nt type for the VALUEOUT for the mapper and combiner?

Thanks


= Best wishes,
Xu Wenhao
--20cf304346c60e5f1b049c6436ed--