bshashikant commented on a change in pull request #3234:
URL: https://github.com/apache/hadoop/pull/3234#discussion_r676850480
##########
File path:
hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpSync.java
##########
@@ -515,6 +521,26 @@ private DiffInfo getRenameItem(DiffInfo diff, DiffInfo[]
renameDiffArray) {
return null;
}
+ /**
+ * checks if a parent dir is marked deleted as a part of dir rename happening
+ * to a path which is excluded by the the filter.
+ * @return true if it's marked deleted
+ */
+ private boolean isParentOrSelfMarkedDeleted(DiffInfo diff,
+ DiffInfo[] deletedDirDiffArray) {
+ for (DiffInfo item : deletedDirDiffArray) {
+ if (item.getSource().equals(diff.getSource())) {
+ if (diff.getType() == SnapshotDiffReport.DiffType.MODIFY) {
+ return true;
+ }
+ }
+ if (isParentOf(item.getSource(), diff.getSource())) {
Review comment:
in the later case, "create /foo/dir/f1" won't be reported in the
snapshot diff itself as the parent itself is created post the old snapshot.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]