FAQ
Text class should provide method to return byte array of getLength()
--------------------------------------------------------------------

Key: HADOOP-6868
URL: https://issues.apache.org/jira/browse/HADOOP-6868
Project: Hadoop Common
Issue Type: Bug
Components: util
Affects Versions: 0.20.2
Reporter: Ted Yu


People would use the following code to convert Text to String:
String valueString = new String(valueText.getBytes(), "UTF-8");

However, if Text is reused, the above call would return String of monotonically increasing length.
From 'Hadoop and XML' discussion thread:
The problem I am seeing is between the Map phase and the
Reduce phase, the XML is getting munged. For Example:
</PrivateRate>
</PrivateRateSet>te>

Text should provide method to return byte array of getLength() length.

--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Search Discussions

  • Ted Yu (JIRA) at Jul 20, 2010 at 8:08 pm
    [ https://issues.apache.org/jira/browse/HADOOP-6868?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

    Ted Yu resolved HADOOP-6868.
    ----------------------------

    Resolution: Not A Problem
    Text class should provide method to return byte array of getLength()
    --------------------------------------------------------------------

    Key: HADOOP-6868
    URL: https://issues.apache.org/jira/browse/HADOOP-6868
    Project: Hadoop Common
    Issue Type: Bug
    Components: util
    Affects Versions: 0.20.2
    Reporter: Ted Yu

    People would use the following code to convert Text to String:
    String valueString = new String(valueText.getBytes(), "UTF-8");
    However, if Text is reused, the above call would return String of monotonically increasing length.
    From 'Hadoop and XML' discussion thread:
    The problem I am seeing is between the Map phase and the
    Reduce phase, the XML is getting munged. For Example:
    </PrivateRate>
    </PrivateRateSet>te>
    Text should provide method to return byte array of getLength() length.
    --
    This message is automatically generated by JIRA.
    -
    You can reply to this email to add a comment to the issue online.

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcommon-dev @
categorieshadoop
postedJul 20, '10 at 2:22p
activeJul 20, '10 at 8:08p
posts2
users1
websitehadoop.apache.org...
irc#hadoop

1 user in discussion

Ted Yu (JIRA): 2 posts

People

Translate

site design / logo © 2021 Grokbase