[ https://issues.apache.org/jira/browse/HADOOP-10855?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Todd Lipcon updated HADOOP-10855: --------------------------------- Attachment: hadoop-10855.txt Attached patch implements readWithKnownLength(). I also refactored the common code out from the existing read methods to call this new one after deserializing the length. Added a simple new unit test to verify. > Allow Text to be read with a known length > ----------------------------------------- > > Key: HADOOP-10855 > URL: https://issues.apache.org/jira/browse/HADOOP-10855 > Project: Hadoop Common > Issue Type: Improvement > Components: io > Affects Versions: 2.6.0 > Reporter: Todd Lipcon > Assignee: Todd Lipcon > Priority: Minor > Attachments: hadoop-10855.txt > > > For the native task work (MAPREDUCE-2841) it is useful to be able to store > strings in a different fashion than the default (varint-prefixed) > serialization. We should provide a "read" method in Text which takes an > already-known length to support this use case while still providing Text > objects back to the user. -- This message was sent by Atlassian JIRA (v6.2#6252)