text:
[Bug]: doriswriter 报Endpoint must be set错误，但是json配置文件已经配置

What happened?
我把数据从kudu迁移到doris，执行报错，如图：
官网实例配置：

报错如下：

Version
4.0.12 (Default)
OS Type
No response
Java JDK Version
Oracle JDK 1.8.0
Relevant log output
No response

感谢反馈
请直接粘贴执行任务的json 文件以及执行中的输出日志内容
请勿截图
谢谢！

{
"setting":{
"speed":{
"channel":3
},
"errorLimit":{
"record":0,
"percentage":0.00
}
},
"content":{
"reader":{
"name":"kudureader",
"parameter":{
"masterAddress":"10.168.xx.xx:7051,10.168.xx.xx:7051,10.168.xx.xx:7051",
"table":"sk_install",
"database":"adjust"
}
},
"writer":{
"name":"doriswriter",
"parameter":{
"username":"root",
"password":"*****",
"endpoint":"http://doris-fe-001:18030/",
"table":"sk_install",
"database":"adjust",
"connection":[
{
"table":"sk_install",
"database":"adjust",
"endpoint":"http://doris-fe-001:18030/"
}
],
"loadProps":{
"strip_outer_array":"true"
},
"lineDelimiter":"\x02",
"format":"json"
}
}
}
}

2023-06-09 03:50:41.205 [        main] INFO  JobContainer         - The jobContainer begins to process the job.
2023-06-09 03:50:41.230 [       job-0] INFO  StandAloneJobContainerCommunicator - Total 0 records, 0 bytes | Speed 0B/s, 0 records/s | Error 0 records, 0 bytes |  All Task WaitWriterTime 0.000s |  All Task WaitReaderTime 0.000s | Percentage 0.00%
com.wgzhao.addax.common.exception.AddaxException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:88)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:75)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Job.init(DorisWriter.java:50)
at com.wgzhao.addax.core.job.JobContainer.initJobWriter(JobContainer.java:612)
at com.wgzhao.addax.core.job.JobContainer.init(JobContainer.java:266)
at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:122)
at com.wgzhao.addax.core.Engine.start(Engine.java:66)
at com.wgzhao.addax.core.Engine.entry(Engine.java:120)
at com.wgzhao.addax.core.Engine.main(Engine.java:151)
at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:165)
at com.wgzhao.addax.core.Engine.start(Engine.java:66)
at com.wgzhao.addax.core.Engine.entry(Engine.java:120)
at com.wgzhao.addax.core.Engine.main(Engine.java:151)

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:88)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:75)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Job.init(DorisWriter.java:50)
at com.wgzhao.addax.core.job.JobContainer.initJobWriter(JobContainer.java:612)
at com.wgzhao.addax.core.job.JobContainer.init(JobContainer.java:266)
at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:122)
... 3 more

麻烦指导一下，谢谢！

