steveloughran commented on a change in pull request #1530: HDFS-14869 Copy
renamed files which are not excluded anymore by filter
URL: https://github.com/apache/hadoop/pull/1530#discussion_r333439484
##########
File path:
hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpSync.java
##########
@@ -213,18 +216,30 @@ private boolean getAllDiffs() throws IOException {
}
SnapshotDiffReport.DiffType dt = entry.getType();
List<DiffInfo> list = diffMap.get(dt);
+ final Path source =
+ new Path(DFSUtilClient.bytes2String(entry.getSourcePath()));
+ final Path relativeSource = new Path(Path.SEPARATOR + source);
if (dt == SnapshotDiffReport.DiffType.MODIFY ||
- dt == SnapshotDiffReport.DiffType.CREATE ||
- dt == SnapshotDiffReport.DiffType.DELETE) {
- final Path source =
- new Path(DFSUtilClient.bytes2String(entry.getSourcePath()));
- list.add(new DiffInfo(source, null, dt));
+ dt == SnapshotDiffReport.DiffType.CREATE ||
+ dt == SnapshotDiffReport.DiffType.DELETE) {
+ if (copyFilter.shouldCopy(relativeSource)) {
+ list.add(new DiffInfo(source, null, dt));
Review comment:
why remove the bytes2String? surely its there for a reason? removal could be
a regression
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]