-
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
[WIP] Syncservice rebased onto HDFS-12090 #1726
base: HDFS-12090
Are you sure you want to change the base?
Conversation
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.
A few comments from a first look of the patch. There's a lot here :|
|
||
import static org.apache.hadoop.hdfs.server.common.HdfsServerConstants.XATTR_SYNC_TO_EXTERNAL; | ||
|
||
final class FSDirSyncNodeToRemoteStoreOp { |
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.
All these methods here seem to be doing the same thing? Will these methods be called by the SPS?
} | ||
INode inode = FSDirectory.resolveLastINode(iip); | ||
if (inode.isFile() && inode.asFile().numBlocks() == 0) { | ||
if (NameNode.LOG.isInfoEnabled()) { |
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.
Empty files would also have to be synced.
+ inode.getFullPathName() | ||
+ ", as this file/dir was already called for sync."); | ||
} else { | ||
XAttr syncToExternalXAttr = XAttrHelper |
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.
Call FSDirXAttrOp.setXAttr
. It does all this for you.
@@ -368,6 +368,7 @@ public void write(DataOutput out) throws IOException { | |||
"system.hdfs.erasurecoding.policy"; | |||
|
|||
String XATTR_SATISFY_STORAGE_POLICY = "user.hdfs.sps"; | |||
String XATTR_SYNC_TO_EXTERNAL = "user.hdfs.sync"; |
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.
How is this XAttr used? I currently see this accessed only in FSDirSyncNodeToRemoteStoreOp
…locks. Original patch contributed by Ewan Higgs. Followup work and fixed contributed by Virajith Jalaparthi.
…de. Contributed by Ewan Higgs.
…od. Contributed by Ewan Higgs
26594f8
to
59803c2
Compare
Hi @ehiggs @virajith, any news on the state of sync service and HDFS-12090? |
Hi, @qboileau, based on this patch, we had developed provided storage sync write feature further. Now, the patch is almost in good shape. And we will post the patch to JIRA, expected in this month. |
Based on this patch from @ehiggs, we developed the feature to support provided storage write. Please review our patch in https://issues.apache.org/jira/browse/HDFS-15714. Thanks @ehiggs so much! |
@virajith @ashvina
This is a rebase of the sync service for HDFS-12090 rebased onto the current branch.