[root@doris-fe-001 bin]# ./addax.sh /opt/gt_script/addax_json_file/adjust/sk_install.json
03:50:40,786 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.3.4
03:50:40,800 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [/opt/addax/conf/logback.xml] at [file:/opt/addax/conf/logback.xml]
03:50:40,932 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [STDOUT]
03:50:40,932 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
03:50:40,971 |-INFO in ch.qos.logback.core.ConsoleAppender[STDOUT] - Enabling JANSI AnsiPrintStream for the console.
03:50:40,971 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Failed to create AnsiPrintStream. Falling back on the default stream. java.lang.ClassNotFoundException: org.fusesource.jansi.AnsiConsole
at java.lang.ClassNotFoundException: org.fusesource.jansi.AnsiConsole
at 	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at 	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at 	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at 	at ch.qos.logback.core.ConsoleAppender.wrapWithJansi(ConsoleAppender.java:96)
at 	at ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:86)
at 	at ch.qos.logback.core.model.processor.AppenderModelHandler.postHandle(AppenderModelHandler.java:84)
at 	at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:257)
at 	at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:253)
at 	at ch.qos.logback.core.model.processor.DefaultProcessor.traversalLoop(DefaultProcessor.java:90)
at 	at ch.qos.logback.core.model.processor.DefaultProcessor.process(DefaultProcessor.java:106)
at 	at ch.qos.logback.core.joran.GenericXMLConfigurator.processModel(GenericXMLConfigurator.java:200)
at 	at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:166)
at 	at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:122)
at 	at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:65)
at 	at ch.qos.logback.classic.util.DefaultJoranConfigurator.configureByResource(DefaultJoranConfigurator.java:53)
at 	at ch.qos.logback.classic.util.DefaultJoranConfigurator.configure(DefaultJoranConfigurator.java:34)
at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:98)
at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:77)
at 	at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:50)
at 	at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41)
at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:183)
at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:170)
at 	at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:455)
at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:441)
at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:390)
at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:416)
at 	at com.wgzhao.addax.core.Engine.(Engine.java:48)
03:50:40,971 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [FILE]
03:50:40,971 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
03:50:40,973 |-INFO in ch.qos.logback.core.FileAppender[FILE] - File property is set to [/opt/addax/log//addax_sk_install_20230609_035040_23846.log]
03:50:40,975 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to INFO
03:50:40,975 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [STDOUT] to Logger[ROOT]
03:50:40,975 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [FILE] to Logger[ROOT]
03:50:40,975 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@71423665 - End of configuration.
03:50:40,976 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@20398b7c - Registering current configuration as safe fallback point

/ _ \    | |   | |
/ /\ \ __| | __| | __ ___  __
|  _  |/  |/ _ |/ ` \ / /
| | | | (| | (| | (| |>  <
_| |/_,|_,|_,//_\
:: Addax version ::    (v4.1.0)

很抱歉，是文档没有更新的问题
把
"endpoint":"http://doris-fe-001:18030/",

改成
"endpoint": ["http://doris-fe-001:18030/"],

再试下

很抱歉，是文档没有更新的问题 把
"endpoint":"http://doris-fe-001:18030/",

改成
"endpoint": ["http://doris-fe-001:18030/"],

再试下

这个我自己看代码改了，问题不大，大佬，你们有微信交流群么？

很抱歉，是文档没有更新的问题 把
"endpoint":"http://doris-fe-001:18030/",

改成
"endpoint": ["http://doris-fe-001:18030/"],

再试下

还有kudereader的table写法，应该前面要加impala::的，不然会提示找不到表，类似于这样，看看文档能否也更新下，麻烦啦，
"reader":{
"name":"kudureader",
"parameter":{
"masterAddress":"10.168.xx.xx:7051,10.168.xx.xx:7051,10.168.xx.xx:7051",
"table":"impala::adjust.sk_install",
"database":"adjust"
}
},

很抱歉，是文档没有更新的问题 把
"endpoint":"http://doris-fe-001:18030/",

改成
"endpoint": ["http://doris-fe-001:18030/"],

再试下

这个我自己看代码改了，问题不大，大佬，你们有微信交流群么？

没有微信交流群，这里就是唯一的交流渠道

很抱歉，是文档没有更新的问题 把
"endpoint":"http://doris-fe-001:18030/",

改成
"endpoint": ["http://doris-fe-001:18030/"],

再试下

还有kudureader的table写法，应该前面要加impala::的，不然会提示找不到表，类似于这样，看看文档能否也更新下，麻烦啦，
"reader":{
			"name":"kudureader",
			"parameter":{
				"masterAddress":"10.168.xx.xx:7051,10.168.xx.xx:7051,10.168.xx.xx:7051",
				"table":"impala::adjust.sk_install",
				"database":"adjust"
			}
		}

这个我再确认下

[root@doris-fe-001 bin]# ./addax.sh /opt/gt_script/addax_json_file/adjust/sk_install.json
05:50:52,648 |-INFO in ch.qos.logback.classic.LoggerContext[default] - This is logback-classic version 1.3.4
05:50:52,661 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [/opt/addax/conf/logback.xml] at [file:/opt/addax/conf/logback.xml]
05:50:52,797 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [STDOUT]
05:50:52,797 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.ConsoleAppender]
05:50:52,838 |-INFO in ch.qos.logback.core.ConsoleAppender[STDOUT] - Enabling JANSI AnsiPrintStream for the console.
05:50:52,838 |-WARN in ch.qos.logback.core.ConsoleAppender[STDOUT] - Failed to create AnsiPrintStream. Falling back on the default stream. java.lang.ClassNotFoundException: org.fusesource.jansi.AnsiConsole
at java.lang.ClassNotFoundException: org.fusesource.jansi.AnsiConsole
at 	at java.net.URLClassLoader.findClass(URLClassLoader.java:387)
at 	at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at 	at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:355)
at 	at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at 	at ch.qos.logback.core.ConsoleAppender.wrapWithJansi(ConsoleAppender.java:96)
at 	at ch.qos.logback.core.ConsoleAppender.start(ConsoleAppender.java:86)
at 	at ch.qos.logback.core.model.processor.AppenderModelHandler.postHandle(AppenderModelHandler.java:84)
at 	at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:257)
at 	at ch.qos.logback.core.model.processor.DefaultProcessor.secondPhaseTraverse(DefaultProcessor.java:253)
at 	at ch.qos.logback.core.model.processor.DefaultProcessor.traversalLoop(DefaultProcessor.java:90)
at 	at ch.qos.logback.core.model.processor.DefaultProcessor.process(DefaultProcessor.java:106)
at 	at ch.qos.logback.core.joran.GenericXMLConfigurator.processModel(GenericXMLConfigurator.java:200)
at 	at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:166)
at 	at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:122)
at 	at ch.qos.logback.core.joran.GenericXMLConfigurator.doConfigure(GenericXMLConfigurator.java:65)
at 	at ch.qos.logback.classic.util.DefaultJoranConfigurator.configureByResource(DefaultJoranConfigurator.java:53)
at 	at ch.qos.logback.classic.util.DefaultJoranConfigurator.configure(DefaultJoranConfigurator.java:34)
at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:98)
at 	at ch.qos.logback.classic.util.ContextInitializer.autoConfig(ContextInitializer.java:77)
at 	at ch.qos.logback.classic.spi.LogbackServiceProvider.initializeLoggerContext(LogbackServiceProvider.java:50)
at 	at ch.qos.logback.classic.spi.LogbackServiceProvider.initialize(LogbackServiceProvider.java:41)
at 	at org.slf4j.LoggerFactory.bind(LoggerFactory.java:183)
at 	at org.slf4j.LoggerFactory.performInitialization(LoggerFactory.java:170)
at 	at org.slf4j.LoggerFactory.getProvider(LoggerFactory.java:455)
at 	at org.slf4j.LoggerFactory.getILoggerFactory(LoggerFactory.java:441)
at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:390)
at 	at org.slf4j.LoggerFactory.getLogger(LoggerFactory.java:416)
at 	at com.wgzhao.addax.core.Engine.(Engine.java:48)
05:50:52,838 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - Processing appender named [FILE]
05:50:52,838 |-INFO in ch.qos.logback.core.model.processor.AppenderModelHandler - About to instantiate appender of type [ch.qos.logback.core.FileAppender]
05:50:52,840 |-INFO in ch.qos.logback.core.FileAppender[FILE] - File property is set to [/opt/addax/log//addax_sk_install_20230609_055052_14505.log]
05:50:52,841 |-INFO in ch.qos.logback.classic.model.processor.RootLoggerModelHandler - Setting level of ROOT logger to INFO
05:50:52,841 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [STDOUT] to Logger[ROOT]
05:50:52,842 |-INFO in ch.qos.logback.core.model.processor.AppenderRefModelHandler - Attaching appender named [FILE] to Logger[ROOT]
05:50:52,842 |-INFO in ch.qos.logback.core.model.processor.DefaultProcessor@71423665 - End of configuration.
05:50:52,842 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@20398b7c - Registering current configuration as safe fallback point

/ _ \    | |   | |
/ /\ \ __| | __| | __ ___  __
|  _  |/  |/ _ |/ ` \ / /
| | | | (| | (| | (| |>  <
_| |/_,|_,|_,//_\
:: Addax version ::    (v4.1.0)
2023-06-09 05:50:53.047 [        main] INFO  VMInfo               - VMInfo# operatingSystem class => sun.management.OperatingSystemImpl
2023-06-09 05:50:53.059 [        main] INFO  Engine               -
{
"setting":{
"speed":{
"channel":3
},
"errorLimit":{
"record":0,
"percentage":0.00
}
},
"content":{
"reader":{
"name":"kudureader",
"parameter":{
"masterAddress":"10.168.xx.xx:7051,10.168.xx.xx:7051,10.168.xx.xx:7051",
"table":"impala::adjust.sk_install",
"database":"adjust"
}
},
"writer":{
"name":"doriswriter",
"parameter":{
"column":[
"activity_kind",
"adgroup_name",
"campaign_name",
"country",
"creative_name",
"gt_created_at",
"kafkaoffset",
"kafkapartition",
"kafkatopic",
"network_name",
"partner",
"sk_app_id",
"sk_attribution_signature",
"sk_campaign_id",
"sk_conversion_value",
"sk_did_win",
"sk_fidelity_type",
"sk_invalid_signature",
"sk_network_id",
"sk_payload",
"sk_redownload",
"sk_source_app_id",
"sk_transaction_id",
"sk_ts",
"sk_version",
"time",
"tracker",
"user_agent"
],
"username":"root",
"password":"*****",
"endpoint":[
"http://doris-fe-001:18030/"
],
"table":"k_install",
"database":"adjust",
"connection":[
{
"table":"sk_install",
"database":"adjust",
"endpoint":"http://doris-fe-001:18030/"
}
],
"loadProps":{
"strip_outer_array":"true"
},
"lineDelimiter":"\x02",
"format":"json"
}
}
}
}
2023-06-09 05:50:53.075 [        main] INFO  JobContainer         - The jobContainer begins to process the job.
2023-06-09 05:50:53.099 [       job-0] INFO  JobContainer         - The Reader.Job [kudureader] perform prepare work .
2023-06-09 05:50:53.099 [       job-0] INFO  JobContainer         - The Writer.Job [doriswriter] perform prepare work .
2023-06-09 05:50:53.099 [       job-0] INFO  JobContainer         - Job set Channel-Number to 3 channel(s).
2023-06-09 05:50:53.100 [       job-0] INFO  JobContainer         - The Reader.Job [kudureader] is divided into [1] task(s).
2023-06-09 05:50:53.100 [       job-0] INFO  JobContainer         - The Writer.Job [doriswriter] is divided into [1] task(s).
2023-06-09 05:50:53.123 [       job-0] INFO  JobContainer         - The Scheduler launches [1] taskGroup(s).
2023-06-09 05:50:53.130 [ taskGroup-0] INFO  TaskGroupContainer   - The taskGroupId=[0] started [1] channels for [1] tasks.
2023-06-09 05:50:53.133 [ taskGroup-0] INFO  Channel              - The Channel set byte_speed_limit to -1, No bps activated.
2023-06-09 05:50:53.133 [ taskGroup-0] INFO  Channel              - The Channel set record_speed_limit to -1, No tps activated.
2023-06-09 05:50:54.757 [  writer-0-0] ERROR WriterRunner         - Writer Runner Received Exceptions:
com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:81)
at java.lang.Thread.run(Thread.java:750)
at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:81)
at java.lang.Thread.run(Thread.java:750)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
... 3 common frames omitted
Exception in thread "taskGroup-0" com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:81)
at java.lang.Thread.run(Thread.java:750)
at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:81)
at java.lang.Thread.run(Thread.java:750)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
... 3 more
2023-06-09 05:50:56.138 [       job-0] ERROR JobContainer         - The scheduler failed to run.
2023-06-09 05:50:56.140 [       job-0] INFO  StandAloneJobContainerCommunicator - Total 1536 records, 1458349 bytes | Speed 1.39MB/s, 1536 records/s | Error 0 records, 0 bytes |  All Task WaitWriterTime 0.049s |  All Task WaitReaderTime 1.529s | Percentage 0.00%
com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:81)
at java.lang.Thread.run(Thread.java:750)
at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:81)
at java.lang.Thread.run(Thread.java:750)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
... 3 more

