-
Notifications
You must be signed in to change notification settings - Fork 8.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
HDFS-15614. Initialize snapshot trash root during NameNode startup if enabled #2370
Conversation
Add UT. Change-Id: If679da69024056697bf633094a359530bffc74d3
...s-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's say snapshotTrash root is enabled , Trash directories re created and files moved in the Trash directory. Now, if the feature is turned off, the trash will be intact .
a) The trash emptier won't clean up this trash as "getTrashRoots()" won't return this trash location.
b) Now, once the feature is turned off, existing files continue to live the trash inside the snapshot root trash while new set of deleted files from the same location will now move to user trash outside the directory as the config is turned off.
i guess, this is the limitation of this feature.
...s-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java
Outdated
Show resolved
Hide resolved
...-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/NameNode.java
Outdated
Show resolved
Hide resolved
remove redundant getIsSnapshotTrashRootEnabled method. Change-Id: Ic9293e36907ee88ab2bf17855a8927e4e6c4c949
Change-Id: Ibd167312dd6a2db5f90e15fe6b01300274770867
💔 -1 overall
This message was automatically generated. |
@smengcl , would you like to retrigger the checks to ensure the snapshot tests work just fine. they seem to fail in last run bcoz of memory issue with the server. |
sure. will do triggered checks with an empty commit: https://ci-hadoop.apache.org/blue/organizations/jenkins/hadoop-multibranch/detail/PR-2370/3/ btw I ran |
Change-Id: Ib761a58fec35f8f967e008268a020db28effbc8f
Resolved merge conflict in UT with HADOOP-16878 which is just merged to trunk. |
💔 -1 overall
This message was automatically generated. |
The last CI run looks good. Will merge in a minute. |
💔 -1 overall
This message was automatically generated. |
… enabled (apache#2370) (cherry picked from commit a308a1e) Conflicts: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSNamesystem.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java Change-Id: Ia8f2fb39768a135f4014f64f323ef0a6f740ad06
https://issues.apache.org/jira/browse/HDFS-15614
Added
checkAndProvisionSnapshotTrashRoots
inFSNamesystem
. Triggered inNameNode
on startup ifdfs.namenode.snapshot.trashroot.enabled
set totrue
.UT added in
TestDistributedFileSystem
.The logic is ready for review.
I am considering adding another UT for HA case.Now that we put the check instartActiveServices()
it shouldn't be a problem anymore. Thanks @bshashikant for the suggestion.