You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "jiezhang (via GitHub)" <gi...@apache.org> on 2023/03/17 18:47:55 UTC

[GitHub] [arrow] jiezhang opened a new issue, #34612: [Java] Support overriding ChannelOption in FlightClient.Builder

jiezhang opened a new issue, #34612:
URL: https://github.com/apache/arrow/issues/34612

   ### Describe the enhancement requested
   
   This is a feature request to support overriding ChannelOption in FlightClient.Builder, specifically adding a method to [FlightClient.Builder](https://github.com/apache/arrow/blob/f9324b79bf4fc1ec7e97b32e3cce16e75ef0f5e3/java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java#L565) such that we can supply custom [ChannelOption](https://netty.io/4.1/api/io/netty/channel/ChannelOption.html) to the NettyChannelBuilder defined [here](https://github.com/apache/arrow/blob/main/java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java#L644).
    
   An example would be overriding [CONNECT_TIMEOUT_MILLIS](https://netty.io/4.1/api/io/netty/channel/ChannelOption.html#CONNECT_TIMEOUT_MILLIS) to work around timeout issues.
   
   
   
   
   
   ### Component(s)
   
   Java


-- 
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-unsubscribe@arrow.apache.org.apache.org

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


[GitHub] [arrow] jiezhang commented on issue #34612: [Java] Support overriding ChannelOption in FlightClient.Builder

Posted by "jiezhang (via GitHub)" <gi...@apache.org>.
jiezhang commented on issue #34612:
URL: https://github.com/apache/arrow/issues/34612#issuecomment-1476972099

   @lidavidm I just opened https://github.com/apache/arrow/pull/34648 to expose toSocketAddress.


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] jiezhang commented on issue #34612: [Java] Support overriding ChannelOption in FlightClient.Builder

Posted by "jiezhang (via GitHub)" <gi...@apache.org>.
jiezhang commented on issue #34612:
URL: https://github.com/apache/arrow/issues/34612#issuecomment-1476935089

   Yes, I will make another PR to expose toSocketAddress.


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] lidavidm commented on issue #34612: [Java] Support overriding ChannelOption in FlightClient.Builder

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #34612:
URL: https://github.com/apache/arrow/issues/34612#issuecomment-1474285070

   For this sort of thing, you can use FlightGrpcUtils and supply a fully custom channel: https://github.com/apache/arrow/blob/main/java/flight/flight-grpc/src/main/java/org/apache/arrow/flight/FlightGrpcUtils.java


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] lidavidm commented on issue #34612: [Java] Support overriding ChannelOption in FlightClient.Builder

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #34612:
URL: https://github.com/apache/arrow/issues/34612#issuecomment-1476930922

   Do you want to follow up to expose toSocketAddress? I agree forcing everyone to reimplement that probably doesn't make sense


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] lidavidm commented on issue #34612: [Java] Support overriding ChannelOption in FlightClient.Builder

Posted by "lidavidm (via GitHub)" <gi...@apache.org>.
lidavidm commented on issue #34612:
URL: https://github.com/apache/arrow/issues/34612#issuecomment-1474359548

   We intentionally separate Flight from gRPC. Other Flight implementations can use alternative transports, so exposing gRPC directly from the core API is not desirable.
   
   You wouldn't need all the logic in Builder.build. You would be able to customize the channel as desired. Exposing/wrapping all of the different gRPC builder options and ensuring they work with Flight is a lot of work. That is why we offer this escape hatch in the first place.
   
   It may make sense to expose toSocketAddress.


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] jiezhang commented on issue #34612: [Java] Support overriding ChannelOption in FlightClient.Builder

Posted by "jiezhang (via GitHub)" <gi...@apache.org>.
jiezhang commented on issue #34612:
URL: https://github.com/apache/arrow/issues/34612#issuecomment-1474351791

   Thanks for the pointer. @lidavidm 
   
   In order to use FlightGrpcUtils, looks like I would need to copy and paste:
   * [Builder.build](https://github.com/apache/arrow/blob/f9324b79bf4fc1ec7e97b32e3cce16e75ef0f5e3/java/flight/flight-core/src/main/java/org/apache/arrow/flight/FlightClient.java#L643)
   * [Location.toSocketAddress](https://github.com/apache/arrow/blob/45918a90a6ca1cf3fd67c256a7d6a240249e555a/java/flight/flight-core/src/main/java/org/apache/arrow/flight/Location.java#L63) (because the method is not public)
   
   I wonder why you don't want to expose this option from the Builder.


-- 
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: github-unsubscribe@arrow.apache.org

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


[GitHub] [arrow] jiezhang closed issue #34612: [Java] Support overriding ChannelOption in FlightClient.Builder

Posted by "jiezhang (via GitHub)" <gi...@apache.org>.
jiezhang closed issue #34612: [Java] Support overriding ChannelOption in FlightClient.Builder
URL: https://github.com/apache/arrow/issues/34612


-- 
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-unsubscribe@arrow.apache.org

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