hadoop-mapreduce-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Markus Jelsma <markus.jel...@openindex.io>
Subject Renaming WritableComparable and existing SequenceFiles
Date Wed, 30 Nov 2011 15:44:49 GMT

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 

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?


View raw message