[ http://issues.apache.org/jira/browse/HADOOP-54?page=comments#action_12422716 ] eric baldeschwieler commented on HADOOP-54: -------------------------------------------
Sounds like we better be careful here. This raw interface is presumably used mainly by the framework? So we can probably change it without breaking the universe? I think we should probably change it to deal with "serializedRef" objects or some other new type that points to the buffer and keeps the info on if the data is compressed (and with which class). Otherwise application code is going to need to deal with tracking the state of each object and finding the right compress/decompress calls to make. A frequent scenario will be moving things from a perhaps block compressed file to an item compressed format for sorting. That should be efficient if possible. I like this approach because it makes what is going on very explicit, vs the current interface, which is obviously confusing. The alternative seems to be copious documentation in the classes and all use cases and frequent discussions on the list... > SequenceFile should compress blocks, not individual entries > ----------------------------------------------------------- > > Key: HADOOP-54 > URL: http://issues.apache.org/jira/browse/HADOOP-54 > Project: Hadoop > Issue Type: Improvement > Components: io > Affects Versions: 0.2.0 > Reporter: Doug Cutting > Assigned To: Arun C Murthy > Fix For: 0.5.0 > > Attachments: VIntCompressionResults.txt > > > SequenceFile will optionally compress individual values. But both > compression and performance would be much better if sequences of keys and > values are compressed together. Sync marks should only be placed between > blocks. This will require some changes to MapFile too, so that all file > positions stored there are the positions of blocks, not entries within > blocks. Probably this can be accomplished by adding a > getBlockStartPosition() method to SequenceFile.Writer. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira
