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 7CD5C9E25 for ; Tue, 25 Oct 2011 05:33:03 +0000 (UTC) Received: (qmail 80368 invoked by uid 500); 25 Oct 2011 05:32:59 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 80087 invoked by uid 500); 25 Oct 2011 05:32:57 -0000 Mailing-List: contact common-user-help@hadoop.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: common-user@hadoop.apache.org Delivered-To: mailing list common-user@hadoop.apache.org Received: (qmail 79866 invoked by uid 99); 25 Oct 2011 05:32:54 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 05:32:54 +0000 X-ASF-Spam-Status: No, hits=-0.0 required=5.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: local policy) Received: from [74.10.23.101] (HELO secure.telescope.tv) (74.10.23.101) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 25 Oct 2011 05:32:46 +0000 Received: from valkyrie.telescope.local ([192.168.31.27]) by valkyrie.telescope.local ([192.168.31.27]) with mapi; Mon, 24 Oct 2011 22:33:01 -0700 From: Aaron Baff To: "common-user@hadoop.apache.org" Date: Mon, 24 Oct 2011 22:33:00 -0700 Subject: Writing an Hbase Result object out to SequenceFileOutputFormat Thread-Topic: Writing an Hbase Result object out to SequenceFileOutputFormat Thread-Index: AcyP/YZgTUCCWRuaQW6kxIXiZ/PI3gC2Q0GA Message-ID: References: In-Reply-To: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: acceptlanguage: en-US Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Virus-Checked: Checked by ClamAV on apache.org So, I'm trying to write out an Hbase Result object (same one I get from my = TableMapper) to a SequenceFileOutputFormat from my Reducer as the value, bu= t I'm getting an error when it's trying to get a serializer. It looks like = the SerializationFactory can't find a Serialization (only one listed in the= Job's configuration in io.serializations is WritableSerialization) that wi= ll accept the Result object. Which is funny, because from the source code o= f the WritableSerialization.accept(), it uses Writable.class.isAssignableFr= om(c). When I run that manually and pass it Result.class, it returns true. When I use TextOutputFormat, it outputs fine, which I'm guessing is because= it just calls .toString() on the Key & Value, so doesn't need to mess with= the Serialization stuff. So, any ideas or hints to try and get this workin= g? In case it matters, I'm on CDH3u1. java.lang.NullPointerException at org.apache.hadoop.io.serializer.SerializationFactory.getSerializ= er(SerializationFactory.java:73) at org.apache.hadoop.io.SequenceFile$Writer.init(SequenceFile.java:= 908) at org.apache.hadoop.io.SequenceFile$Writer.(SequenceFile.jav= a:843) at org.apache.hadoop.io.SequenceFile.createWriter(SequenceFile.java= :393) at org.apache.hadoop.io.SequenceFile.createWriter(SequenceFile.java= :354) at org.apache.hadoop.io.SequenceFile.createWriter(SequenceFile.java= :427) at org.apache.hadoop.mapreduce.lib.output.SequenceFileOutputFormat.= getRecordWriter(SequenceFileOutputFormat.java:61) at org.apache.hadoop.mapred.ReduceTask.runNewReducer(ReduceTask.jav= a:559) at org.apache.hadoop.mapred.ReduceTask.run(ReduceTask.java:414) at org.apache.hadoop.mapred.Child$4.run(Child.java:270) at java.security.AccessController.doPrivileged(Native Method) at javax.security.auth.Subject.doAs(Subject.java:396) at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupIn= formation.java:1127) at org.apache.hadoop.mapred.Child.main(Child.java:264)