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

[bugfix][TDengine]Added null check in TDengineSourceReader's convertDataType method #6719

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

edisonX-sudo
Copy link

@edisonX-sudo edisonX-sudo commented Apr 16, 2024

logs below printed while invoking method: convertDataType with a null parameter

2024-04-16 11:27:13,131 ERROR [o.a.s.c.s.SeaTunnel           ] [main] -
===============================================================================



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:199)
	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: org.apache.seatunnel.connectors.seatunnel.tdengine.exception.TDengineConnectorException: ErrorCode:[COMMON-12], ErrorDescription:[Source reader operation failed, such as (open, close) etc...] - TDengine split read error
	at org.apache.seatunnel.connectors.seatunnel.tdengine.source.TDengineSourceReader.lambda$pollNext$0(TDengineSourceReader.java:78)
	at java.lang.Iterable.forEach(Iterable.java:75)
	at org.apache.seatunnel.connectors.seatunnel.tdengine.source.TDengineSourceReader.pollNext(TDengineSourceReader.java:73)
	at org.apache.seatunnel.engine.server.task.flow.SourceFlowLifeCycle.collect(SourceFlowLifeCycle.java:150)
	at org.apache.seatunnel.engine.server.task.SourceSeaTunnelTask.collect(SourceSeaTunnelTask.java:116)
	at org.apache.seatunnel.engine.server.task.SeaTunnelTask.stateProcess(SeaTunnelTask.java:168)
	at org.apache.seatunnel.engine.server.task.SourceSeaTunnelTask.call(SourceSeaTunnelTask.java:121)
	at org.apache.seatunnel.engine.server.TaskExecutionService$BlockingWorker.run(TaskExecutionService.java:643)
	at org.apache.seatunnel.engine.server.TaskExecutionService$NamedTaskWrapper.run(TaskExecutionService.java:944)
	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)
Caused by: java.lang.NullPointerException
	at org.apache.seatunnel.connectors.seatunnel.tdengine.source.TDengineSourceReader.convertDataType(TDengineSourceReader.java:150)
	at org.apache.seatunnel.connectors.seatunnel.tdengine.source.TDengineSourceReader.read(TDengineSourceReader.java:142)
	at org.apache.seatunnel.connectors.seatunnel.tdengine.source.TDengineSourceReader.lambda$pollNext$0(TDengineSourceReader.java:76)
	... 13 more

	at org.apache.seatunnel.core.starter.seatunnel.command.ClientExecuteCommand.execute(ClientExecuteCommand.java:191)
	... 2 more
2024-04-16 11:27:13,132 INFO  [s.c.s.s.c.ClientExecuteCommand] [Thread-7] - run shutdown hook because get close signal

@edisonX-sudo edisonX-sudo changed the title Added null check in TDengineSourceReader's convertDataType method [bigfix]Added null check in TDengineSourceReader's convertDataType method Apr 16, 2024
@edisonX-sudo edisonX-sudo changed the title [bigfix]Added null check in TDengineSourceReader's convertDataType method [bigfix][TDengine]Added null check in TDengineSourceReader's convertDataType method Apr 16, 2024
@edisonX-sudo edisonX-sudo changed the title [bigfix][TDengine]Added null check in TDengineSourceReader's convertDataType method [bugfix][TDengine]Added null check in TDengineSourceReader's convertDataType method Apr 16, 2024
@Hisoka-X
Copy link
Member

Could you add test case in e2e? Thanks.

@edisonX-sudo
Copy link
Author

will do

@edisonX-sudo
Copy link
Author

edisonX-sudo commented Apr 19, 2024

Could you add test case in e2e? Thanks.

Test case done
BTW, another null-exception bug in TDengineSourceReader found&fixed because of the new test case

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

Successfully merging this pull request may close these issues.

None yet

2 participants