You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@bookkeeper.apache.org by GitBox <gi...@apache.org> on 2018/03/20 05:52:27 UTC

[GitHub] sijie commented on a change in pull request #1277: WIP - Use ByteBufOutputStream to serialize ProtoBuf messages

sijie commented on a change in pull request #1277: WIP - Use ByteBufOutputStream to serialize ProtoBuf messages
URL: https://github.com/apache/bookkeeper/pull/1277#discussion_r175661000
 
 

 ##########
 File path: bookkeeper-server/src/main/java/org/apache/bookkeeper/proto/BookieProtoEncoding.java
 ##########
 @@ -356,7 +355,7 @@ private static ByteBuf serializeProtobuf(MessageLite msg, ByteBufAllocator alloc
         ByteBuf buf = allocator.heapBuffer(size, size);
 
         try {
-            msg.writeTo(CodedOutputStream.newInstance(buf.array(), buf.arrayOffset() + buf.writerIndex(), size));
+            msg.writeTo(new ByteBufOutputStream(buf));
 
 Review comment:
   @jvrao there is no conclusion yet. this is just marked as WIP. 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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