You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ozone.apache.org by GitBox <gi...@apache.org> on 2020/01/02 08:35:56 UTC

[GitHub] [hadoop-ozone] adoroszlai opened a new pull request #406: HDDS-2784. Read to ByteBuffer uses wrong offset

adoroszlai opened a new pull request #406: HDDS-2784. Read to ByteBuffer uses wrong offset
URL: https://github.com/apache/hadoop-ozone/pull/406
 
 
   ## What changes were proposed in this pull request?
   
   `OzoneFSInputStream#read(ByteBuffer)` uses the target buffer's position for offsetting into the temporary array, which may result in an `IndexOutOfBoundsException`.  Offset should always be 0, since the temporary array is sized exactly for the length to read, and it has no extra data at the start.
   
   https://issues.apache.org/jira/browse/HDDS-2784
   
   ## How was this patch tested?
   
   Added unit test.
   
   ```
   [INFO] Tests run: 2, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.143 s - in org.apache.hadoop.fs.ozone.contract.TestOzoneFSInputStreamUnit
   ```
   
   https://github.com/adoroszlai/hadoop-ozone/runs/370513667

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] adoroszlai commented on issue #406: HDDS-2784. Read to ByteBuffer uses wrong offset

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on issue #406: HDDS-2784. Read to ByteBuffer uses wrong offset
URL: https://github.com/apache/hadoop-ozone/pull/406#issuecomment-571063116
 
 
   Thanks @cxorm and @bshashikant for review, and @bshashikant for committing it.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] cxorm commented on issue #406: HDDS-2784. Read to ByteBuffer uses wrong offset

Posted by GitBox <gi...@apache.org>.
cxorm commented on issue #406: HDDS-2784. Read to ByteBuffer uses wrong offset
URL: https://github.com/apache/hadoop-ozone/pull/406#issuecomment-570195527
 
 
   Thanks @adoroszlai for the report and work.
   
   Overll LGTM.
   A little question, could we add new unit test in the existed file ? 
   (```hadoop-ozone/ozonefs/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFSInputStream.java```)

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] bshashikant merged pull request #406: HDDS-2784. Read to ByteBuffer uses wrong offset

Posted by GitBox <gi...@apache.org>.
bshashikant merged pull request #406: HDDS-2784. Read to ByteBuffer uses wrong offset
URL: https://github.com/apache/hadoop-ozone/pull/406
 
 
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org


[GitHub] [hadoop-ozone] adoroszlai commented on issue #406: HDDS-2784. Read to ByteBuffer uses wrong offset

Posted by GitBox <gi...@apache.org>.
adoroszlai commented on issue #406: HDDS-2784. Read to ByteBuffer uses wrong offset
URL: https://github.com/apache/hadoop-ozone/pull/406#issuecomment-570197494
 
 
   Thanks @cxorm for reviewing this.
   
   > A little question, could we add new unit test in the existed file ?
   > (`hadoop-ozone/ozonefs/src/test/java/org/apache/hadoop/fs/ozone/TestOzoneFSInputStream.java`)
   
   That file is an integration test (uses mini cluster) and I proposed moving it to `integration-test` in #383.  The new test cases are proper unit tests, and can be run without cluster.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: ozone-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: ozone-issues-help@hadoop.apache.org