感觉这代码没写完

2023-09-08 16:26:52.572 [        main] INFO  JobContainer         - The jobContainer begins to process the job.
2023-09-08 16:26:52.948 [       job-0] INFO  OriginalConfPretreatmentUtil - Available jdbcUrl [jdbc:clickhouse://10.5.224.112:8123/bigdata].
2023-09-08 16:26:53.629 [       job-0] INFO  OriginalConfPretreatmentUtil - The table [channel_electric_station_tmp02] has columns [topic,dt,receive_timestamp,station_sn,device_address,key,ts,dbl_value,long_value,bool_value,str_value].
2023-09-08 16:26:53.639 [       job-0] INFO  StandAloneJobContainerCommunicator - Total 0 records, 0 bytes | Speed 0B/s, 0 records/s | Error 0 records, 0 bytes |  All Task WaitWriterTime 0.000s |  All Task WaitReaderTime 0.000s | Percentage 0.00%
com.wgzhao.addax.common.exception.AddaxException:  Endpoint must be set
at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:50)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:90)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:75)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Job.init(DorisWriter.java:50)
at com.wgzhao.addax.core.job.JobContainer.initJobWriter(JobContainer.java:610)
at com.wgzhao.addax.core.job.JobContainer.init(JobContainer.java:266)
at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:122)
at com.wgzhao.addax.core.Engine.start(Engine.java:61)
at com.wgzhao.addax.core.Engine.entry(Engine.java:112)
at com.wgzhao.addax.core.Engine.main(Engine.java:139)
2023-09-08 16:26:53.640 [       job-0] ERROR Engine               - com.wgzhao.addax.common.exception.AddaxException:  Endpoint must be set
你好. 我也报这个错误.请问如何解决呢?
{
"job": {
"setting": {
"speed": {
"channel": 1,
"bytes": -1
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": {
"reader": {
"name": "clickhousereader",
"parameter": {
"username": "default",
"password": "",
"column": [
"ts","dt","topic","receive_timestamp","station_sn","device_address","key","dbl_value","long_value","bool_value","str_value"
],
"connection": [
{
"table": [
"channel_electric_station_tmp02"
],
"jdbcUrl": [
"jdbc:clickhouse://xxx:8123/bigdata"
]
}
]
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"username": "root",
"password": "!QAZ2wsx#EDC",
"batchSize": 1024,
"connection": [
{
"table": "ods_powerstation_L5_power_telemetry_alarm_rt",
"database": "ODS",
"endpoint": ["http://5.255.xxxx:18030/"]
}
]
}
}
}
}
}

@ShangBaiShuYao 代码有两处判断 endpoint 的地方，但两处判断不一致，您可以把 endpoint 配置项再复制一份到 connection 的外部，也就是和  username 同级。值为字符串形式，类似如下:
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1,
        "bytes": -1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": {
      "reader": {
        "name": "clickhousereader",
        "parameter": {
          "username": "default",
          "password": "",
          "column": [
            "ts",
            "dt",
            "topic",
            "receive_timestamp",
            "station_sn",
            "device_address",
            "key",
            "dbl_value",
            "long_value",
            "bool_value",
            "str_value"
          ],
          "connection": [
            {
              "table": [
                "channel_electric_station_tmp02"
              ],
              "jdbcUrl": [
                "jdbc:clickhouse://xxx:8123/bigdata"
              ]
            }
          ]
        }
      },
      "writer": {
        "name": "doriswriter",
        "parameter": {
          "username": "root",
          "password": "!QAZ2wsx#EDC",
          "batchSize": 1024,
         "endpoint":  "http://5.255.xxxx:18030/",
          "connection": [
            {
              "table": "ods_powerstation_L5_power_telemetry_alarm_rt",
              "database": "ODS",
              "endpoint": [
                "http://5.255.xxxx:18030/"
              ]
            }
          ]
        }
      }
    }
  }
}

