|
[
Permlink
| « Hide
]
Owen O'Malley added a comment - 22/Aug/07 09:59 PM
Can we please use a Text rather than a byte[]?
Don't think we should. This is a memory conservation exercise. Using a Text would mean an additional 28 bytes/file (16 byte JVM header + 8 byte reference + 4 bytes of length), for 64-bit JVMs at any rate.
This is about saving bytes.
Using Text as an object with a length field will add 32 bytes (28 as Sameer calculated + padding) for each name. For regular (ascii) file names String and Text have almost the same memory overhead. +1
http://issues.apache.org/jira/secure/attachment/12364342/byteName.patch Test results: http://lucene.zones.apache.org:8080/hudson/job/Hadoop-Patch/599/testReport/ I just committed this. Thanks, Konstantin!
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||