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

mysql8 同步 es8 报空指针 #5344

Open
lonelybeanz opened this issue Dec 6, 2024 · 0 comments
Open

mysql8 同步 es8 报空指针 #5344

lonelybeanz opened this issue Dec 6, 2024 · 0 comments

Comments

@lonelybeanz
Copy link

2024-12-06 07:50:08.701 [pool-3-thread-1] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - java.util.NoSuchElementException
java.lang.RuntimeException: java.util.NoSuchElementException
at com.alibaba.otter.canal.client.adapter.es.core.service.ESSyncService.sync(ESSyncService.java:112)
at com.alibaba.otter.canal.client.adapter.es.core.service.ESSyncService.sync(ESSyncService.java:60)
at com.alibaba.otter.canal.client.adapter.es.core.ESAdapter.sync(ESAdapter.java:104)
at com.alibaba.otter.canal.client.adapter.es.core.ESAdapter.sync(ESAdapter.java:83)
at com.alibaba.otter.canal.client.adapter.ProxyOuterAdapter.sync(ProxyOuterAdapter.java:42)
at com.alibaba.otter.canal.adapter.launcher.loader.AdapterProcessor.batchSync(AdapterProcessor.java:139)
at com.alibaba.otter.canal.adapter.launcher.loader.AdapterProcessor.lambda$null$1(AdapterProcessor.java:97)
at java.base/java.util.concurrent.CopyOnWriteArrayList.forEach(CopyOnWriteArrayList.java:807)
at com.alibaba.otter.canal.adapter.launcher.loader.AdapterProcessor.lambda$null$2(AdapterProcessor.java:94)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
at java.base/java.lang.Thread.run(Thread.java:829)
Caused by: java.util.NoSuchElementException: null
at java.base/java.util.ArrayList$Itr.next(ArrayList.java:1000)
at com.alibaba.otter.canal.client.adapter.es8x.support.ES8xTemplate.getESDataFromDmlData(ES8xTemplate.java:317)
at com.alibaba.otter.canal.client.adapter.es.core.service.ESSyncService.singleTableSimpleFiledUpdate(ESSyncService.java:814)
at com.alibaba.otter.canal.client.adapter.es.core.service.ESSyncService.update(ESSyncService.java:262)
at com.alibaba.otter.canal.client.adapter.es.core.service.ESSyncService.sync(ESSyncService.java:97)
... 12 common frames omitted
2024-12-06 07:50:08.701 [Thread-3] ERROR c.a.otter.canal.adapter.launcher.loader.AdapterProcessor - Outer adapter sync failed! Error sync and rollback, execute times: 407

已增加别名了。

dataSourceKey: defaultDS
outerAdapterKey: scutum
destination: example
groupId: g1
esMapping:
_index: scutum_tx_infos
_id: id
upsert: true
pk: id
sql: "SELECT t.id AS id, CAST(IFNULL(UNIX_TIMESTAMP(t.created_at), 0) * 1000 AS SIGNED) AS created_at, CAST(IFNULL(UNIX_TIMESTAMP(t.updated_at), 0) * 1000 AS SIGNED) AS updated_at, CAST(IFNULL(UNIX_TIMESTAMP(t.deleted_at), 0) * 1000 AS SIGNED) AS deleted_at, t.tx_relation_id AS tx_relation_id , t.tx_hash AS tx_hash, t.chain_id AS chain_id, t.tx_type AS tx_type, t.status AS status, t.block_number AS block_number , t.gas_used AS gas_used, t.gas_price AS gas_price, IFNULL(t.from, '') AS from , IFNULL(t.to, '') AS to , IFNULL(t.value, '') AS value, CAST(IFNULL(UNIX_TIMESTAMP(t.tx_time), 0) * 1000 AS SIGNED) AS tx_time , t.rpc_id AS rpc_id, t.builder AS builder, CAST(IFNULL(UNIX_TIMESTAMP(t.arrival_time), 0) * 1000 AS SIGNED) AS arrival_time FROM tx_infos t"
commitBatch: 3000
etlCondition: "WHERE t.created_at >={} AND t.created_at < {}"
mapAll: false

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

No branches or pull requests

1 participant