Return-Path: X-Original-To: apmail-hbase-user-archive@www.apache.org Delivered-To: apmail-hbase-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 D8FED732B for ; Tue, 26 Jul 2011 17:45:18 +0000 (UTC) Received: (qmail 33779 invoked by uid 500); 26 Jul 2011 17:45:17 -0000 Delivered-To: apmail-hbase-user-archive@hbase.apache.org Received: (qmail 33657 invoked by uid 500); 26 Jul 2011 17:45:16 -0000 Mailing-List: contact user-help@hbase.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@hbase.apache.org Delivered-To: mailing list user@hbase.apache.org Received: (qmail 33649 invoked by uid 99); 26 Jul 2011 17:45:16 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2011 17:45:16 +0000 X-ASF-Spam-Status: No, hits=1.6 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,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 knarayanan88@gmail.com designates 209.85.218.41 as permitted sender) Received: from [209.85.218.41] (HELO mail-yi0-f41.google.com) (209.85.218.41) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 26 Jul 2011 17:45:10 +0000 Received: by yia13 with SMTP id 13so569581yia.14 for ; Tue, 26 Jul 2011 10:44:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; bh=hw6v2qy95O4QoyRlbYfeVkBhPvZBv6C3azucc8DuKfs=; b=DHQ9E3dQJmGls9RZthejGhM6zMxKBVFYyXimrUEIjJQy8ZGv/28p12o/Lg7Wm4PfFF ERKYIU+tbZW7fvJmLwJW1FpKNZQHPpyY2MPHhvrIvGkSgZ3F/FQVaHG6jWzWUGcHKc0q eBoYxfQ1ndnmuRL13a6C5CbsiMcMrXir0JCSY= MIME-Version: 1.0 Received: by 10.151.25.15 with SMTP id c15mr5629711ybj.125.1311702289530; Tue, 26 Jul 2011 10:44:49 -0700 (PDT) Received: by 10.150.230.3 with HTTP; Tue, 26 Jul 2011 10:44:49 -0700 (PDT) Date: Tue, 26 Jul 2011 23:14:49 +0530 Message-ID: Subject: MR on HBase - java.io.IOException: Pass a Delete or a Put From: Narayanan K To: user@hbase.apache.org Content-Type: multipart/alternative; boundary=000e0cd2916e04bf0a04a8fc7d77 --000e0cd2916e04bf0a04a8fc7d77 Content-Type: text/plain; charset=ISO-8859-1 Hi Everyone, I have been trying to run a mapreduce on HBase 0.20.2 - Source and Sink both being HBase Tables. On running this mapreduce code, the Map completes successfully, but before reduce starts, I am hitting an IOException as below: 2011-07-26 23:06:07,337 WARN [Thread-11] mapred.LocalJobRunner$Job(255): job_local_0001 java.io.IOException: Pass a Delete or a Put at org.apache.hadoop.hbase.mapreduce.TableOutputFormat$TableRecordWriter.write(TableOutputFormat.java:96) at org.apache.hadoop.hbase.mapreduce.TableOutputFormat$TableRecordWriter.write(TableOutputFormat.java:55) at org.apache.hadoop.mapreduce.TaskInputOutputContext.write(TaskInputOutputContext.java:80) at org.apache.hadoop.mapreduce.Reducer.reduce(Reducer.java:154) at org.apache.hadoop.mapreduce.Reducer.run(Reducer.java:174) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.java:563) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:408) at org.apache.hadoop.mapred.LocalJobRunner$Job.run(LocalJobRunner.java:215) *My Mapper class:* public static class Mapper1 extends TableMapper { public void map(ImmutableBytesWritable row, Result values, Context context) throws IOException { ...... ...... context.write(cookie, out); //out is an IntArrayWritable } } --------------------------------------------------------------------------------------------------------------------------------------- * Reducer Class:* public static class Reducer1 extends TableReducer { public void reduce(Text key, Iterator values, Context context) throws IOException, InterruptedException { .... .... Put put = new Put(rowid.getBytes()); put.add(Bytes.toBytes("cf"), Bytes.toBytes("stats"), Bytes.toBytes(val)); context.write(new Text(rowid), put); } } ----------------------------------------------------------------------------------------------------------------------------------------- *Main()* public static void main(String[] args) throws Exception { HBaseConfiguration conf = new HBaseConfiguration(); Job job = new Job(conf, "CookieJob"); job.setJarByClass(CookieJob.class); scan.addFamily("cf".getBytes()); // The InputTable has only 1 column family - cf. scan.setMaxVersions(); TableMapReduceUtil.initTableMapperJob("InputTable", scan, Mapper1.class, Text.class, IntArrayWritable.class, job); TableMapReduceUtil.initTableReducerJob("OutputTable", Reducer1.class, job); System.exit(job.waitForCompletion(true) ? 0 : 1); } --------------------------------------------------------------------------------------------------------------------------------------- Please let me know if somebody knows what could be the reason behind this. I have been bogged down by this exception for a very long time. If somebody could throw light on why this exception is occurring before the reduce starts, I would be very much thankful. Please let me know if you need any other infomation to debug this issue. Regards, Narayanan --000e0cd2916e04bf0a04a8fc7d77--