fhj123456789 opened a new issue, #5412:
URL: https://github.com/apache/seatunnel/issues/5412

   ### Search before asking
   
   - [X] I had searched in the 
[issues](https://github.com/apache/seatunnel/issues?q=is%3Aissue+label%3A%22bug%22)
 and found no similar issues.
   
   
   ### What happened
   
   When I used ClickHouseFile Sink, I configured the storage location for the 
temporary path, and when the program was executing, I went to the Executor node 
of the task to check the path. I found that the file for ClickHouse had been 
generated, but when it was read, the task threw an error of Clickhouse local 
file not exists。
   
   I am very confused about the result, and I found that there was a problem 
with these two lines of code in the source code
   File 
   "file=
   
   New File(
   
   ClickhouseLocalFile
   
   +/data/_local/
   
   +ClickhouseTable. getLocalTableName();
   
   If (! File. exists()){
   
   Throw new ClickhouseConnectorException(
   
   ClickhouseConnectorErrorCode. FILE_ NOT_ EXISTS,
   
   Clickhouse local file not exists);
   
   }"
   I don't know why the "/data/_local/" two-layer directory was generated on my 
executor.
   
   ### SeaTunnel Version
   
   SeaTunnel  : 2.3.3
   ClickHouse : 21.3.20.1
   
   ### SeaTunnel Config
   
   ```conf
   sink {
     ClickhouseFile {
     source_table_name = "clickhouse"
     server_time_zone = "Asia/Shanghai"
     host = "xx:xx"
     database = "xx"
     table = "xx"
     username = "xx"
     password = "xx"
     clickhouse_local_path = "/home/clickhouse-local"
     file_temp_path = "/tmp/seatunnel/clickhouse-local/file"
     node_free_password = false
     node_pass = [{
       node_address = "xxx"
       password = "xx"
     },{
       node_address = "xx"
       password = "xx"
     }]
   }
   ```
   
   
   ### Running Command
   
   ```shell
   --class "org.apache.seatunnel.core.starter.spark.SeaTunnelSpark" --name 
"SeaTunnel" --master "yarn"  --deploy-mode "client" --jars 
"/home/xx/seatunnel-2.3.3/lib/seatunnel-transforms-v2.jar,/home/xx/seatunnel-2.3.3/connectors/seatunnel/connector-clickhouse-2.3.3.jar,/home/xx/seatunnel-2.3.3/connectors/seatunnel/connector-file-hadoop-2.3.3.jar"
 --conf "job.mode=BATCH" --conf "execution.parallelism=5" 
/home/xx/seatunnel-2.3.3/starter/seatunnel-spark-2-starter.jar --config 
"../config/spark.v2.itassert.config" --master "yarn" --deploy-mode "client" 
--name "SeaTunnel"
   ```
   
   
   ### Error Exception
   
   ```log
   Caused by: 
org.apache.seatunnel.connectors.seatunnel.clickhouse.exception.ClickhouseConnectorException:
 ErrorCode:[CLICKHOUSE-07], ErrorDescription:[Clickhouse local file not exists] 
- clickhouse local file not exists
        at 
org.apache.seatunnel.connectors.seatunnel.clickhouse.sink.file.ClickhouseFileSinkWriter.generateClickhouseLocalFiles(ClickhouseFileSinkWriter.java:332)
   ```
   
   
   ### Zeta or Flink or Spark Version
   
   spark 2.4.3
   
   ### Java or Scala Version
   
   Java : 1.8
   scala : 2.11.12
   
   ### Screenshots
   
   _No response_
   
   ### Are you willing to submit PR?
   
   - [X] 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