-
Notifications
You must be signed in to change notification settings - Fork 9.2k
HDFS-16757. Add a new method copyBlockCrossNamespace to DataNode #5719
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. |
|
The failed unit test seems unrelated to the change. |
|
@ZanderXu @ferhui @Hexiaoqiao @ayushtkn please help me review this pr when you are available, Thanks. |
| try { | ||
| // Check access | ||
| checkAccess(reply, true, srcBlock, srcBlockToken, | ||
| Op.COPY_BLOCK_CROSS_NAMESPACE, BlockTokenIdentifier.AccessMode.COPY); |
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.
If we use namenode.getBlockLocations() , the blockToken AccessMode is BlockTokenIdentifier.AccessMode.READ. I also test in a real hdfs cluster with FastCopy.
|
Hello ,sirs . For some reason, I now work with fastcopy and current progerss is that I now already finished fastcopy tools in standalone mode. Both replicated files and EC files are supported. And next is trying to finish distcp with fastcopy. |
| // Async copy the block | ||
| Future<?> result = datanode.internalCopyBlockCrossNamespace(srcBlock, targetBlock, targetDN); | ||
| try { | ||
| result.get(dnConf.getCopyBlockCrossNamespaceSocketTimeout(), TimeUnit.MILLISECONDS); |
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.
If srcBlock targetBlock not in a same datanode, it will use DataTransfer . And DataTransfer will catch any exception in thread , so result.get() will always can not catch IOException.
Thanks @LiuGuH for your comment. I will check it based on your suggestion later. Of course, you can finish to work other subtasks. Fast Copy is really a good feature, hope we continue to push this. thanks! |
|
We're closing this stale PR because it has been open for 100 days with no activity. This isn't a judgement on the merit of the PR in any way. It's just a way of keeping the PR queue manageable. |
Description of PR
As described in https://issues.apache.org/jira/browse/HDFS-16757 :
Add a new method copyBlockCrossNamespace to Datanode to support fast copy.