You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by merlimat <gi...@git.apache.org> on 2017/05/15 23:03:18 UTC

[GitHub] bookkeeper pull request #155: Expose ByteBuf in LedgerEntry to avoid data co...

GitHub user merlimat opened a pull request:

    https://github.com/apache/bookkeeper/pull/155

    Expose ByteBuf in LedgerEntry to avoid data copy

    To avoid copying the entries payloads when writing/reading on a ledger and having to allocate a lot of `byte[]` on the JVM heap, we need to accept Netty ByteBuf buffer.
    
    By passing a ByteBuf, an application can use a pooled buffer, pointing to direct memory, to the `LedgerHandle.addEntry()` and have the same buffer forwarded on the connection sockets to the bookies.
    
    The same thing on the read side, `LedgerEntry` exposes an additional `getEntryBuffer()` method that can be used to get the underlying buffer and possibly forward that to some other connection, with zero-copy behavior (excluding getting data in-out of the kernel).

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

    $ git pull https://github.com/merlimat/bookkeeper byte-buf-ledger-entry

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

    https://github.com/apache/bookkeeper/pull/155.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 #155
    
----
commit 7859a1a852e4dabc41bc238a6ced54844ddcc62f
Author: Matteo Merli <mm...@yahoo-inc.com>
Date:   2015-03-24T00:50:33Z

    BOOKKEEPER-1068: Expose ByteBuf in LedgerEntry to avoid data copy

----


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

[GitHub] bookkeeper pull request #155: BOOKKEEPER-1068: Expose ByteBuf in LedgerEntry...

Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:

    https://github.com/apache/bookkeeper/pull/155


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---