|
@@ -343,11 +343,12 @@ public class SimpleCopyListing extends CopyListing {
|
|
}
|
|
}
|
|
}
|
|
}
|
|
result = new WorkReport<FileStatus[]>(
|
|
result = new WorkReport<FileStatus[]>(
|
|
- fileSystem.listStatus(parent.getPath()), 0, true);
|
|
|
|
|
|
+ fileSystem.listStatus(parent.getPath()), retry, true);
|
|
} catch (FileNotFoundException fnf) {
|
|
} catch (FileNotFoundException fnf) {
|
|
LOG.error("FileNotFoundException exception in listStatus: " +
|
|
LOG.error("FileNotFoundException exception in listStatus: " +
|
|
fnf.getMessage());
|
|
fnf.getMessage());
|
|
- result = new WorkReport<FileStatus[]>(new FileStatus[0], 0, true, fnf);
|
|
|
|
|
|
+ result = new WorkReport<FileStatus[]>(new FileStatus[0], retry, true,
|
|
|
|
+ fnf);
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
LOG.error("Exception in listStatus. Will send for retry.");
|
|
LOG.error("Exception in listStatus. Will send for retry.");
|
|
FileStatus[] parentList = new FileStatus[1];
|
|
FileStatus[] parentList = new FileStatus[1];
|
|
@@ -391,7 +392,6 @@ public class SimpleCopyListing extends CopyListing {
|
|
|
|
|
|
for (FileStatus status : sourceDirs) {
|
|
for (FileStatus status : sourceDirs) {
|
|
workers.put(new WorkRequest<FileStatus>(status, 0));
|
|
workers.put(new WorkRequest<FileStatus>(status, 0));
|
|
- maybePrintStats();
|
|
|
|
}
|
|
}
|
|
|
|
|
|
while (workers.hasWork()) {
|
|
while (workers.hasWork()) {
|
|
@@ -402,7 +402,7 @@ public class SimpleCopyListing extends CopyListing {
|
|
if (LOG.isDebugEnabled()) {
|
|
if (LOG.isDebugEnabled()) {
|
|
LOG.debug("Recording source-path: " + child.getPath() + " for copy.");
|
|
LOG.debug("Recording source-path: " + child.getPath() + " for copy.");
|
|
}
|
|
}
|
|
- if (retry == 0) {
|
|
|
|
|
|
+ if (workResult.getSuccess()) {
|
|
CopyListingFileStatus childCopyListingStatus =
|
|
CopyListingFileStatus childCopyListingStatus =
|
|
DistCpUtils.toCopyListingFileStatus(sourceFS, child,
|
|
DistCpUtils.toCopyListingFileStatus(sourceFS, child,
|
|
preserveAcls && child.isDirectory(),
|
|
preserveAcls && child.isDirectory(),
|
|
@@ -417,7 +417,6 @@ public class SimpleCopyListing extends CopyListing {
|
|
LOG.debug("Traversing into source dir: " + child.getPath());
|
|
LOG.debug("Traversing into source dir: " + child.getPath());
|
|
}
|
|
}
|
|
workers.put(new WorkRequest<FileStatus>(child, retry));
|
|
workers.put(new WorkRequest<FileStatus>(child, retry));
|
|
- maybePrintStats();
|
|
|
|
}
|
|
}
|
|
} else {
|
|
} else {
|
|
LOG.error("Giving up on " + child.getPath() +
|
|
LOG.error("Giving up on " + child.getPath() +
|
|
@@ -472,5 +471,6 @@ public class SimpleCopyListing extends CopyListing {
|
|
totalDirs++;
|
|
totalDirs++;
|
|
}
|
|
}
|
|
totalPaths++;
|
|
totalPaths++;
|
|
|
|
+ maybePrintStats();
|
|
}
|
|
}
|
|
}
|
|
}
|