apache / seatunnel

SeaTunnel is a next-generation super high-performance, distributed, massive data integration tool.
https://seatunnel.apache.org/
Apache License 2.0
7.8k stars 1.75k forks source link

When configuring partition_column, the source data is 0 and an error is reported. #5859

Closed 15810785091 closed 8 months ago

15810785091 commented 10 months ago

Search before asking

What happened

当source中配置partition_column时,query无返回数据,报错,有返回数据时候无问题 去掉partition_column,任务正常启动,运行完成。

SeaTunnel Version

2.3.3

SeaTunnel Config

"source" : [
            {
                "password" : "",
                "driver" : "com.mysql.cj.jdbc.Driver",
                "query" : "select * from  douyin_xingtu_star_works_record_v3  where  update_time >=  UNIX_TIMESTAMP(DATE_SUB(CURDATE(), INTERVAL 1 DAY)) ",
                "connection_check_timeout_sec" : 100,
                "result_table_name" : "source_douyin_xingtu_star_works_record_v3",
                "plugin_name" : "Jdbc",
                "user" : "",
                "url" : "jdbc:mysql://************:***/data_center?zeroDateTimeBehavior=convertToNull"
            }
        ]

Running Command

Cluster mode

Error Exception

2023-11-16 09:44:42,826 INFO  com.hazelcast.core.LifecycleService - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is CLIENT_DISCONNECTED
    2023-11-16 09:44:42,830 INFO  com.hazelcast.core.LifecycleService - hz.client_1 [seatunnel] [5.1] HazelcastClient 5.1 (20220228 - 21f20e7) is SHUTDOWN
    2023-11-16 09:44:42,830 INFO  org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand - Closed SeaTunnel client......
    2023-11-16 09:44:42,830 INFO  org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand - Closed metrics executor service ......
    2023-11-16 09:44:42,830 ERROR org.apache.seatunnel.core.starter.SeaTunnel - 

    ===============================================================================

    2023-11-16 09:44:42,831 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Fatal Error, 

    2023-11-16 09:44:42,831 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Please submit bug report in https://github.com/apache/seatunnel/issues

    2023-11-16 09:44:42,831 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Reason:SeaTunnel job executed failed 

    2023-11-16 09:44:42,833 ERROR org.apache.seatunnel.core.starter.SeaTunnel - Exception StackTrace:org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
        at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:191)
        at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
        at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
    Caused by: org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: java.lang.NullPointerException
        at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.split.JdbcNumericBetweenParametersProvider.<init>(JdbcNumericBetweenParametersProvider.java:57)
        at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceSplitEnumerator.discoverySplits(JdbcSourceSplitEnumerator.java:118)
        at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceSplitEnumerator.run(JdbcSourceSplitEnumerator.java:87)
        at org.apache.seatunnel.engine.server.task.SourceSplitEnumeratorTask.stateProcess(SourceSplitEnumeratorTask.java:303)
        at org.apache.seatunnel.engine.server.task.SourceSplitEnumeratorTask.call(SourceSplitEnumeratorTask.java:134)
        at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:613)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        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)

        at org.apache.seatunnel.engine.client.job.ClientJobProxy.waitForJobComplete(ClientJobProxy.java:122)
        at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:184)
        ... 2 more

    2023-11-16 09:44:42,833 ERROR org.apache.seatunnel.core.starter.SeaTunnel - 
    ===============================================================================

    Exception in thread "main" org.apache.seatunnel.core.starter.exception.CommandExecuteException: SeaTunnel job executed failed
        at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:191)
        at org.apache.seatunnel.core.starter.SeaTunnel.run(SeaTunnel.java:40)
        at org.apache.seatunnel.core.starter.seatunnel.SeaTunnelClient.main(SeaTunnelClient.java:34)
    Caused by: org.apache.seatunnel.engine.common.exception.SeaTunnelEngineException: java.lang.NullPointerException
        at org.apache.seatunnel.connectors.seatunnel.jdbc.internal.split.JdbcNumericBetweenParametersProvider.<init>(JdbcNumericBetweenParametersProvider.java:57)
        at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceSplitEnumerator.discoverySplits(JdbcSourceSplitEnumerator.java:118)
        at org.apache.seatunnel.connectors.seatunnel.jdbc.source.JdbcSourceSplitEnumerator.run(JdbcSourceSplitEnumerator.java:87)
        at org.apache.seatunnel.engine.server.task.SourceSplitEnumeratorTask.stateProcess(SourceSplitEnumeratorTask.java:303)
        at org.apache.seatunnel.engine.server.task.SourceSplitEnumeratorTask.call(SourceSplitEnumeratorTask.java:134)
        at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:613)
        at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
        at java.util.concurrent.FutureTask.run(FutureTask.java:266)
        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)

        at org.apache.seatunnel.engine.client.job.ClientJobProxy.waitForJobComplete(ClientJobProxy.java:122)
        at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:184)
        ... 2 more
    2023-11-16 09:44:42,836 INFO  org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand - run shutdown hook because get close signal
[INFO] 2023-11-16 09:44:43.033 +0800 - FINALIZE_SESSION

Zeta or Flink or Spark Version

zeta

Java or Scala Version

No response

Screenshots

No response

Are you willing to submit PR?

Code of Conduct

Carl-Zhou-CN commented 9 months ago

hi, @15810785091 Can you help me try using the latest dev branch code

15810785091 commented 9 months ago

I am now in a formal system environment and cannot be tested with dev.

github-actions[bot] commented 8 months ago

This issue has been automatically marked as stale because it has not had recent activity for 30 days. It will be closed in next 7 days if no further activity occurs.

github-actions[bot] commented 8 months ago

This issue has been closed because it has not received response for too long time. You could reopen it if you encountered similar problems in the future.