apache / apache/arrow-java

[FlightRPC] Remove sketchy gRPC reflection code

未關閉
#939 4 則留言 1 個 reaction 已指派 1 人 已被 @tadeja 認領 在 GitHub 檢視
help wanted Type: bug
主要語言
Java
星號
94
分支
152
平均合併
3 天 16 小時
30 天內合併 PR
11

描述

### 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()](https://grpc.github.io/grpc-java/javadoc/io/grpc/HasByteBuffer.html)+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()](https://grpc.github.io/grpc-java/javadoc/io/grpc/Detachable.html).

貢獻指南

開啟貢獻指南

評估

這個 Issue 還沒有評估資料。

把新 issue 寄到你的電子郵件信箱

精選適合新手參與的 GitHub issue 摘要。