-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-15607. Create trash dir when allowing snapshottable dir #2352
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
Conversation
...s-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
Outdated
Show resolved
Hide resolved
bshashikant
left a comment
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.
Do we need to add provisionTrash command for WebHdfs as well?
szetszwo
left a comment
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.
Thanks a lot for working on this! Some minor comments on the change.
...s-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
Outdated
Show resolved
Hide resolved
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
Outdated
Show resolved
Hide resolved
...s-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
Outdated
Show resolved
Hide resolved
...s-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java
Outdated
Show resolved
Hide resolved
hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/tools/DFSAdmin.java
Outdated
Show resolved
Hide resolved
Good point. I think so, yes. Update: As I was attempting to add Note WebHDFS doesn't support encryption zone commands (create, list, etc.). I have opened another jira HDFS-15612 for discussion on WebHDFS support for provision snapshot trash. Let's rule WebHDFS out in this jira for now. @bshashikant |
add new dfsadmin command; add test in TestDistributedFileSystem. Change-Id: I09cf74a13168af6f448b85a60808ee4d3068041f
Change-Id: If7ead8db1e2f515777d2ddc9ca5af914ddc58d2a
Change-Id: I6f662871c877aecbf1734c21d64b454df97b2a58
Change-Id: I1016a08ecd00cefcb8225cf07d21a5047cda9c2c
…warning if snapshot trash root is disabled when provisioning trash. Change-Id: I26f40b6e8296bcd3c3b26c2187d4d942dbf99887
Change-Id: I31e2236a6e96ef8bd2e94e09a57f4ef74c5996e7
Change-Id: Icf8eee168afa3becb122cb5a7d82da89dae20f0e
…wSnapShot failure. Change-Id: I6dc54a8d0dec4fa295faa15475ad4fb5d83dd294
|
Thanks @bshashikant and @szetszwo for reviewing this. Will commit in a min. |
…2352) (cherry picked from commit 43b0c0b) Conflicts: hadoop-hdfs-project/hadoop-hdfs-client/src/main/java/org/apache/hadoop/hdfs/DistributedFileSystem.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/TestDistributedFileSystem.java hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/tools/TestDFSAdmin.java Change-Id: Iec14da9b75205f71f834646181b0a49f48618952
https://issues.apache.org/jira/browse/HDFS-15607
Changes
dfs.namenode.snapshot.trashroot.enabledis set totrueon the NameNode.DistributedFileSystem#allowSnapshotdirectly will NOT provision trash root at all. This behavior is aligned withDistributedFileSystem#createEncryptionZone.-provisionSnapshotTrash. Admins can use this new command to provision trash roots when the cluster is upgraded from older HDFS which doesn't have snapshottable directory trash roots feature:TestDistributedFileSystemandTestDFSAdmin.