hbase-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ramkrishna.s.vasudevan (JIRA)" <j...@apache.org>
Subject [jira] [Created] (HBASE-16880) Correct the javadoc/behaviour of the APIs in ByteBufferUtils
Date Wed, 19 Oct 2016 06:23:58 GMT
ramkrishna.s.vasudevan created HBASE-16880:

             Summary: Correct the javadoc/behaviour of the APIs in ByteBufferUtils
                 Key: HBASE-16880
                 URL: https://issues.apache.org/jira/browse/HBASE-16880
             Project: HBase
          Issue Type: Bug
            Reporter: ramkrishna.s.vasudevan
            Assignee: ramkrishna.s.vasudevan

There are some issues either with the javadoc or the actual behaviour of some APIs in BBUtils.
For eg,
BBUtil#copyFromBufferToBuffer() says
   * Copy one buffer's whole data to another. Write starts at the current position of 'out'
   * Note : This will advance the position marker of {@code out} but not change the position
   * for {@code in}. The position and limit of the {@code in} buffer to be set properly by
   * @param in source buffer
   * @param out destination buffer
But this is true in case of UNSAFE.
    if (UNSAFE_AVAIL) {
      int length = in.remaining();
      UnsafeAccess.copy(in, in.position(), out, out.position(), length);
      out.position(out.position() + length);
    } else {
But in other case where we move the else - the 'in' is also advanced. So we need to either
correct the behaviour or change the doc and see all the used places. This JIRA can be used
to correct all the APIs in this util class.

This message was sent by Atlassian JIRA

View raw message