superzhang0929 opened a new issue, #2201: URL: https://github.com/apache/incubator-seatunnel/issues/2201
### 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 The files I submitted through --files can't be obtained in the code of sink output method. ### SeaTunnel Version 2.1.1 ### SeaTunnel Config ```conf env { spark.app.name = "test_dis_1657687471655" spark.executor.instances =5 spark.executor.cores =2 spark.executor.memory = "2G" files = "/tmp/exec/process/0/3277/127844/12128295/metrics.json" } ``` ### Running Command ```shell ./bin/start-seatunnel-spark.sh --master yarn --deploy-mode client --config application.conf ``` ### Error Exception ```log override def output(data: Dataset[Row], environment: SparkEnvironment): Unit = { val file = new File("metrics.json") val dfFields = data.schema.fieldNames val bulkSize = config.getInt(BULK_SIZE) val retry = config.getInt(RETRY) if (!config.hasPath(FIELDS)) { fields = dfFields.toList initSQL = initPrepareSQL() } val count=data.count() data.foreachPartition { iter: Iterator[Row] => ……………………………………………………………… java.io.FileNotFoundException: File 'metrics.json' does not exist at org.apache.commons.io.FileUtils.openInputStream(FileUtils.java:299) at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1711) at org.apache.commons.io.FileUtils.readFileToString(FileUtils.java:1748) at com.sugon.MetricsReporterFactory.createReporter(MetricsReporterFactory.java:47) at com.sugon.MainMetrics.<init>(MainMetrics.java:26) at com.sugon.MainMetrics.init(MainMetrics.java:56) at org.apache.seatunnel.spark.jdbc.sink.Jdbc.output(Jdbc.scala:58) at org.apache.seatunnel.spark.jdbc.sink.Jdbc.output(Jdbc.scala:31) at org.apache.seatunnel.spark.SparkEnvironment.sinkProcess(SparkEnvironment.java:164) at org.apache.seatunnel.spark.batch.SparkBatchExecution.start(SparkBatchExecution.java:54) at org.apache.seatunnel.command.spark.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:58) at org.apache.seatunnel.command.spark.SparkTaskExecuteCommand.execute(SparkTaskExecuteCommand.java:36) at org.apache.seatunnel.Seatunnel.run(Seatunnel.java:48) at org.apache.seatunnel.SeatunnelSpark.main(SeatunnelSpark.java:27) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.spark.deploy.JavaMainApplication.start(SparkApplication.scala:52) at org.apache.spark.deploy.SparkSubmit.org$apache$spark$deploy$SparkSubmit$$runMain(SparkSubmit.scala:928) at org.apache.spark.deploy.SparkSubmit.doRunMain$1(SparkSubmit.scala:180) at org.apache.spark.deploy.SparkSubmit.submit(SparkSubmit.scala:203) at org.apache.spark.deploy.SparkSubmit.doSubmit(SparkSubmit.scala:90) at org.apache.spark.deploy.SparkSubmit$$anon$2.doSubmit(SparkSubmit.scala:1007) at org.apache.spark.deploy.SparkSubmit$.main(SparkSubmit.scala:1016) at org.apache.spark.deploy.SparkSubmit.main(SparkSubmit.scala) ``` ### Flink or Spark Version _No response_ ### 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]
