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 6AC1BECFC for ; Wed, 30 Jan 2013 15:11:22 +0000 (UTC) Received: (qmail 27917 invoked by uid 500); 30 Jan 2013 15:11:19 -0000 Delivered-To: apmail-hadoop-common-user-archive@hadoop.apache.org Received: (qmail 25834 invoked by uid 500); 30 Jan 2013 15:11:16 -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 25591 invoked by uid 99); 30 Jan 2013 15:11:15 -0000 Received: from nike.apache.org (HELO nike.apache.org) (192.87.106.230) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 15:11:15 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_HELO_PASS,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thealy@bnl.gov designates 130.199.3.132 as permitted sender) Received: from [130.199.3.132] (HELO smtpgw.bnl.gov) (130.199.3.132) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 30 Jan 2013 15:11:05 +0000 X-BNL-policy-q: X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AkAFAJE2CVHAqAGL/2dsb2JhbABFrDCSZBdzgh4BAQWBBQQLEQQBAQEJEwsHDwI0AQkIEwYCAQEXh2QDD8F4jBKBGjWDKQOIYYtajQuFEoMVgUo X-IronPort-AV: E=Sophos;i="4.84,569,1355115600"; d="scan'208";a="30094616" Received: from smail.bnl.gov ([192.168.1.139]) by smtpgw.sec.bnl.local with ESMTP/TLS/ADH-AES256-SHA; 30 Jan 2013 10:10:44 -0500 Received: from t4.local (ool-4572a8c9.dyn.optonline.net [69.114.168.201]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smail.bnl.gov (smail SMTP VIP2) with ESMTP id 31DEE218048 for ; Wed, 30 Jan 2013 10:10:44 -0500 (EST) Message-ID: <51093800.90305@bnl.gov> Date: Wed, 30 Jan 2013 10:10:56 -0500 From: Terry Healy User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.7; rv:17.0) Gecko/17.0 Thunderbird/17.0 MIME-Version: 1.0 To: user@hadoop.apache.org Subject: Re: Tricks to upgrading Sequence Files? References: <16c201cdfdf4$0896f1d0$19c4d570$@yahoo.com> <012001cdfe8f$ef101740$cd3045c0$@yahoo.com> In-Reply-To: <012001cdfe8f$ef101740$cd3045c0$@yahoo.com> X-Enigmail-Version: 1.5 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org AVROs versioning capability might help if that could replace SequenceFile in your workflow. Just a thought. -Terry On 1/29/13 9:17 PM, David Parks wrote: > I'll consider a patch to the SequenceFile, if we could manually override the > sequence file input Key and Value that's read from the sequence file headers > we'd have a clean solution. > > I don't like versioning my Model object because it's used by 10's of other > classes and I don't want to risk less maintained classes continuing to use > an old version. > > For the time being I just used 2 jobs. First I renamed the old Model Object > to the original name, read it in, upgraded it, and wrote the new version > with a different class name. > > Then I renamed the classes again so the new model object used the original > name and read in the altered name and cloned it into the original name. > > All in all an hours work only, but having a cleaner process would be better. > I'll add the request to JIRA at a minimum. > > Dave > > > -----Original Message----- > From: Harsh J [mailto:harsh@cloudera.com] > Sent: Wednesday, January 30, 2013 2:32 AM > To: > Subject: Re: Tricks to upgrading Sequence Files? > > This is a pretty interesting question, but unfortunately there isn't an > inbuilt way in SequenceFiles itself to handle this. However, your key/value > classes can be made to handle versioning perhaps - detecting if what they've > read is of an older time and decoding it appropriately (while handling newer > encoding separately, in the normal fashion). > This would be much better than going down the classloader hack paths I > think? > > On Tue, Jan 29, 2013 at 1:11 PM, David Parks wrote: >> Anyone have any good tricks for upgrading a sequence file. >> >> >> >> We maintain a sequence file like a flat file DB and the primary object >> in there changed in recent development. >> >> >> >> It's trivial to write a job to read in the sequence file, update the >> object, and write it back out in the new format. >> >> >> >> But since sequence files read and write the key/value class I would >> either need to rename the model object with a version number, or >> change the header of each sequence file. >> >> >> >> Just wondering if there are any nice tricks to this. > > > -- > Harsh J >