@ShangBaiShuYao 代码有两处判断 endpoint 的地方，但两处判断不一致，您可以把 endpoint 配置项再复制一份到 connection 的外部，也就是和 username 同级，类似如下:
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1,
        "bytes": -1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": {
      "reader": {
        "name": "clickhousereader",
        "parameter": {
          "username": "default",
          "password": "",
          "column": [
            "ts",
            "dt",
            "topic",
            "receive_timestamp",
            "station_sn",
            "device_address",
            "key",
            "dbl_value",
            "long_value",
            "bool_value",
            "str_value"
          ],
          "connection": [
            {
              "table": [
                "channel_electric_station_tmp02"
              ],
              "jdbcUrl": [
                "jdbc:clickhouse://xxx:8123/bigdata"
              ]
            }
          ]
        }
      },
      "writer": {
        "name": "doriswriter",
        "parameter": {
          "username": "root",
          "password": "!QAZ2wsx#EDC",
          "batchSize": 1024,
         "endpoint":  ["http://5.255.xxxx:18030/"],
          "connection": [
            {
              "table": "ods_powerstation_L5_power_telemetry_alarm_rt",
              "database": "ODS",
              "endpoint": [
                "http://5.255.xxxx:18030/"
              ]
            }
          ]
        }
      }
    }
  }
}

@wgzhao 您好. 我修改之后还是报错.
修改后的json:
{
"job": {
"setting": {
"speed": {
"channel": 1,
"bytes": -1
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": {
"reader": {
"name": "clickhousereader",
"parameter": {
"username": "default",
"password": "!QAZ2wsx#EDC",
"column": [
"ts","dt","topic","receive_timestamp","station_sn","device_address","key","dbl_value","long_value","bool_value","str_value"
],
"connection": [
{
"table": [
"channel_electric_station_tmp02"
],
"jdbcUrl": [
"jdbc:clickhouse://OpenEuler191:8123/bigdata"
]
}
]
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"username": "root",
"password": "!QAZ2wsx#EDC",
"batchSize": 1024,
"endpoint":  ["http://10.211.55.192:8030/"],
"connection": [
{
"table": "ods_powerstation_L5_power_telemetry_alarm_rt",
"database": "ODS",
"endpoint": ["http://10.211.55.192:8030/"]
}
],
"column": [
"ts","dt","topic","receive_timestamp","station_sn","device_address","key","dbl_value","long_value","bool_value","str_value"
]
}
}
}
}
}
报错内容:
2023-09-10 12:20:07.021 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction is not supported. Change jdbcCompliant to false to throw SQLException instead.
2023-09-10 12:20:07.021 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction [1f0ea042-6520-462c-bb6f-20aa693737e6](1 queries & 0 savepoints) is rolled back.
2023-09-10 12:20:07.022 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction is not supported. Change jdbcCompliant to false to throw SQLException instead.
2023-09-10 12:20:07.022 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction [62e116c2-ad93-4958-9a6a-1b4631a8ff7f](0 queries & 0 savepoints) is committed.
2023-09-10 12:20:07.025 [  writer-0-0] ERROR WriterRunner         - Writer Runner Received Exceptions:
com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
    at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
... 3 common frames omitted
Exception in thread "taskGroup-0" com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
    at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
... 3 more
2023-09-10 12:20:09.963 [       job-0] ERROR JobContainer         - The scheduler failed to run.
2023-09-10 12:20:09.965 [       job-0] INFO  StandAloneJobContainerCommunicator - Total 10 records, 775 bytes | Speed 775B/s, 10 records/s | Error 0 records, 0 bytes |  All Task WaitWriterTime 0.000s |  All Task WaitReaderTime 0.000s | Percentage 0.00%
com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
    at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
... 3 more
2023-09-10 12:20:09.967 [       job-0] ERROR Engine               - com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
还是写入doris不进去. 我尝试一下使用官网案例也写不进去. 请问有解决办法吗?

@ShangBaiShuYao 代码有两处判断 endpoint 的地方，但两处判断不一致，您可以把 endpoint 配置项再复制一份到 connection 的外部，也就是和 username 同级，类似如下:
{
  "job": {
    "setting": {
      "speed": {
        "channel": 1,
        "bytes": -1
      },
      "errorLimit": {
        "record": 0,
        "percentage": 0.02
      }
    },
    "content": {
      "reader": {
        "name": "clickhousereader",
        "parameter": {
          "username": "default",
          "password": "",
          "column": [
            "ts",
            "dt",
            "topic",
            "receive_timestamp",
            "station_sn",
            "device_address",
            "key",
            "dbl_value",
            "long_value",
            "bool_value",
            "str_value"
          ],
          "connection": [
            {
              "table": [
                "channel_electric_station_tmp02"
              ],
              "jdbcUrl": [
                "jdbc:clickhouse://xxx:8123/bigdata"
              ]
            }
          ]
        }
      },
      "writer": {
        "name": "doriswriter",
        "parameter": {
          "username": "root",
          "password": "!QAZ2wsx#EDC",
          "batchSize": 1024,
         "endpoint":  ["http://5.255.xxxx:18030/"],
          "connection": [
            {
              "table": "ods_powerstation_L5_power_telemetry_alarm_rt",
              "database": "ODS",
              "endpoint": [
                "http://5.255.xxxx:18030/"
              ]
            }
          ]
        }
      }
    }
  }
}

@wgzhao 您好. 我修改之后还是报错.
修改后的json:
{
"job": {
"setting": {
"speed": {
"channel": 1,
"bytes": -1
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": {
"reader": {
"name": "clickhousereader",
"parameter": {
"username": "default",
"password": "!QAZ2wsx#EDC",
"column": [
"ts","dt","topic","receive_timestamp","station_sn","device_address","key","dbl_value","long_value","bool_value","str_value"
],
"connection": [
{
"table": [
"channel_electric_station_tmp02"
],
"jdbcUrl": [
"jdbc:clickhouse://OpenEuler191:8123/bigdata"
]
}
]
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"username": "root",
"password": "!QAZ2wsx#EDC",
"batchSize": 1024,
"endpoint":  ["http://10.211.55.192:8030/"],
"connection": [
{
"table": "ods_powerstation_L5_power_telemetry_alarm_rt",
"database": "ODS",
"endpoint": ["http://10.211.55.192:8030/"]
}
],
"column": [
"ts","dt","topic","receive_timestamp","station_sn","device_address","key","dbl_value","long_value","bool_value","str_value"
]
}
}
}
}
}
报错内容:
2023-09-10 12:20:07.021 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction is not supported. Change jdbcCompliant to false to throw SQLException instead.
2023-09-10 12:20:07.021 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction [1f0ea042-6520-462c-bb6f-20aa693737e6](1 queries & 0 savepoints) is rolled back.
2023-09-10 12:20:07.022 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction is not supported. Change jdbcCompliant to false to throw SQLException instead.
2023-09-10 12:20:07.022 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction [62e116c2-ad93-4958-9a6a-1b4631a8ff7f](0 queries & 0 savepoints) is committed.
2023-09-10 12:20:07.025 [  writer-0-0] ERROR WriterRunner         - Writer Runner Received Exceptions:
com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
    at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
... 3 common frames omitted
Exception in thread "taskGroup-0" com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
    at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
... 3 more
2023-09-10 12:20:09.963 [       job-0] ERROR JobContainer         - The scheduler failed to run.
2023-09-10 12:20:09.965 [       job-0] INFO  StandAloneJobContainerCommunicator - Total 10 records, 775 bytes | Speed 775B/s, 10 records/s | Error 0 records, 0 bytes |  All Task WaitWriterTime 0.000s |  All Task WaitReaderTime 0.000s | Percentage 0.00%
com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
    at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
... 3 more
2023-09-10 12:20:09.967 [       job-0] ERROR Engine               - com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: None of the load url can be connected.
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:106)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:121)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:103)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
还是写入doris不进去. 我尝试一下使用官网案例也写不进去. 请问有解决办法吗?

