[ 
https://issues.apache.org/jira/browse/THRIFT-2661?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Sylwester Lachiewicz resolved THRIFT-2661.
------------------------------------------
    Resolution: Fixed

Same landing as THRIFT-1039: binary fields generate as {{byte[]}}-backed APIs 
([compiler/cpp/src/thrift/generate/t_java_generator.cc|https://github.com/apache/thrift/blob/master/compiler/cpp/src/thrift/generate/t_java_generator.cc]).
 Resolving as Fixed.

> Binary Data in Java requires byte array backed byte-buffers
> -----------------------------------------------------------
>
>                 Key: THRIFT-2661
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2661
>             Project: Thrift
>          Issue Type: Improvement
>          Components: Java - Library
>            Reporter: Rajiv Kurian
>            Priority: Minor
>
> Even though binary data can be supplied and received from Thrift objects 
> using ByteBuffers, these ByteBuffers cannot be Direct ByteBuffers. This means 
> that an extra copy is being made by the JVM or by the library when 
> sending/receiving data. I am using Thrift to send flyweight objects built on 
> top of a DirectByteBuffer in hopes of eliminating copies. Thrift throws 
> exceptions unless it is a HeapByteBuffer. HeapByteBuffers incur additional 
> copies, defeating the zero-copy flyweight structure approach to some extent. 
> Is it possible to not explicitly depend on byte array backed ByteBuffers?



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to