hadoop-common-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Owen O'Malley (JIRA)" <j...@apache.org>
Subject [jira] Commented: (HADOOP-310) Additional constructor requested in BytesWritable
Date Wed, 21 Jun 2006 20:34:31 GMT
    [ http://issues.apache.org/jira/browse/HADOOP-310?page=comments#action_12417177 ] 

Owen O'Malley commented on HADOOP-310:
--------------------------------------

I'm ok with either change. Obviously introducing an offset is a bigger change. Clearly if
the BytesWritable needs to grow, the offset should go to 0. Equivalently, the offset should
not be saved as part of the serialization.

> Additional constructor requested in BytesWritable
> -------------------------------------------------
>
>          Key: HADOOP-310
>          URL: http://issues.apache.org/jira/browse/HADOOP-310
>      Project: Hadoop
>         Type: Improvement

>   Components: io
>     Reporter: paul sutter
>     Priority: Minor

>
> It would be grand if BytesWritable.java had an additional constructor as below. This
allows me to use the BytesWritable class without doing a buffer copy, since we have a less-than-fully-utilized
byte array holding our key.
> Thanks!
>  
>  /**
>    * Create a BytesWritable using the byte array as the initial value.
>    * @param bytes This array becomes the backing storage for the object.
>    */
>   public BytesWritable(byte[] bytes, int size) {
>     this.bytes = bytes;
>     this.size = size;
>   }
>   

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


Mime
View raw message