你是用的master分支代码编译的吗？

你是用的master分支代码编译的吗？

我这个是4.1.1  是直接下载的. Master编译的应该是4.1.2呀.  这个真实情况是可以写进doris吗?  我测试好像写不进去呀.

目前修复的代码在master分支上
今天晚一些我出一个补丁给你

下载附件解压后，替换 $ADDAX_HOME/plugin/writer/doriswriter 下的同名文件，再试试看看
doriswriter-4.1.1.jar.zip

2023-09-11 08:24:54.359 [  writer-0-0] ERROR WriterRunner         - Writer Runner Received Exceptions:
java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:96)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:81)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.init(DorisWriterTask.java:74)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.init(DorisWriter.java:89)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:65)
at java.lang.Thread.run(Thread.java:748)
Exception in thread "taskGroup-0" com.wgzhao.addax.common.exception.AddaxException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:96)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:81)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.init(DorisWriterTask.java:74)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.init(DorisWriter.java:89)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:65)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.core.taskgroup.TaskGroupContainer.start(TaskGroupContainer.java:188)
    at com.wgzhao.addax.core.taskgroup.runner.TaskGroupContainerRunner.run(TaskGroupContainerRunner.java:44)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:96)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:81)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.init(DorisWriterTask.java:74)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.init(DorisWriter.java:89)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:65)
... 1 more
2023-09-11 08:24:54.601 [  reader-0-0] WARN  ClickHouseConnectionImpl - [JDBC Compliant Mode] Transaction is not supported. Change jdbcCompliant to false to throw SQLException instead.
2023-09-11 08:24:57.352 [       job-0] ERROR JobContainer         - The scheduler failed to run.
2023-09-11 08:24:57.354 [       job-0] INFO  StandAloneJobContainerCommunicator - Total 0 records, 0 bytes | Speed 0B/s, 0 records/s | Error 0 records, 0 bytes |  All Task WaitWriterTime 0.000s |  All Task WaitReaderTime 0.000s | Percentage 0.00%
com.wgzhao.addax.common.exception.AddaxException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:96)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:81)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.init(DorisWriterTask.java:74)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.init(DorisWriter.java:89)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:65)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.core.job.scheduler.processinner.ProcessInnerScheduler.dealFailedStat(ProcessInnerScheduler.java:63)
    at com.wgzhao.addax.core.job.scheduler.AbstractScheduler.schedule(AbstractScheduler.java:107)
    at com.wgzhao.addax.core.job.JobContainer.schedule(JobContainer.java:440)
    at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:128)
    at com.wgzhao.addax.core.Engine.start(Engine.java:61)
    at com.wgzhao.addax.core.Engine.entry(Engine.java:112)
    at com.wgzhao.addax.core.Engine.main(Engine.java:139)

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:96)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:81)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.init(DorisWriterTask.java:74)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.init(DorisWriter.java:89)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:65)
at java.lang.Thread.run(Thread.java:748)
2023-09-11 08:24:57.354 [       job-0] ERROR Engine               - com.wgzhao.addax.common.exception.AddaxException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:96)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:81)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.init(DorisWriterTask.java:74)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.init(DorisWriter.java:89)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:65)
at java.lang.Thread.run(Thread.java:748)
还是有问题.

