Home | About | Sematext search-lucene.com search-hadoop.com
 Search Hadoop and all its subprojects:

Switch to Plain View
Hadoop >> mail # user >> Re: Tricks to upgrading Sequence Files?


Copy link to this message
-
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 <[EMAIL PROTECTED]> 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