apache/arrow-java

[FlightRPC] Remove sketchy gRPC reflection code

開放

#939 建立於 2025年12月29日

 (4 則留言) (1 個反應) (1 位負責人)Java (132 個分叉)auto 404
Type: bughelp wanted

倉庫指標

星標
 (89 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Describe the bug, including details regarding any error messages, version, and platform.

https://github.com/grpc/grpc-java/pull/12579

There are public methods to get ownership of the internal ByteBuffers, instead of having to use reflection (which, did we actually ever need it in the first place?)

There's no need to dig into our internals for accessing the ByteBuffer (which is what GetReadableBuffer reports to do). We have zero-copy APIs. They can use HasByteBuffer.getByteBuffer()+InputStream.skip() to loop through the ByteBuffers. If they want to access all the byte buffers simultaneously (as skip() will deallocate the last byte buffer, just like read() does), then they can use InputStream.mark(). If they want to take over ownership of the ByteBuffers, then they can use Detachable.detach().

貢獻者指南