-
Notifications
You must be signed in to change notification settings - Fork 2.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core, Rest: Enable useSystemProperties on RESTClient #11548
base: main
Are you sure you want to change the base?
Core, Rest: Enable useSystemProperties on RESTClient #11548
Conversation
@amogh-jahagirdar @nastra could you please take look? |
@munendrasn can you please add some details why this functionality is needed? Having more and more configuration flags just makes it quite complicated for users |
Agreed on having more configuration flags.. The original intent was to enable Reasoning for introducing new configuration property to enable or disable usingSystemProperties : |
What about not setting these system properties in the second use case? |
We access both catalogs in same process/job.. a case of custom catalog federation |
Should I consider splitting the changes into different PR.. ie, enabling the systemProperties on the client and making usage of system properties configurable through property |
@nastra @danielcweeks could you please review this? |
I'm really hesitant to introduce a flag to control whether things get read from system properties or not. Let's wait for feedback from @danielcweeks |
This pull request has been marked as stale due to 30 days of inactivity. It will be closed in 1 week if no further activity occurs. If you think that’s incorrect or this pull request requires a review, please simply write any comment. If closed, you can revive the PR at any time and @mention a reviewer or discuss it on the [email protected] list. Thank you for your contributions. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I saw some hesitance in the comments whether to have this change or not. I don't have a strong opinion myself, but for me it seems that since the HttpClientBuilder already has this option we just make it possible to use it for Iceberg's HTTP clients, so would make sense in a way. So if there are users wanting to use it, they would have it.
What I found is that with the current proposal we seem to change the default to use system props. I don't think we should do that, let's keep the defaults as they are now.
@@ -82,6 +82,8 @@ public class HTTPClient implements RESTClient { | |||
static final int REST_MAX_CONNECTIONS_DEFAULT = 100; | |||
static final String REST_MAX_CONNECTIONS_PER_ROUTE = "rest.client.connections-per-route"; | |||
static final int REST_MAX_CONNECTIONS_PER_ROUTE_DEFAULT = 100; | |||
private static final String REST_USE_SYSTEM_PROPERTIES = "rest.client.use-system-properties"; | |||
private static final boolean REST_USE_SYSTEM_PROPERTIES_DEFAULT = true; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If I'm not mistaken the current behaviour doesn't use system properties. With this change we seem to change that behaviour and one would have to turn that off manually by setting a property to false.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
systemProperties are used for ConnectionManager but not on Client. Not sure, what would the ideal behaviour in this case.
useSystemProperties
on the httpClient, it reads the proxy settings if not configured explicitly from system properties.cc @danielcweeks @amogh-jahagirdar @nastra