[
https://issues.apache.org/jira/browse/HDFS-17251?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17786471#comment-17786471
]
ASF GitHub Bot commented on HDFS-17251:
---------------------------------------
goiri commented on code in PR #6268:
URL: https://github.com/apache/hadoop/pull/6268#discussion_r1394648162
##########
hadoop-hdfs-project/hadoop-hdfs-rbf/src/main/java/org/apache/hadoop/hdfs/server/federation/resolver/MountTableResolver.java:
##########
@@ -113,7 +113,7 @@ public class MountTableResolver
private final Lock writeLock = readWriteLock.writeLock();
/** Trash Current matching pattern. */
- private static final String TRASH_PATTERN = "/(Current|[0-9]+)";
+ private static final String TRASH_PATTERN = "/(Current|[0-9]{12})";
Review Comment:
Can we have a test for this?
> RBF: Optimize MountTableResolver#TRASH_PATTERN
> ----------------------------------------------
>
> Key: HDFS-17251
> URL: https://issues.apache.org/jira/browse/HDFS-17251
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: rbf
> Affects Versions: 3.3.6
> Reporter: farmmamba
> Assignee: farmmamba
> Priority: Minor
> Labels: pull-request-available
>
> We should make the length of date string of MountTableResolver#TRASH_PATTERN
> have fixed length.
> because the trash dirs look like below pattern:
> /user/hdfs/.Trash/231113002000
> the data string has a fixed length of 12.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]