GitHub user PepperJo opened a pull request:

    https://github.com/apache/incubator-crail/pull/11

    BufferedOutputStream: align CoreStream position

    After reopening an BufferedOutputStream the underlying CoreStream
    might be at an arbitrary position since the stream is purged on close.
    To avoid unnecessary operations on the underlying stream,
    e.g. because of slices crossing the block boundary we adjust
    the length of the first slice to align the position to slice size
    such that after the first write all following writes on the underlying
    stream will be aligned to slice size again. This also helps to avoid
    unaligned writes in block storage tiers.
    
    https://issues.apache.org/jira/browse/CRAIL-17
    
    Signed-off-by: Jonas Pfefferle <[email protected]>

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/PepperJo/incubator-crail aligned_stream

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-crail/pull/11.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #11
    
----
commit fb41672c7ee32c4084ad6eece402ab1f825d796e
Author: Jonas Pfefferle <pepperjo@...>
Date:   2018-03-27T11:53:37Z

    BufferedOutputStream: align CoreStream position
    
    After reopening an BufferedOutputStream the underlying CoreStream
    might be at an arbitrary position since the stream is purged on close.
    To avoid unnecessary operations on the underlying stream,
    e.g. because of slices crossing the block boundary we adjust
    the length of the first slice to align the position to slice size
    such that after the first write all following writes on the underlying
    stream will be aligned to slice size again. This also helps to avoid
    unaligned writes in block storage tiers.
    
    https://issues.apache.org/jira/browse/CRAIL-17
    
    Signed-off-by: Jonas Pfefferle <[email protected]>

----


---

Reply via email to