Return-Path: X-Original-To: apmail-hadoop-common-user-archive@www.apache.org Delivered-To: apmail-hadoop-common-user-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 258EBEB50 for ; Sun, 3 Feb 2013 10:20:37 +0000 (UTC) Received: (qmail 79803 invoked by uid 500); 3 Feb 2013 10:20:32 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 79249 invoked by uid 500); 3 Feb 2013 10:20:30 -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 79227 invoked by uid 99); 3 Feb 2013 10:20:29 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Feb 2013 10:20:29 +0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of balijamahesh.mca@gmail.com designates 209.85.217.180 as permitted sender) Received: from [209.85.217.180] (HELO mail-lb0-f180.google.com) (209.85.217.180) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 03 Feb 2013 10:20:21 +0000 Received: by mail-lb0-f180.google.com with SMTP id q12so5878868lbc.11 for ; Sun, 03 Feb 2013 02:20:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=VGqPveUybGDPGeQgAK5jJaPy+FI9kGQorE/KnltpRRw=; b=dVMvo6f0V9tRBZpF0dDsAaaGiz2hsRBWll1O0h5iceYAAcnJvyql1NtpIIF5Bo2ZTx Ov/aj4NJf9ObqnKVMhRAySGuEOBVLMmG/nc/tk6wUQzcno1M18g6fcQhEYAgvswNXwAi YPrTj0sFcuJgawkw6V8PHW9KnXpn8qUuJMwcvwiOMuyMbPymzR3EDMsokYwZIsF/W+fW QIoiaEruFom8YM9gX+FWgxzfZTWXTxwmNiubpAJCDGjyLSt7uyJM3JOOHfSSFX1nI+4t UC5o3GtWhe3KByVQTYSf2XrPXOkKakJ1SjjAxpU1dIedKLXapscxSZ1wwxwAfpnv/R/h S9vg== MIME-Version: 1.0 X-Received: by 10.152.109.210 with SMTP id hu18mr15758093lab.12.1359886801119; Sun, 03 Feb 2013 02:20:01 -0800 (PST) Received: by 10.112.74.198 with HTTP; Sun, 3 Feb 2013 02:20:01 -0800 (PST) In-Reply-To: References: Date: Sun, 3 Feb 2013 15:50:01 +0530 Message-ID: Subject: Re: SequenceFileOutputFormat - Wrong Key Class From: Mahesh Balija To: user@hadoop.apache.org Content-Type: multipart/alternative; boundary=bcaec54eeec2b728eb04d4cf516c X-Virus-Checked: Checked by ClamAV on apache.org --bcaec54eeec2b728eb04d4cf516c Content-Type: text/plain; charset=ISO-8859-1 Hi Murthy, Your InputFormat will have the LongWritable as Key and in your code you might be trying to read it as the Text rather than LongWritable that causes this issue. Some InputFormats will have predefined key value pairs like TextInputFormat will have Object, Text as key, value. You should get to know through the API documentation. So make sure that you are using right key value pairs. Thanks, Mahesh Balija, CalsoftLabs. On Fri, Feb 1, 2013 at 10:41 PM, Anbarasan Murthy wrote: > I am getting the following Exception message when i try to output Text as > my output key and SequenceFileOutputFormat as the output format > > java.io.IOException: wrong key class: org.apache.hadoop.io.Text is not > class org.apache.hadoop.io.LongWritable > > > Need help from hadoop community. > > > > --bcaec54eeec2b728eb04d4cf516c Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Hi Murthy,

=A0=A0=A0=A0=A0=A0=A0=A0=A0=A0 Your InputFormat will have= the LongWritable as Key and in your code you might be trying to read it as= the Text rather than LongWritable that causes this issue.
=A0=A0=A0=A0= =A0=A0=A0=A0=A0=A0 Some InputFormats will have predefined key value pairs l= ike TextInputFormat will have Object, Text as key, value. You should get to= know through the API documentation.
=A0 =A0 =A0 =A0 =A0=A0 So make sure that you are using right key value pair= s.

Thanks,
Mahesh Balija,
CalsoftLabs.

On Fri, Feb 1, 2013 at 10:41 PM, Anbarasan Murthy <anbu9= 92003@hotmail.com> wrote:
I am getting the following Exception message when i t= ry to output Text as my output key and SequenceFileOutputFormat as the outp= ut format
java.io.IOException: wron=
g key class: org.apache.hadoop.io.Text is not=20
class org.apache.hadoop.io.LongWritable

Need help from hadoop c=
ommunity.



--bcaec54eeec2b728eb04d4cf516c--