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

   ### 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
   
   **现象:**
   
   flink on yarn Application 运行模式,使用 hive sink 时,指定了 metastoreUris,并设置了 
hive_site_path 路径为 hdfs://xxxx/xxxx/hive-site.xml,AbstractStorage 中 会将 
hive_site_path  处理为当前 container 运行目录的子目录,例如 
/xxxxx/application-xxxxx/container-xxxxx/hdfs://xxxx/xxxx/hive-site.xml,导致 
hive-site.xml 找不到
   
![0f385a75b95e62ffd43f9ede68c1e04](https://github.com/user-attachments/assets/26348296-9088-4e87-b1d8-f6af76d9233b)
   
![768aff40851a29d0078a81cf7a6daf9](https://github.com/user-attachments/assets/5882f9a9-6438-40ed-a4b3-86b79c248c0b)
   
   **问题说明:**
   
   1、首先从异常栈看,涉及到 HDFSStorge 类中对文件的读取,从命名上来看,我猜测这个类在设计之初,应该是可以支持 hdfs 
路径的,这一点我没在官方文档上找到相应的描述,因此无法印证。
   2、如果是支持 hdfs 路径的读取,那么将 hive_site_path 的处理应该是 Hadoop的 Path 而非 Java 的 File
   
   ### SeaTunnel Version
   
   2.3.7
   
   ### SeaTunnel Config
   
   ```conf
   {
       "env":
       {
           "job.mode": "BATCH",
           "parallelism": 1,
           "job.name": "Mysql2Hive_instance_1725952817332_13102"
       },
       "source":
       [
           {
               "_type": "mysql_source",
               "url": 
"jdbc:mysql://172.16.19.183:3306/xieyue_full_2?CatalogMeansCurrent=true&characterEncoding=UTF-8",
               "user": "root",
               "password": "123456",
               "query": "select `alert_group_id`,`alert_group_name` from 
`xieyue_full_2`.`alert_group`",
               "result_table_name": "alert_group_1526751128",
               "fetch_size": 5000,
               "table_path": "xieyue_full_2.alert_group"
           }
       ],
       "sink":
       [
           {
               "_type": "hive_sink",
               "source_table_name": "alert_group_1526751128_t",
               "table_name": "zgl.ods_input_data",
               "metastore_uri": "thrift://u01:9083",
               "hive_site_path": "hdfs:///hive/config/hive-site.xml"
           }
       ],
       "transform":
       [
           {
               "_type": "sql_trans",
               "query": "SELECT TRY_CAST(alert_group_id AS INTEGER) as 
id,TRY_CAST(alert_group_name AS VARCHAR) as name FROM alert_group_1526751128",
               "source_table_name": "alert_group_1526751128",
               "result_table_name": "alert_group_1526751128_t"
           }
       ]
   }
   ```
   
   
   ### Running Command
   
   ```shell
   FlinkExecution flinkExecution = new FlinkExecution();
   flinkExecution.execute();
   ```
   
   
   ### Error Exception
   
   ```log
   No such file or directory
   ```
   
   
   ### Zeta or 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]

Reply via email to