【已解决】flink-doris-connector 配置 fenodes 为多节点时,解析 url 报错

Viewed 92

doris 版本:2.1.3
connector 版本:1.6.1

source 语句:

create table user_source (
    user_id varchar(64),
    age int,
    city string
) with (
    -- 通用配置
    'connector' = 'doris',
    'fenodes' = 'doris001:8030,doris002:8030,doris003:8030',
    'table.identifier' = 'nw_dw.user_test',
    'username' = 'dinky_query',
    'password' = 'dinky_query'
);

报错信息:

Caused by: org.apache.doris.flink.exception.ConnectedFailedException: Connect to http://doris001:8030,doris002:8030,doris003:8030/api/nw_dw/user_test/_query_plan failed, status code is -1.
	at org.apache.doris.flink.rest.RestService.send(RestService.java:182)
	at org.apache.doris.flink.rest.RestService.findPartitions(RestService.java:659)
	at org.apache.doris.flink.source.DorisSource.createEnumerator(DorisSource.java:97)
	at org.apache.flink.runtime.source.coordinator.SourceCoordinator.start(SourceCoordinator.java:222)
	... 37 more
Caused by: java.net.MalformedURLException: For input string: "8030,doris002:8030,doris003:8030"
	at java.net.URL.<init>(URL.java:627)
	at java.net.URL.<init>(URL.java:490)
	at java.net.URL.<init>(URL.java:439)
	at org.apache.doris.flink.rest.RestService.getConnectionPost(RestService.java:187)
	at org.apache.doris.flink.rest.RestService.send(RestService.java:153)
	... 40 more
Caused by: java.lang.NumberFormatException: For input string: "8030,doris002:8030,doris003:8030"
	at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
	at java.lang.Integer.parseInt(Integer.java:580)
	at java.lang.Integer.parseInt(Integer.java:615)
	at java.net.URLStreamHandler.parseURL(URLStreamHandler.java:222)
	at java.net.URL.<init>(URL.java:622)
	... 44 more
1 Answers