2023-09-11 08:30:34.673 [        main] INFO  JobContainer         - The jobContainer begins to process the job.
2023-09-11 08:30:36.918 [       job-0] INFO  OriginalConfPretreatmentUtil - Available jdbcUrl [jdbc:clickhouse://10.5.224.112:8123/bigdata].
2023-09-11 08:30:36.985 [       job-0] INFO  OriginalConfPretreatmentUtil - The table [channel_electric_station_tmp02] has columns [topic,dt,receive_timestamp,station_sn,device_address,key,ts,dbl_value,long_value,bool_value,str_value].
2023-09-11 08:30:37.033 [       job-0] INFO  StandAloneJobContainerCommunicator - Total 0 records, 0 bytes | Speed 0B/s, 0 records/s | Error 0 records, 0 bytes |  All Task WaitWriterTime 0.000s |  All Task WaitReaderTime 0.000s | Percentage 0.00%
com.wgzhao.addax.common.exception.AddaxException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:85)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:66)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Job.init(DorisWriter.java:50)
at com.wgzhao.addax.core.job.JobContainer.initJobWriter(JobContainer.java:610)
at com.wgzhao.addax.core.job.JobContainer.init(JobContainer.java:266)
at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:122)
at com.wgzhao.addax.core.Engine.start(Engine.java:61)
at com.wgzhao.addax.core.Engine.entry(Engine.java:112)
at com.wgzhao.addax.core.Engine.main(Engine.java:139)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:165)
    at com.wgzhao.addax.core.Engine.start(Engine.java:61)
    at com.wgzhao.addax.core.Engine.entry(Engine.java:112)
    at com.wgzhao.addax.core.Engine.main(Engine.java:139)

Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:85)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:66)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Job.init(DorisWriter.java:50)
at com.wgzhao.addax.core.job.JobContainer.initJobWriter(JobContainer.java:610)
at com.wgzhao.addax.core.job.JobContainer.init(JobContainer.java:266)
at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:122)
... 3 more
2023-09-11 08:30:37.038 [       job-0] ERROR Engine               - com.wgzhao.addax.common.exception.AddaxException: java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List
at com.wgzhao.addax.common.util.Configuration.getList(Configuration.java:515)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.initHostList(DorisWriterEmitter.java:85)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.(DorisWriterEmitter.java:66)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Job.init(DorisWriter.java:50)
at com.wgzhao.addax.core.job.JobContainer.initJobWriter(JobContainer.java:610)
at com.wgzhao.addax.core.job.JobContainer.init(JobContainer.java:266)
at com.wgzhao.addax.core.job.JobContainer.start(JobContainer.java:122)
at com.wgzhao.addax.core.Engine.start(Engine.java:61)
at com.wgzhao.addax.core.Engine.entry(Engine.java:112)
at com.wgzhao.addax.core.Engine.main(Engine.java:139)
这是我上周五编译的master分支上的做的4.1.2的jar包. 今天按照你给的正确的json跑完所报的错误.  上面那个是你给我的4.1.1的doriswrite 的jar包放到替换4.1.1的jar 所报的错误. 根据日志信息来看，发生了一个错误：java.lang.ClassCastException: java.lang.String cannot be cast to java.util.List。这可能是由于代码中的类型转换问题导致的.

你的 endpoint 配置的是数组形式吗？

报错信息:
2023-09-11 08:41:13.923 [       job-0] ERROR JobContainer         - The scheduler failed to run.
2023-09-11 08:41:13.925 [       job-0] INFO  StandAloneJobContainerCommunicator - Total 1536 records, 101376 bytes | Speed 99.00KB/s, 1536 records/s | Error 0 records, 0 bytes |  All Task WaitWriterTime 0.025s |  All Task WaitReaderTime 0.643s | Percentage 0.00%
com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: Failed to flush data to doris.
{"TxnId":434379,"Label":"addax_doris_writer_b7daad53-e32f-426b-b863-dc456c00874d_0","Comment":"","TwoPhaseCommit":"false","Status":"Fail","Message":"[ANALYSIS_ERROR]errCode = 2, detailMessage = Syntax error in line 1:\n...station_sn,device_address,key,dbl_value,long_value,boo...\n                             ^\nEncountered: KEY\nExpected: KEY is keyword, maybe KEY\n\n0. /root/src/doris-2.0/be/src/common/stack_trace.cpp:302: StackTrace::tryCapture() @ 0x000000000b8a51a7 in /data/module/doris/doris/be/lib/doris_be\n1. /root/src/doris-2.0/be/src/common/stack_trace.h:0: doris::get_stack_traceabi:cxx11 @ 0x000000000b8a377d in /data/module/doris/doris/be/lib/doris_be\n2. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:187: doris::Status doris::Status::Error(int, std::basic_string_view<char, std::char_traits >) @ 0x000000000ad9807b in /data/module/doris/doris/be/lib/doris_be\n3. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:187: doris::Status::create(doris::TStatus const&) @ 0x000000000b5668fe in /data/module/doris/doris/be/lib/doris_be\n4. /root/src/doris-2.0/be/src/common/status.h:420: doris::StreamLoadAction::_process_put(doris::HttpRequest*, std::shared_ptrdoris::StreamLoadContext) @ 0x000000000bcf7995 in /data/module/doris/doris/be/lib/doris_be\n5. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701: doris::StreamLoadAction::on_header(doris::HttpRequest*, std::shared_ptrdoris::StreamLoadContext) @ 0x000000000bcf5305 in /data/module/doris/doris/be/lib/doris_be\n6. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701: doris::StreamLoadAction::on_header(doris::HttpRequest*) @ 0x000000000bcf4422 in /data/module/doris/doris/be/lib/doris_be\n7. /root/src/doris-2.0/be/src/http/ev_http_server.cpp:251: doris::EvHttpServer::on_header(evhttp_request*) @ 0x000000000bd12511 in /data/module/doris/doris/be/lib/doris_be\n8. ? @ 0x0000000012f03afd in /data/module/doris/doris/be/lib/doris_be\n9. bufferevent_run_readcb @ 0x0000000012ee9896 in /data/module/doris/doris/be/lib/doris_be\n10. ? @ 0x0000000012f050af in /data/module/doris/doris/be/lib/doris_be\n11. ? @ 0x0000000012ef58e9 in /data/module/doris/doris/be/lib/doris_be\n12. event_base_loop @ 0x0000000012ef20ef in /data/module/doris/doris/be/lib/doris_be\n13. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/ext/atomicity.h:98: std::_Function_handler<void (), doris::EvHttpServer::start()::$_0>::_M_invoke(std::_Any_data const&) @ 0x000000000bd129e7 in /data/module/doris/doris/be/lib/doris_be\n14. /root/src/doris-2.0/be/src/util/threadpool.cpp:0: doris::ThreadPool::dispatch_thread() @ 0x000000000b8e193f in /data/module/doris/doris/be/lib/doris_be\n15. /var/local/ldb-toolchain/bin/../usr/include/pthread.h:562: doris::Thread::supervise_thread(void*) @ 0x000000000b8d79fc in /data/module/doris/doris/be/lib/doris_be\n16. ? @ 0x0000000000008f1b in /usr/lib64/libpthread-2.28.so\n17. __clone @ 0x00000000000f81a0 in /usr/lib64/libc-2.28.so\n","NumberTotalRows":0,"NumberLoadedRows":0,"NumberFilteredRows":0,"NumberUnselectedRows":0,"LoadBytes":0,"LoadTimeMs":0,"BeginTxnTimeMs":32,"StreamLoadPutTimeMs":16,"ReadDataTimeMs":0,"WriteDataTimeMs":0,"CommitAndPublishTimeMs":0}
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:140)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:100)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
    at com.wgzhao.addax.common.exception.AddaxException.asAddaxException(AddaxException.java:66)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:125)
    at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:100)
    at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
    at java.lang.Thread.run(Thread.java:748)

