[
https://issues.apache.org/jira/browse/HBASE-30591?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
ASF GitHub Bot updated HBASE-30591:
-----------------------------------
Labels: pull-request-available (was: )
> Avoid redundant getFileStatus calls when checking MOB file age
> --------------------------------------------------------------
>
> Key: HBASE-30591
> URL: https://issues.apache.org/jira/browse/HBASE-30591
> Project: HBase
> Issue Type: Improvement
> Components: mob
> Reporter: Xiao Liu
> Assignee: Xiao Liu
> Priority: Minor
> Labels: pull-request-available
> Fix For: 4.0.0-alpha-1, 3.1.0, 3.0.1
>
>
> h3. Problem
> {\{MobFileCleanupUtil.checkColumnFamilyDescriptor()}} lists the MOB column
> family directory using \{{listLocatedStatus()}}. Each returned
> \{{LocatedFileStatus}} already contains the file's modification time.
> For each file that reaches the age check, the cleaner calls
> \{{getFileStatus(path)}} twice: once for the archive cutoff comparison and
> once for the \{{TRACE}} log message. The second call also runs when TRACE is
> disabled because Java evaluates the log arguments before invoking the logger.
> On HDFS, this adds two NameNode metadata RPCs per candidate file.
> h3. Proposed change
> Read the modification time once from
> \{{LocatedFileStatus.getModificationTime()}} and reuse it for the cutoff
> comparison and both log branches.
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)