[
https://issues.apache.org/jira/browse/ARROW-10106?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17215825#comment-17215825
]
James Duong commented on ARROW-10106:
-------------------------------------
To get this to work with FlightProducers in unit tests, I changed doGetCustom()
to run in a background thread (similar to doPutCustom()). The reason is that
the unit test implementations of getStream() block until all data has been sent
to the client via putNext().
In practice, I would think implementers of FlightProducers would make
getStream() asynchronous themselves, so it might be better to instead make the
unit test FlightProducers have the same behavior.
Also, doAction() could have the same problems.
> [FlightRPC][Java] Expose onIsReady() callback on OutboundStreamListener
> -----------------------------------------------------------------------
>
> Key: ARROW-10106
> URL: https://issues.apache.org/jira/browse/ARROW-10106
> Project: Apache Arrow
> Issue Type: Improvement
> Components: FlightRPC, Java
> Reporter: James Duong
> Assignee: James Duong
> Priority: Major
> Labels: flight, pull-request-available
> Time Spent: 1h
> Remaining Estimate: 0h
>
> OutboundStreamListener has a method isReady() that FlightProducers need to
> poll during implementations of getStream() to avoid buffering too much data.
> An enhancement would be to allow setting a callback to run (for example,
> notifying a CountdownLatch) so that FlightProducer implementations don't need
> to busy wait.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)