You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Michael Dürig (JIRA)" <ji...@apache.org> on 2018/09/18 08:04:00 UTC

[jira] [Commented] (OAK-7760) Use NIO in the implementation of FileAccess.Mapped#read

    [ https://issues.apache.org/jira/browse/OAK-7760?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16618637#comment-16618637 ] 

Michael Dürig commented on OAK-7760:
------------------------------------

Proposed changes: [https://github.com/mduerig/jackrabbit-oak/commit/bb6cfeac09592bdfbb68614adc701950b4aad573]

[~frm], could you have a look?

[~tmueller], could you help reviewing the {{IOUtils.readFully(FileChannel channel, int position, ByteBuffer buffer)}} implementation?

> Use NIO in the implementation of FileAccess.Mapped#read
> -------------------------------------------------------
>
>                 Key: OAK-7760
>                 URL: https://issues.apache.org/jira/browse/OAK-7760
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: segment-tar
>            Reporter: Michael Dürig
>            Assignee: Michael Dürig
>            Priority: Major
>             Fix For: 1.10
>
>
> {{FileAccess.Random#read}} currently uses {{RandomAccessFile#readFully()}} to read a segment from a tar file. That method requires a byte array and does not work with {{ByteBuffer}} instances directly. To make this method more universal (e.g. to work also for off heap byte buffers) I would like to change it to use {{FileChannel#read}} instead.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)