-
Notifications
You must be signed in to change notification settings - Fork 167
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
[Enhancement] Support https load url #152
Conversation
@@ -35,8 +35,13 @@ public class ConnectionUtils { | |||
@Nullable | |||
public static String selectAvailableHttpHost(List<String> hostList, int connectionTimeout) { | |||
for (String host : hostList) { | |||
String urlStr = "http://" + host; | |||
if (testHttpConnection(urlStr, connectionTimeout)) { | |||
if (host == null) { |
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.
Change the https to http?
@@ -183,7 +183,10 @@ private String getAvailableHost() { | |||
List<String> hostList = sinkOptions.getLoadUrlList(); | |||
long tmp = pos + hostList.size(); | |||
while (pos < tmp) { | |||
String host = "http://" + hostList.get((int) (pos % hostList.size())); | |||
String host = hostList.get((int) (pos % hostList.size())); | |||
if (host != null && !host.startsWith("http")) { |
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.
How about moving this logic to StarRocksSinkOptions#getLoadUrlList
to reduce code duplication? getLoadUrlList
can return urls already prefixed with http or https.
We should update the description of |
Signed-off-by: xlfjcg <1937532871@qq.com>
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.
LGTM
Signed-off-by: xlfjcg <1937532871@qq.com>
Signed-off-by: xlfjcg <1937532871@qq.com>
Signed-off-by: xlfjcg <1937532871@qq.com>
Signed-off-by: xlfjcg <1937532871@qq.com>
Signed-off-by: xlfjcg <1937532871@qq.com>
No description provided.