You are viewing a plain text version of this content. The canonical link for it is here.
Posted to common-dev@hadoop.apache.org by "Runping Qi (JIRA)" <ji...@apache.org> on 2006/10/26 01:40:17 UTC

[jira] Created: (HADOOP-640) Text class constructor and setCopacity method

Text class constructor and setCopacity method
---------------------------------------------

                 Key: HADOOP-640
                 URL: http://issues.apache.org/jira/browse/HADOOP-640
             Project: Hadoop
          Issue Type: Bug
          Components: mapred
            Reporter: Runping Qi



A couple of problems.

1. setCapacity may cause loss of the existing data, if the new len is bigger than the old len of the byte array.

2. Text should provide a constructor like:

Text(byte[] data,  int len) {
}

Text(byte[] data, int start, int len) {
}

Text(byte[] data,  int len, boolean noCopying) {
}

The last one above allows to save the cost of data copy if the user wants the ownership of data to be transferred to Text object


-- 
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