[ https://issues.apache.org/jira/browse/HUDI-7941?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
ASF GitHub Bot updated HUDI-7941: --------------------------------- Labels: pull-request-available (was: ) > add show_file_status procedure > ------------------------------ > > Key: HUDI-7941 > URL: https://issues.apache.org/jira/browse/HUDI-7941 > Project: Apache Hudi > Issue Type: New Feature > Reporter: 陈磊 > Priority: Major > Labels: pull-request-available > Fix For: 1.1.0 > > > When incrementally consuming the hudi table or performing clustering or > compaction operations on the hudi table, it is often found that a certain > file does not exist. If you want to know which operation deleted the file, it > is a very troublesome operation. For this purpose, we provide a tool > `show_file_status` to view whether a specified file has been deleted and what > actions have been taken to delete it. > usage: > call show_file_status(table => '$tableName', partition => '$partition', file > => '$fileName') > call show_file_status(table => '$tableName', file => '$fileName') > output: > 1)the file was deleted by the restore action > +-------+-------+-----------------+--------+---------+ > |status |action |instant |timeline|full_path| > +-------+-------+-----------------+--------+---------+ > |deleted|restore|20240629225539880|active | | > +-------+-------+-----------------+--------+---------+ > 2)the file has been deleted in other ways, such as hdfs dfs -rm > +-------+------+-------+--------+---------+ > |status |action|instant|timeline|full_path| > +-------+------+-------+--------+---------+ > |unknown| | | | | > +-------+------+-------+--------+---------+ > 3) the file exists > +------+------+-------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ > |status|action|instant|timeline|full_path > > | > +------+------+-------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ > |exist | | |active > |/Users/xx/xx/others/data/hudi-warehouse/source1/hudi_mor_append/sex=0/85ad0f44-22bf-4733-99bf-06382d6eacd5-0_0-130-89_20240629230123162.parquet| > +------+------+-------+--------+---------------------------------------------------------------------------------------------------------------------------------------------------------------+ -- This message was sent by Atlassian Jira (v8.20.10#820010)