guluo created HBASE-28427:
-----------------------------
Summary: FNFE related to 'master:store' when moving archived
hfiles to global archived dir
Key: HBASE-28427
URL: https://issues.apache.org/jira/browse/HBASE-28427
Project: HBase
Issue Type: Improvement
Components: master
Environment: Centos7
hbase-4.0.0-alpha-1-SNAPSHOT
Reporter: guluo
Sometimes we encounter the following log.
{code:java}
2024-02-26T18:11:34,934 WARN [master:store-Store-Compactor]
region.MasterRegionFlusherAndCompactor: Failed to move archived hfiles from
file:/root/hbase-4.0.0-alpha-1-SNAPSHOT/tmp/hbase/MasterData/archive/data/master/store/1595e783b53d99cd5eef43b6debb2682/state
to global dir
file:/root/hbase-4.0.0-alpha-1-SNAPSHOT/tmp/hbase/archive/data/master/store/1595e783b53d99cd5eef43b6debb2682/statejava.io.FileNotFoundException:
File
file:/root/hbase-4.0.0-alpha-1-SNAPSHOT/tmp/hbase/MasterData/archive/data/master/store/1595e783b53d99cd5eef43b6debb2682/state
does not exist at
org.apache.hadoop.fs.RawLocalFileSystem.listStatus(RawLocalFileSystem.java:733)
~[hadoop-common-3.3.5.jar:?] at
org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:2045)
~[hadoop-common-3.3.5.jar:?] at
org.apache.hadoop.fs.FileSystem.listStatus(FileSystem.java:2089)
~[hadoop-common-3.3.5.jar:?] at
org.apache.hadoop.fs.ChecksumFileSystem.listStatus(ChecksumFileSystem.java:970)
~[hadoop-common-3.3.5.jar:?] at
org.apache.hadoop.hbase.master.region.MasterRegionUtils.moveFilesUnderDir(MasterRegionUtils.java:42)
~[hbase-server-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT] at
org.apache.hadoop.hbase.master.region.MasterRegionFlusherAndCompactor.moveHFileToGlobalArchiveDir(MasterRegionFlusherAndCompactor.java:145)
~[hbase-server-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT] at
org.apache.hadoop.hbase.master.region.MasterRegionFlusherAndCompactor.compact(MasterRegionFlusherAndCompactor.java:157)
~[hbase-server-4.0.0-alpha-1-SNAPSHOT.jar:4.0.0-alpha-1-SNAPSHOT] at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
~[?:1.8.0_231] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
~[?:1.8.0_231] at java.lang.Thread.run(Thread.java:748) ~[?:1.8.0_231]
{code}
Analysis:
Against 'master:store', Archived hfiles would first be placed in
\{hbase.rootdir}/MasterData/archive/ after compacting, and then moved to global
archived dir.
'master:store' has 3 column families:proc,rs,state, if there is empty in one of
column families,such as state, no files in this column families will be
archived, and
\{hbase.rootdir}/MasterData/archive/data/master/store/1595e783b53d99cd5eef43b6debb2682/state
would do not exist.
Finally, we will get FileNotFoundException when moving these archived hfiles to
global archived dir.
Although,Current code can avoid this effecting by catching Exception, However
it is maybe better to check the dir exists before moving.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)