scruz-denodo commented on PR #43155:
URL: https://github.com/apache/arrow/pull/43155#issuecomment-2219643820

   Hi, I still did not have the chance to test your suggestion. 
   
   Nevertheless, I was looking the code. It is not only required to create a 
new `org.apache.arrow.flight.FlightServer.Builder`, you have to duplicate the 
entire `org.apache.arrow.flight.FlightServer` because the constructor of that 
class is `private`.
   
   There are few methods on that class, but I continue to think that 
duplicating code is not a good practice. 
   
   It is clear that instantiating the object by this way will allow to 
configure the interceptors in the desired order. You can implement one which 
stores the client information on a `ThreadLocal` variable, so the subsequent 
interceptors (the flight one) have the information available. 
   
   In my opinion, it would be better to have that information through an API 
method, or having the option to configure the order of the interceptors. For 
example, allowing to define the interceptors executed prior to the flight one, 
and other interceptors for being executed after that. 
   
   I think that is the objective of the issue 
https://github.com/apache/arrow/issues/31924


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to