问答 使用chunjun写入starrocks报错如下

使用chunjun写入starrocks报错如下

   wsw    发布于 2022-11-16 11:35  22  0
2022-11-07 15:22:06,195 - 164641 ERROR [timer-data-write-thread-pool-1-thread-1] com.dtstack.chunjun.sink.format.BaseRichOutputFormat:Writing records failed. com.dtstack.chunjun.throwable.ChunJunRuntimeException: write starRocks failed.
at com.dtstack.chunjun.connector.starrocks.sink.StarRocksOutputFormat.writeRecordInternal(StarRocksOutputFormat.java:109)
at com.dtstack.chunjun.sink.format.BaseRichOutputFormat.lambda$initTimingSubmitTask$0(BaseRichOutputFormat.java:456)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
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:750)
Caused by: com.dtstack.chunjun.throwable.CastException: String[test2] can not cast to BigDecimal.
at com.dtstack.chunjun.element.column.StringColumn.asBigDecimal(StringColumn.java:179)
at com.dtstack.chunjun.element.AbstractBaseColumn.asInt(AbstractBaseColumn.java:115)
at com.dtstack.chunjun.element.ColumnRowData.getInt(ColumnRowData.java:232)
at com.dtstack.chunjun.connector.starrocks.converter.StarRocksColumnConverter.lambda$createExternalConverter$52f58669$4(StarRocksColumnConverter.java:177)
at com.dtstack.chunjun.connector.starrocks.converter.StarRocksColumnConverter.lambda$wrapIntoNullableExternalConverter$8128a6cc$1(StarRocksColumnConverter.java:107)
at com.dtstack.chunjun.connector.starrocks.converter.StarRocksColumnConverter.toExternal(StarRocksColumnConverter.java:116)
at com.dtstack.chunjun.connector.starrocks.converter.StarRocksColumnConverter.toExternal(StarRocksColumnConverter.java:55)
at com.dtstack.chunjun.connector.starrocks.sink.NormalWriteProcessor.write(NormalWriteProcessor.java:56)
at com.dtstack.chunjun.connector.starrocks.sink.StarRocksOutputFormat.writeMultipleRecordsInternal(StarRocksOutputFormat.java:70)
at com.dtstack.chunjun.connector.starrocks.sink.StarRocksOutputFormat.writeRecordInternal(StarRocksOutputFormat.java:97)

信息 ``` String[test2] can not cast to BigDecimal ``` 看起来比较奇怪。我只有数据源有test2. 其他地方都没有出现这个信息。

配置json如下

{
"job": {
"content": [
{
"reader": {
"parameter": {
"table": ["test2.testc1"],
"password": "",
"database": "test2",
"port": 3306,
"cat": "insert,update,delete",
"host": "172.26.194.184",
"jdbcUrl": "jdbc:mysql://*.*.*.184:3306/test2",
"pavingData": true,
"username": "root"
},
"name": "binlogreader"
},
"writer": {
"parameter": {
"url": "jdbc:mysql://*.*.*.184:9232",
"feNodes": [
"*.*.*..184:8232",
*.*.*..185:8232",
"*.*.*..186:8232"
],
"database": "wsw",
"table": "testc1",
"username": "root",
"password": "",
"column": [
{
"name": "c1",
"type": "int"
},
{
"name": "c2",
"type": "int"
}
]
},
"name": "starrockswriter"
},
"transformer": {}
}
],
"setting": {
"errorLimit": {
"record": 100
},
"speed": {
"bytes": 0,
"channel": 1,
"readerChannel": 1,
"writerChannel": 1
}
}
}
}


0条回答
社区公告
  • 大数据领域最专业的产品&技术交流社区,专注于探讨与分享大数据领域有趣又火热的信息,专业又专注的数据人园地

最新活动更多
微信扫码获取数字化转型资料
钉钉扫码加入技术交流群