Skip to content
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

Merged
merged 1 commit into from
Dec 14, 2022
Merged

Conversation

xlfjcg
Copy link
Contributor

@xlfjcg xlfjcg commented Dec 5, 2022

No description provided.

@xlfjcg xlfjcg changed the title Feature ssl [Fix] Support https load Dec 5, 2022
@@ -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) {
Copy link
Collaborator

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")) {
Copy link
Collaborator

@banmoy banmoy Dec 6, 2022

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.

@banmoy
Copy link
Collaborator

banmoy commented Dec 6, 2022

We should update the description of StarRocksSinkOptions#LOAD_URL to tell users they can add http/https to the host.

@banmoy banmoy changed the title [Fix] Support https load [Enhancement] Support https load Dec 6, 2022
@banmoy banmoy changed the title [Enhancement] Support https load [Enhancement] Support https load url Dec 6, 2022
Signed-off-by: xlfjcg <1937532871@qq.com>
@banmoy banmoy self-requested a review December 12, 2022 09:44
Copy link
Collaborator

@banmoy banmoy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@banmoy banmoy self-requested a review December 12, 2022 09:50
@banmoy banmoy merged commit 3c47780 into StarRocks:main Dec 14, 2022
banmoy pushed a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Dec 14, 2022
Signed-off-by: xlfjcg <1937532871@qq.com>
banmoy pushed a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Dec 14, 2022
Signed-off-by: xlfjcg <1937532871@qq.com>
banmoy pushed a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Dec 14, 2022
Signed-off-by: xlfjcg <1937532871@qq.com>
banmoy pushed a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Dec 14, 2022
Signed-off-by: xlfjcg <1937532871@qq.com>
banmoy pushed a commit to banmoy/starrocks-connector-for-apache-flink that referenced this pull request Dec 14, 2022
Signed-off-by: xlfjcg <1937532871@qq.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants