Return-Path: X-Original-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Delivered-To: apmail-hadoop-mapreduce-user-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id B377C9376 for ; Wed, 30 Nov 2011 15:44:57 +0000 (UTC) Received: (qmail 98072 invoked by uid 500); 30 Nov 2011 15:44:56 -0000 Delivered-To: apmail-hadoop-mapreduce-user-archive@hadoop.apache.org Received: (qmail 98032 invoked by uid 500); 30 Nov 2011 15:44:56 -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 98024 invoked by uid 99); 30 Nov 2011 15:44:56 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 15:44:56 +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 [178.21.113.224] (HELO office.openindex.io) (178.21.113.224) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Nov 2011 15:44:47 +0000 Received: from localhost (localhost [127.0.0.1]) by office.openindex.io (Postfix) with ESMTP id A67922A2148 for ; Wed, 30 Nov 2011 15:46:39 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at office.openindex.io Received: from office.openindex.io ([127.0.0.1]) by localhost (office.openindex.io [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4r5snqLZ4VDW for ; Wed, 30 Nov 2011 15:46:37 +0000 (UTC) Received: from midas.localnet (D4B295B2.static.ziggozakelijk.nl [212.178.149.178]) (Authenticated sender: markus.jelsma@openindex.io) by office.openindex.io (Postfix) with ESMTPA id 7835E2A2146 for ; Wed, 30 Nov 2011 15:46:37 +0000 (UTC) From: Markus Jelsma Reply-To: markus.jelsma@openindex.io Organization: Openindex To: mapreduce-user@hadoop.apache.org Subject: Renaming WritableComparable and existing SequenceFiles Date: Wed, 30 Nov 2011 16:44:49 +0100 User-Agent: KMail/1.13.5 (Linux/2.6.32-35-generic; KDE/4.4.5; x86_64; ; ) MIME-Version: 1.0 Content-Type: Text/Plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Message-Id: <201111301644.49484.markus.jelsma@openindex.io> X-Virus-Checked: Checked by ClamAV on apache.org Hi, I've built some SequenceFiles using a custom WritableComparable. I also decided to reorganize package structure and ended up renaming the whole thing. Since the key and value classes are embedded in the file i cannot read them because it either doesn't exist or cannot be cast in case the same classname lives in another package name. I looked in the Job and SequenceFile and InputFormat API's but i cannot find something to tell the reader that the class is somewhere else now. Renaming using a hexeditor doesn't work as well because the package name's length is different now, leading to a lot of bad exceptions such as Unknown codec complaints. I can still load the file by keeping the original WritableComparable and write back to disk using the new WritableComparable but that forces me to write some temporary code. How can i tell the reader to use the new (but identical) class for WritableComparable when loading a SequenceFile? Or do i have to write some conversion code? Thanks