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

[BUG] Error occurred in DefaultStreamLoader#getAvailableHost while trying to load a URL due to configuration issues. #367

Open
xumanbu opened this issue Jun 21, 2024 · 0 comments · May be fixed by #368

Comments

@xumanbu
Copy link

xumanbu commented Jun 21, 2024

When configuring the load URL value, I mistakenly used a comma instead of a semicolon, like this : 10.x.x.1:8030,10.x.x.2:8030,10.x.x.3:8030.

except: throw an exception while flink start failed
acture: only log error, flink application is running available

I found two point can be optimized.

  1. DefaultStreamLoader#testHttpConnection catched all Exception at now, wo can catch MalformedURLException and throw an IllegalArgumentException.
  2. StarRocksSinkOptions#validateStreamLoadUrl should be enhance.
Failed to connect to address:http://10.x.x.1:8030,10.x.x.2:8030,10.x.x.3:8030
java.net.MalformedURLException: For input string: "8030,10.x.x.2:8030,10.x.x.3:8030"
	at java.net.URL.<init>(URL.java:645) ~[?:1.8.0_262]
	at java.net.URL.<init>(URL.java:508) ~[?:1.8.0_262]
	at java.net.URL.<init>(URL.java:457) ~[?:1.8.0_262]
	at com.starrocks.data.load.stream.DefaultStreamLoader.testHttpConnection(DefaultStreamLoader.java:302) ~[flink-connector-starrocks-2.5_flink-1.15.2-vip.jar:?]
	at com.starrocks.data.load.stream.DefaultStreamLoader.getAvailableHost(DefaultStreamLoader.java:290) ~[flink-connector-starrocks-2.5_flink-1.15.2-vip.jar:?]
	at com.starrocks.data.load.stream.DefaultStreamLoader.send(DefaultStreamLoader.java:225) ~[flink-connector-starrocks-2.5_flink-1.15.2-vip.jar:?]
	at com.starrocks.data.load.stream.DefaultStreamLoader.lambda$send$2(DefaultStreamLoader.java:113) ~[flink-connector-starrocks-2.5_flink-1.15.2-vip.jar:?]
	at java.util.concurrent.FutureTask.run(FutureTask.java:266) [?:1.8.0_262]
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [?:1.8.0_262]
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [?:1.8.0_262]
	at java.lang.Thread.run(Thread.java:748) [?:1.8.0_262]
Caused by: java.lang.NumberFormatException: For input string: "8030,gd17-bigdata-starrocks-120-179-42.idc.vip.com:8030,gd17-bigdata-starrocks-120-204-34.idc.vip.com:8030"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) ~[?:1.8.0_262]
	at java.lang.Integer.parseInt(Integer.java:580) ~[?:1.8.0_262]
	at java.lang.Integer.parseInt(Integer.java:615) ~[?:1.8.0_262]
	at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:222) ~[?:1.8.0_262]
	at java.net.URL.<init>(URL.java:640) ~[?:1.8.0_262]
	... 10 more
xumanbu added a commit to xumanbu/starrocks-connector-for-apache-flink that referenced this issue Jun 21, 2024
xumanbu added a commit to xumanbu/starrocks-connector-for-apache-flink that referenced this issue Jun 21, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant