dik111 opened a new issue, #3203:
URL: https://github.com/apache/incubator-seatunnel/issues/3203

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   I use seatunnel  to test mysql data writing to hive it threw an exception, 
causing data not to be written to hive
   
   
   ### SeaTunnel Version
   
   seatunnel-version: 2.2.0-beta
   flink-version:1.13.3
   hive-version:3.0.0
   mysql-version:5.7
   
   ### SeaTunnel Config
   
   ```conf
   env { 
     job.mode = "BATCH"
   }
   source {
       jdbc {
           driver = "com.mysql.jdbc.Driver"
           url = 
"jdbc:mysql://xx:3307/xx?zeroDateTimeBehavior=convertToNull&useUnicode=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai&useSSL=false&autoReconnect=true"
           query = "select id   from   sogal_cti_db.SG_CTI_CALL_RECORD limit 10 
  "
           user = "xx"
           password = "xx"
               }
   }
   sink {
       Hive {
           table_name = "test.in_csi_sogal_cti_db_sg_cti_call_record2"
           save_mode = "overwrite"
           metastore_uri = "thrift://xx:9083"
           sink_columns = ["ID"]
       }
   }
   transform{}
   ```
   
   
   ### Running Command
   
   ```shell
   bin/start-seatunnel-flink-connector-v2.sh -m yarn-cluster -ynm seatunnel 
--config ./config/mysql-hive-flink.conf
   ```
   
   
   ### Error Exception
   
   ```log
   2022-10-27 14:00:10
   java.lang.RuntimeException: java.io.FileNotFoundException: File 
/warehouse/tablespace/managed/hive/test.db/in_csi_sogal_cti_db_sg_cti_call_record2/seatunnel/7333c8d517fb4f66953a3d95d0955df8
 does not exist.
        at 
org.apache.seatunnel.connectors.seatunnel.file.sink.writer.AbstractWriteStrategy.getTransactionIdFromStates(AbstractWriteStrategy.java:246)
        at 
org.apache.seatunnel.connectors.seatunnel.file.sink.BaseFileSinkWriter.<init>(BaseFileSinkWriter.java:47)
        at 
org.apache.seatunnel.connectors.seatunnel.file.sink.BaseFileSink.restoreWriter(BaseFileSink.java:75)
        at 
org.apache.seatunnel.translation.flink.sink.FlinkSink.createWriter(FlinkSink.java:55)
        at 
org.apache.flink.streaming.runtime.operators.sink.StatefulSinkWriterOperator.createWriter(StatefulSinkWriterOperator.java:136)
        at 
org.apache.flink.streaming.runtime.operators.sink.AbstractSinkWriterOperator.open(AbstractSinkWriterOperator.java:74)
        at 
org.apache.flink.streaming.runtime.tasks.OperatorChain.initializeStateAndOpenOperators(OperatorChain.java:442)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restoreGates(StreamTask.java:585)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTaskActionExecutor$SynchronizedStreamTaskActionExecutor.call(StreamTaskActionExecutor.java:100)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.executeRestore(StreamTask.java:565)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.runWithCleanUpOnFail(StreamTask.java:650)
        at 
org.apache.flink.streaming.runtime.tasks.StreamTask.restore(StreamTask.java:540)
        at org.apache.flink.runtime.taskmanager.Task.doRun(Task.java:759)
        at org.apache.flink.runtime.taskmanager.Task.run(Task.java:566)
        at java.lang.Thread.run(Thread.java:748)
        Suppressed: java.lang.NullPointerException
                at 
org.apache.flink.streaming.runtime.operators.sink.AbstractSinkWriterOperator.dispose(AbstractSinkWriterOperator.java:103)
                at 
org.apache.flink.streaming.runtime.tasks.StreamTask.disposeAllOperators(StreamTask.java:864)
                at 
org.apache.flink.streaming.runtime.tasks.StreamTask.runAndSuppressThrowable(StreamTask.java:843)
                at 
org.apache.flink.streaming.runtime.tasks.StreamTask.cleanUpInvoke(StreamTask.java:756)
                at 
org.apache.flink.streaming.runtime.tasks.SourceStreamTask.cleanUpInvoke(SourceStreamTask.java:186)
                at 
org.apache.flink.streaming.runtime.tasks.StreamTask.runWithCleanUpOnFail(StreamTask.java:662)
                ... 4 more
   Caused by: java.io.FileNotFoundException: File 
/warehouse/tablespace/managed/hive/test.db/in_csi_sogal_cti_db_sg_cti_call_record2/seatunnel/7333c8d517fb4f66953a3d95d0955df8
 does not exist.
        at 
org.apache.hadoop.hdfs.DistributedFileSystem.listStatusInternal(DistributedFileSystem.java:1059)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem.access$1000(DistributedFileSystem.java:131)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem$24.doCall(DistributedFileSystem.java:1119)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem$24.doCall(DistributedFileSystem.java:1116)
        at 
org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81)
        at 
org.apache.hadoop.hdfs.DistributedFileSystem.listStatus(DistributedFileSystem.java:1126)
        at 
org.apache.seatunnel.connectors.seatunnel.file.sink.util.FileSystemUtils.dirList(FileSystemUtils.java:124)
        at 
org.apache.seatunnel.connectors.seatunnel.file.sink.writer.AbstractWriteStrategy.getTransactionIdFromStates(AbstractWriteStrategy.java:243)
        ... 14 more
   ```
   
   
   ### Flink or Spark Version
   
   [FLINK VERSION ](flink-version:1.13.3)
   
   ### Java or Scala Version
   
   _No response_
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [ ] Yes I am willing to submit a PR!
   
   ### Code of Conduct
   
   - [X] I agree to follow this project's [Code of 
Conduct](https://www.apache.org/foundation/policies/conduct)
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to