-
Notifications
You must be signed in to change notification settings - Fork 9.1k
HDFS-15480. Ordered snapshot deletion: record snapshot deletion in XAttr #2163
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
💔 -1 overall
This message was automatically generated. |
💔 -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.
Thanks for updating the patch @bshashikant. The latest patch looks really good to me.
testSnapshotXattrPersistence can we also have a version where we do a saveNamespace before restart ? This is to verify that the attr is stored in FSImage correctly. ?
...s-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java
Outdated
Show resolved
Hide resolved
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.
+1, the patch looks good to me.
...roject/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java
Outdated
Show resolved
Hide resolved
...s-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java
Outdated
Show resolved
Hide resolved
...fs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java
Show resolved
Hide resolved
hadoop-hdfs-project/hadoop-hdfs/src/main/resources/hdfs-default.xml
Outdated
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
...p-hdfs/src/test/java/org/apache/hadoop/hdfs/server/namenode/TestOrderedSnapshotDeletion.java
Show resolved
Hide resolved
💔 -1 overall
This message was automatically generated. |
💔 -1 overall
This message was automatically generated. |
💔 -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.
@bshashikant , thanks for the update. Some minor comments inlined.
BTW, do you know why hadoop-yetus reporting "Docker failed"? We may try posting a patch on the JIRA if yetus does not work in pull requests.
@@ -366,6 +366,7 @@ public void write(DataOutput out) throws IOException { | |||
"security.hdfs.unreadable.by.superuser"; | |||
String XATTR_ERASURECODING_POLICY = | |||
"system.hdfs.erasurecoding.policy"; | |||
String SNAPSHOT_XATTR_NAME = "system.hdfs.snapshot"; |
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.
The xattr name should contain "deleted". How about "system.hdfs.snapshot.deleted"?
@@ -326,6 +327,12 @@ static INode unprotectedSetXAttrs( | |||
throw new IOException("Can only set '" + | |||
SECURITY_XATTR_UNREADABLE_BY_SUPERUSER + "' on a file."); | |||
} | |||
|
|||
if (xaName.equals(SNAPSHOT_XATTR_NAME) && !(inode.isDirectory() && |
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 check "!(inode instanceof of Snapshot.Root)" instead of "!(inode.isDirectory() && inode.getParent().isSnapshottable())?
@@ -5119,7 +5119,6 @@ | |||
for storing directory snapshot diffs. By default, value is set to 10. | |||
</description> | |||
</property> | |||
|
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.
We should leave hdfs-default.xml untouched since we are not changing anything.
💔 -1 overall
This message was automatically generated. |
Yetus was able to run over the 002 patch posted on the JIRA. +1 on the 002 patch. |
…ttr (apache#2163) Conflicts: hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirSnapshotOp.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirXAttrOp.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/FSDirectory.java hadoop-hdfs-project/hadoop-hdfs/src/main/java/org/apache/hadoop/hdfs/server/namenode/snapshot/SnapshotManager.java Change-Id: I049a3b94ab1492a3bf3fdc25cd4320984ffa1cec (cherry picked from commit 88e910e)
Please see https://issues.apache.org/jira/browse/HDFS-15480