vyommani commented on code in PR #732:
URL: https://github.com/apache/ranger/pull/732#discussion_r2597861108
##########
agents-common/src/main/java/org/apache/ranger/plugin/util/RangerRESTClient.java:
##########
@@ -110,9 +110,13 @@ public RangerRESTClient(String url, String
sslConfigFileName, Configuration conf
mUrl = url;
mSslConfigFileName = sslConfigFileName;
configuredURLs = StringUtil.getURLs(mUrl);
-
- setLastKnownActiveUrlIndex((new
Random()).nextInt(getConfiguredURLs().size()));
-
+ int size = getConfiguredURLs().size();
Review Comment:
I initially took the conservative/safe route and allowed it to continue with
size = 0, but on second thought — this is actually a configuration error, not a
valid runtime state.
What do you think?
Should we treat missing REST URLs as a fatal configuration error and throw
an exception(throw new IllegalArgumentException("No valid REST URL configured.
Please provide at least one valid URL.");)
@mneethiraj can you please comment on the above ?
--
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]