Issue Details (XML | Word | Printable)

Key: HADOOP-1759
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Konstantin Shvachko
Reporter: Konstantin Shvachko
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Hadoop Common

File name should be represented by a byte array instead of a String

Created: 22/Aug/07 06:11 PM   Updated: 08/Jul/09 04:42 PM
Return to search
Component/s: None
Affects Version/s: 0.14.0
Fix Version/s: 0.15.0

Time Tracking:
Not Specified

File Attachments:
  Size
Text File Licensed for inclusion in ASF works byteName.patch 2007-08-22 06:11 PM Konstantin Shvachko 7 kB
Issue Links:
Incorporates
 

Resolution Date: 23/Aug/07 02:35 PM


 Description  « Hide
This patch changes INode.name type to byte[], as outlined in HADOOP-1687 (4).
I submit it as a separate patch since it does not touch a lot of code, just INode.java

 All   Comments   Work Log   Change History   Subversion Commits      Sort Order: Ascending order - Click to sort in descending order
Owen O'Malley added a comment - 22/Aug/07 09:59 PM
Can we please use a Text rather than a byte[]?

Sameer Paranjpye added a comment - 23/Aug/07 12:09 AM
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.

Konstantin Shvachko added a comment - 23/Aug/07 12:12 AM - edited
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.


Doug Cutting added a comment - 23/Aug/07 02:35 PM
I just committed this. Thanks, Konstantin!