apache / apache/arrow-java

Provide non blocking getFlightInfo

未關閉
#719 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視
Type: enhancement
主要語言
Java
星號
94
分支
152
平均合併
3 天 16 小時
30 天內合併 PR
11

描述

### Describe the enhancement requested

We have a use case in our production environment where getFlightInfo can take longer than a second and having a blocking getFlightInfo is a problem. Since many other methods in FlightProducer is non blocking we should also have a non blocking getFlightInfo

The code would look something like this with minimum impact to all the implementations
```
/**
* Get information about a particular data stream.
*
* @param context Per-call context.
* @param descriptor The descriptor identifying the data stream.
* @return Metadata about the stream.
*/
FlightInfo getFlightInfo(CallContext context, FlightDescriptor descriptor);

/**
* Get information about a particular data stream.
*
* @param context Per-call context.
* @param descriptor The descriptor identifying the data stream.
* @param listener An interface for sending data back to the client.
*/
default void getFlightInfo(CallContext context, FlightDescriptor descriptor, StreamListener listener ){
FlightInfo flightInfo = getFlightInfo(context, descriptor);
listener.onNext(flightInfo);
listener.onCompleted();
}

/**
*
* @return true if blocking (default) version of getFlightInfo needs to be used by FlightService.
*/
default boolean isBlockingFlightInfo() {
return true;
}
```

貢獻指南

開啟貢獻指南

研究方向

先閱讀 FlightProducer 介面以及 FlightService 對 getFlightInfo 的處理方式,接著比較其他非阻塞 FlightProducer 方法的實作方式。確認提議的 listener 多載和 isBlockingFlightInfo 旗標如何保留現有實作;當 FlightService 能夠使用非阻塞路徑而不破壞阻塞 producer 時,工作就完成了。

由索引模型根據 Issue 內容生成。

評估

技術堆疊
java
領域
api
Issue 類型
功能
難度
4/5
預估耗時
3-5 天
活躍度
停滯
描述清晰度
基本清楚
新手友好度
42/100

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

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