Hacktoberfest 2026:維護者為十月標記出來的 issue,仍然開放、適合新手。 瀏覽 Hacktoberfest issue

Provide non blocking getFlightInfo

未關閉
#719 2 則留言 0 個 reaction 已指派 0 人 在 GitHub 檢視

維護者通常 3 天內回覆

還沒有人認領這個 Issue。

評估

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

研究方向

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

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

描述

Type: enhancement
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<FlightInfo> 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;
  }
主要語言
Java
星號
97
分支
158
平均合併
9 天 4 小時
30 天內合併 PR
13

環境準備

從這裡開始

  1. 先讀完整個 Issue,再讀專案的貢獻指南。
  2. 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
  3. Fork 儲存庫,在一個分支上完成修改。
  4. 送出 Pull Request,並在描述裡引用這個 Issue 編號。

apache/arrow-java 的其他 Issue

查看 apache/arrow-java 的全部 Issue

相似的 Issue

更多 Java Issue

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

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