tanejagagan opened a new issue, #719:
URL: https://github.com/apache/arrow-java/issues/719

   ### 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 method 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;
     }
   ``` 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to