Caused by: java.io.IOException: Failed to flush data to doris.
{"TxnId":434379,"Label":"addax_doris_writer_b7daad53-e32f-426b-b863-dc456c00874d_0","Comment":"","TwoPhaseCommit":"false","Status":"Fail","Message":"[ANALYSIS_ERROR]errCode = 2, detailMessage = Syntax error in line 1:\n...station_sn,device_address,key,dbl_value,long_value,boo...\n                             ^\nEncountered: KEY\nExpected: KEY is keyword, maybe KEY\n\n0. /root/src/doris-2.0/be/src/common/stack_trace.cpp:302: StackTrace::tryCapture() @ 0x000000000b8a51a7 in /data/module/doris/doris/be/lib/doris_be\n1. /root/src/doris-2.0/be/src/common/stack_trace.h:0: doris::get_stack_traceabi:cxx11 @ 0x000000000b8a377d in /data/module/doris/doris/be/lib/doris_be\n2. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:187: doris::Status doris::Status::Error(int, std::basic_string_view<char, std::char_traits >) @ 0x000000000ad9807b in /data/module/doris/doris/be/lib/doris_be\n3. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:187: doris::Status::create(doris::TStatus const&) @ 0x000000000b5668fe in /data/module/doris/doris/be/lib/doris_be\n4. /root/src/doris-2.0/be/src/common/status.h:420: doris::StreamLoadAction::_process_put(doris::HttpRequest*, std::shared_ptrdoris::StreamLoadContext) @ 0x000000000bcf7995 in /data/module/doris/doris/be/lib/doris_be\n5. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701: doris::StreamLoadAction::on_header(doris::HttpRequest*, std::shared_ptrdoris::StreamLoadContext) @ 0x000000000bcf5305 in /data/module/doris/doris/be/lib/doris_be\n6. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701: doris::StreamLoadAction::on_header(doris::HttpRequest*) @ 0x000000000bcf4422 in /data/module/doris/doris/be/lib/doris_be\n7. /root/src/doris-2.0/be/src/http/ev_http_server.cpp:251: doris::EvHttpServer::on_header(evhttp_request*) @ 0x000000000bd12511 in /data/module/doris/doris/be/lib/doris_be\n8. ? @ 0x0000000012f03afd in /data/module/doris/doris/be/lib/doris_be\n9. bufferevent_run_readcb @ 0x0000000012ee9896 in /data/module/doris/doris/be/lib/doris_be\n10. ? @ 0x0000000012f050af in /data/module/doris/doris/be/lib/doris_be\n11. ? @ 0x0000000012ef58e9 in /data/module/doris/doris/be/lib/doris_be\n12. event_base_loop @ 0x0000000012ef20ef in /data/module/doris/doris/be/lib/doris_be\n13. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/ext/atomicity.h:98: std::_Function_handler<void (), doris::EvHttpServer::start()::$_0>::_M_invoke(std::_Any_data const&) @ 0x000000000bd129e7 in /data/module/doris/doris/be/lib/doris_be\n14. /root/src/doris-2.0/be/src/util/threadpool.cpp:0: doris::ThreadPool::dispatch_thread() @ 0x000000000b8e193f in /data/module/doris/doris/be/lib/doris_be\n15. /var/local/ldb-toolchain/bin/../usr/include/pthread.h:562: doris::Thread::supervise_thread(void*) @ 0x000000000b8d79fc in /data/module/doris/doris/be/lib/doris_be\n16. ? @ 0x0000000000008f1b in /usr/lib64/libpthread-2.28.so\n17. __clone @ 0x00000000000f81a0 in /usr/lib64/libc-2.28.so\n","NumberTotalRows":0,"NumberLoadedRows":0,"NumberFilteredRows":0,"NumberUnselectedRows":0,"LoadBytes":0,"LoadTimeMs":0,"BeginTxnTimeMs":32,"StreamLoadPutTimeMs":16,"ReadDataTimeMs":0,"WriteDataTimeMs":0,"CommitAndPublishTimeMs":0}
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:140)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
... 3 more
2023-09-11 08:41:13.926 [       job-0] ERROR Engine               - com.wgzhao.addax.common.exception.AddaxException: java.io.IOException: Failed to flush data to doris.
{"TxnId":434379,"Label":"addax_doris_writer_b7daad53-e32f-426b-b863-dc456c00874d_0","Comment":"","TwoPhaseCommit":"false","Status":"Fail","Message":"[ANALYSIS_ERROR]errCode = 2, detailMessage = Syntax error in line 1:\n...station_sn,device_address,key,dbl_value,long_value,boo...\n                             ^\nEncountered: KEY\nExpected: KEY is keyword, maybe KEY\n\n0. /root/src/doris-2.0/be/src/common/stack_trace.cpp:302: StackTrace::tryCapture() @ 0x000000000b8a51a7 in /data/module/doris/doris/be/lib/doris_be\n1. /root/src/doris-2.0/be/src/common/stack_trace.h:0: doris::get_stack_traceabi:cxx11 @ 0x000000000b8a377d in /data/module/doris/doris/    be/lib/doris_be\n2. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:187: doris::Status doris::Status::Error(int, std::basic_string_view<char, std::char_traits >) @ 0x000000000ad9807b in /data/module/doris/doris/be/lib/doris_be\n3. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/basic_string.h:187: doris::Status::create(doris::TStatus const&) @ 0x000000000b5668fe in /data/module/doris/doris/be/lib/doris_be\n4. /root/src/doris-2.0/be/src/common/status.h:420: doris::StreamLoadAction::_process_put(doris::HttpRequest*, std::shared_ptrdoris::StreamLoadContext) @ 0x000000000bcf7995 in /data/module/doris/doris/be/lib/doris_be\n5. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701: doris::StreamLoadAction::on_header(doris::HttpRequest*, std::shared_ptrdoris::StreamLoadContext) @ 0x000000000bcf5305 in /data/module/doris/doris/be/lib/doris_be\n6. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/bits/shared_ptr_base.h:701: doris::StreamLoadAction::on_header(doris::HttpRequest*) @ 0x000000000bcf4422 in /data/module/doris/doris/be/lib/doris_be\n7. /root/src/doris-2.0/be/src/http/ev_http_server.cpp:251: doris::EvHttpServer::on_header(evhttp_request*) @ 0x000000000bd12511 in /data/module/doris/doris/be/lib/doris_be\n8. ? @ 0x0000000012f03afd in /data/module/doris/doris/be/lib/doris_be\n9. bufferevent_run_readcb @ 0x0000000012ee9896 in /data/module/doris/doris/be/lib/doris_be\n10. ? @ 0x0000000012f050af in /data/module/doris/doris/be/lib/doris_be\n11. ? @ 0x0000000012ef58e9 in /data/module/doris/doris/be/lib/doris_be\n12. event_base_loop @ 0x0000000012ef20ef in /data/module/doris/doris/be/lib/doris_be\n13. /var/local/ldb-toolchain/bin/../lib/gcc/x86_64-linux-gnu/11/../../../../include/c++/11/ext/atomicity.h:98: std::_Function_handler<void (), doris::EvHttpServer::start()::$_0>::_M_invoke(std::_Any_data const&) @ 0x000000000bd129e7 in /data/module/doris/doris/be/lib/doris_be\n14. /root/src/doris-2.0/be/src/util/threadpool.cpp:0: doris::ThreadPool::dispatch_thread() @ 0x000000000b8e193f in /data/module/doris/doris/be/lib/doris_be\n15. /var/local/ldb-toolchain/bin/../usr/include/pthread.h:562: doris::Thread::supervise_thread(void*) @ 0x000000000b8d79fc in /data/module/doris/doris/be/lib/doris_be\n16. ? @ 0x0000000000008f1b in /usr/lib64/libpthread-2.28.so\n17. __clone @ 0x00000000000f81a0 in /usr/lib64/libc-2.28.so\n","NumberTotalRows":0,"NumberLoadedRows":0,"NumberFilteredRows":0,"NumberUnselectedRows":0,"LoadBytes":0,"LoadTimeMs":0,"BeginTxnTimeMs":32,"StreamLoadPutTimeMs":16,"ReadDataTimeMs":0,"WriteDataTimeMs":0,"CommitAndPublishTimeMs":0}
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterEmitter.doStreamLoad(DorisWriterEmitter.java:140)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.flush(DorisWriterTask.java:134)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriterTask.startWrite(DorisWriterTask.java:112)
at com.wgzhao.addax.plugin.writer.doriswriter.DorisWriter$Task.startWrite(DorisWriter.java:100)
at com.wgzhao.addax.core.taskgroup.runner.WriterRunner.run(WriterRunner.java:77)
at java.lang.Thread.run(Thread.java:748)
json文件:
{
"job": {
"setting": {
"speed": {
"channel": 1,
"bytes": -1
},
"errorLimit": {
"record": 0,
"percentage": 0.02
}
},
"content": {
"reader": {
"name": "clickhousereader",
"parameter": {
"username": "xxxx",
"password": "xxxx",
"column": [
"ts","dt","topic","receive_timestamp","station_sn","device_address","key","dbl_value","long_value","bool_value","str_value"
],
"connection": [
{
"table": [
"channel_electric_station_tmp02"
],
"jdbcUrl": [
"jdbc:clickhouse://xxx:8123/bigdata"
]
}
]
}
},
"writer": {
"name": "doriswriter",
"parameter": {
"username": "xxxx",
"password": "xxxx",
"batchSize": 1024,
"endpoint": ["http://xxx:8030/"],
"column": [
"ts","dt","topic","receive_timestamp","station_sn","device_address","key","dbl_value","long_value","bool_value","str_value"
],
"connection": [
{
"table": "ods_powerstation_L5_power_telemetry_alarm_rt",
"database": "ODS",
"endpoint": ["http://xxx:8030/"]
}
]
}
}
}
}
}
确实刚刚那个问题是endpoint没有配置数组形式导致的. 修改之后有报错 ERROR Engine               - com.wgzhao.addax.common.exception.AddaxException: config writer column info error. because the column number of reader is :11and the column number of writer is:0. please check your job config json 添加配置信息"column": [
"ts","dt","topic","receive_timestamp","station_sn","device_address","key","dbl_value","long_value","bool_value","str_value"
]这个之后又报上面那个数据刷写到 Doris 时发生了错误. 请问这个一般是什么原因造成的呢?

