steveloughran commented on a change in pull request #3825:
URL: https://github.com/apache/hadoop/pull/3825#discussion_r778311685
##########
File path:
hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/DistCpOptions.java
##########
@@ -234,7 +236,18 @@ public Path getSourceFileListing() {
public List<Path> getSourcePaths() {
return sourcePaths == null ?
- null : Collections.unmodifiableList(sourcePaths);
+ null :
+ Collections.unmodifiableList(getUniquePaths(sourcePaths));
+ }
+
+ private List<Path> getUniquePaths(List<Path> srcPaths) {
+ Set<Path> uniquePaths = new LinkedHashSet<>();
+ for (Path path : srcPaths) {
+ if (!uniquePaths.add(path)) {
+ LOG.warn("Path: {} added multiple times, ignoring the redundant
entry.", path);
Review comment:
Should it log at info? I'm just worried because WARN Messages are often
interpreted as a sign of serious problems; if this is happening due to some
workflow then it's not going to go away.
--
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]