[ https://issues.apache.org/jira/browse/FLINK-17234?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17086828#comment-17086828 ]
godfrey he commented on FLINK-17234: ------------------------------------ duplicate with https://issues.apache.org/jira/browse/FLINK-17197 > Show more error messages in taskmanager's log > --------------------------------------------- > > Key: FLINK-17234 > URL: https://issues.apache.org/jira/browse/FLINK-17234 > Project: Flink > Issue Type: Improvement > Components: Formats (JSON, Avro, Parquet, ORC, SequenceFile), > Runtime / Task > Reporter: Kurt Young > Priority: Blocker > Fix For: 1.11.0 > > > I created a csv table in sql client and trying to view the table content by > executing a simple SELECT * query. > First I got the error message printed in sql cli: > {code:java} > [ERROR] Could not execute SQL statement. Reason: > java.lang.IllegalStateException: can't switch state from terminal state > READING to CLOSED{code} > And then I open the TM's log to find more information about what went wrong. > The only information I got from log file is similar with sql cli: > {code:java} > 2020-04-19 11:50:28,630 WARN org.apache.flink.runtime.taskmanager.Task > [] - CsvTableSource(read fields: t, author) -> > SourceConversion(table=[default_catalog.default_database.contri, source: > [CsvTableSource(read fields: t, author)]], fields=[t, author]) -> > SinkConversionToRow -> Sink: Unnamed (1/1) (ed397f0f69e8f48b320c568f91a5976e) > switched from RUNNING to FAILED.2020-04-19 11:50:28,630 WARN > org.apache.flink.runtime.taskmanager.Task [] - > CsvTableSource(read fields: t, author) -> > SourceConversion(table=[default_catalog.default_database.contri, source: > [CsvTableSource(read fields: t, author)]], fields=[t, author]) -> > SinkConversionToRow -> Sink: Unnamed (1/1) (ed397f0f69e8f48b320c568f91a5976e) > switched from RUNNING to FAILED.java.lang.IllegalStateException: can't switch > state from terminal state READING to CLOSED at > org.apache.flink.util.Preconditions.checkState(Preconditions.java:217) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.api.functions.source.ContinuousFileReaderOperator.switchState(ContinuousFileReaderOperator.java:366) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.api.functions.source.ContinuousFileReaderOperator.lambda$new$0(ContinuousFileReaderOperator.java:213) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$1.run(StreamTaskActionExecutor.java:42) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.runtime.tasks.mailbox.Mail.run(Mail.java:78) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.processMail(MailboxProcessor.java:276) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxStep(MailboxProcessor.java:205) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.runtime.tasks.mailbox.MailboxProcessor.runMailboxLoop(MailboxProcessor.java:196) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.runtime.tasks.StreamTask.runMailboxLoop(StreamTask.java:490) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.streaming.runtime.tasks.StreamTask.invoke(StreamTask.java:470) > ~[flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:718) > [flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > org.apache.flink.runtime.taskmanager.Task.run(Task.java:542) > [flink-dist_2.11-1.11-SNAPSHOT.jar:1.11-SNAPSHOT] at > java.lang.Thread.run(Thread.java:748) [?:1.8.0_212]{code} > > Finally, it turns out I specified wrong column type of the csv table, and > something should have go wrong when reading the data file, but I can't get > any useful information from log file. > I'm not sure whether the root cause is the error message never thrown by csv > parser or got eat up by mailbox model yet. -- This message was sent by Atlassian Jira (v8.3.4#803005)