从报错来看好像是Doris内部错误
你用的什么版本？
我看本地能不能复现？

doris用的是2.0.1版本的

这是Clickhouse建表语句:
-- bigdata.channel_electric_station_tmp02 definition
CREATE TABLE bigdata.channel_electric_station_tmp02
(
`topic` String,

`dt` Date,

`receive_timestamp` UInt64,

`station_sn` String,

`device_address` String,

`key` String,

`ts` UInt64,

`dbl_value` Nullable(Float64),

`long_value` Nullable(Int64),

`bool_value` Nullable(Bool),

`str_value` Nullable(String)

)
ENGINE = ReplacingMergeTree
PARTITION BY toYYYYMMDD(toDateTime64(ts / 1000,
3,
'Asia/Shanghai'))
ORDER BY (topic,
station_sn,
device_address,
key,
ts,
receive_timestamp)
SETTINGS index_granularity = 8192;
这是doris建表语句:
DROP TABLE ods_powerstation_L5_power_telemetry_alarm_rt;
CREATE TABLE IF NOT EXISTS ODS.ods_powerstation_L5_power_telemetry_alarm_rt
(
ts LARGEINT COMMENT '时间戳',
dt DATEV2   COMMENT '导入日期',
topic STRING   COMMENT '数据源KAFKA主题',
receive_timestamp LARGEINT COMMENT '接受时间',
station_sn STRING COMMENT '车站号',
device_address STRING COMMENT '设备地址',
key STRING COMMENT '键',
dbl_value DOUBLE COMMENT 'dbl值',
long_value BIGINT COMMENT 'long值',
bool_value STRING COMMENT 'bool值',
str_value STRING COMMENT 'string值'
)
DUPLICATE KEY(ts,dt)
PARTITION BY RANGE(dt)()
DISTRIBUTED BY HASH(ts) BUCKETS 15
properties(
"dynamic_partition.buckets" = "15",
"dynamic_partition.enable" = "true",
"dynamic_partition.time_unit" = "WEEK",
"dynamic_partition.start" = "-2147483648",
"dynamic_partition.end" = "2",
"dynamic_partition.prefix" = "P",
"dynamic_partition.time_zone" = "Asia/Shanghai",
"dynamic_partition.create_history_partition"="true",
"dynamic_partition.history_partition_num"="87"
);

detailMessage = Syntax error in line 1:\n...station_sn,device_address,key,dbl_value,long_value,boo...\n ^\nEncountered: KEY\nExpected: KEY is keyword

从这个报错来看，是说字段key 是一个关键字，你可以修改字段名称 key 为其他名称，再试下。

感谢. 确实是key位关键词的问题. 改为key就可以了. 谢谢!!!

authors: ShangBaiShuYao hnwkz wgzhao

repo: wgzhao/Addax