You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@thrift.apache.org by Sergey Shelukhin <se...@hortonworks.com> on 2015/09/01 02:12:21 UTC

2 questions; 0.9.3 release, and writing from read-only buffer

1) Is 0.9.3 release planned anytime soon? :)

2) I get this error after setting a binary field in a return object from
some Thrift API to a read-only buffer:
server.TThreadPoolServer: Error occurred during processing of message.
java.nio.ReadOnlyBufferException
       at java.nio.ByteBuffer.array(ByteBuffer.java:996)
       at 
org.apache.thrift.protocol.TCompactProtocol.writeBinary(TCompactProtocol.ja
va:368)
       at [my generated type]$[blah]StandardScheme.write

Is there a good reason why it cannot send from read-only buffers? It
doesn¹t need to be modified.
They are read-only by design and I'd prefer to avoid copying them. For
now, I muck with the readonly flag using reflection when sending, but that
is a hacky workaround.




Re: 2 questions; 0.9.3 release, and writing from read-only buffer

Posted by Sergey Shelukhin <se...@hortonworks.com>.
Anyone? :)

On 15/8/31, 17:12, "Sergey Shelukhin" <se...@hortonworks.com> wrote:

>1) Is 0.9.3 release planned anytime soon? :)
>
>2) I get this error after setting a binary field in a return object from
>some Thrift API to a read-only buffer:
>server.TThreadPoolServer: Error occurred during processing of message.
>java.nio.ReadOnlyBufferException
>       at java.nio.ByteBuffer.array(ByteBuffer.java:996)
>       at 
>org.apache.thrift.protocol.TCompactProtocol.writeBinary(TCompactProtocol.j
>a
>va:368)
>       at [my generated type]$[blah]StandardScheme.write
>
>Is there a good reason why it cannot send from read-only buffers? It
>doesn¹t need to be modified.
>They are read-only by design and I'd prefer to avoid copying them. For
>now, I muck with the readonly flag using reflection when sending, but that
>is a hacky workaround.
>
>
>
>
>