[28/50] [abbrv] hadoop git commit: HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak)
HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/9a13dcee Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/9a13dcee Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/9a13dcee Branch: refs/heads/YARN-2928 Commit: 9a13dceec9f7aa239a0c84dc734b87116e5edef0 Parents: 3851c68 Author: Ravi Prakash ravip...@altiscale.com Authored: Fri Apr 24 13:39:07 2015 -0700 Committer: Zhijie Shen zjs...@apache.org Committed: Mon Apr 27 14:18:50 2015 -0700 -- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/tools/SimpleCopyListing.java | 10 +- 2 files changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/9a13dcee/hadoop-common-project/hadoop-common/CHANGES.txt -- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 80c8a54..826c77e 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -561,6 +561,9 @@ Release 2.8.0 - UNRELEASED HADOOP-11864. JWTRedirectAuthenticationHandler breaks java8 javadocs. (Larry McCay via stevel) +HADOOP-11876. Refactor code to make it more readable, minor +maybePrintStats bug (Zoran Dimitrijevic via raviprak) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/9a13dcee/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java -- diff --git a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java index b9ba099..4ea1dc9 100644 --- a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java +++ b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java @@ -343,11 +343,12 @@ public class SimpleCopyListing extends CopyListing { } } result = new WorkReportFileStatus[]( -fileSystem.listStatus(parent.getPath()), 0, true); +fileSystem.listStatus(parent.getPath()), retry, true); } catch (FileNotFoundException fnf) { LOG.error(FileNotFoundException exception in listStatus: + fnf.getMessage()); -result = new WorkReportFileStatus[](new FileStatus[0], 0, true, fnf); +result = new WorkReportFileStatus[](new FileStatus[0], retry, true, + fnf); } catch (Exception e) { LOG.error(Exception in listStatus. Will send for retry.); FileStatus[] parentList = new FileStatus[1]; @@ -391,7 +392,6 @@ public class SimpleCopyListing extends CopyListing { for (FileStatus status : sourceDirs) { workers.put(new WorkRequestFileStatus(status, 0)); - maybePrintStats(); } while (workers.hasWork()) { @@ -402,7 +402,7 @@ public class SimpleCopyListing extends CopyListing { if (LOG.isDebugEnabled()) { LOG.debug(Recording source-path: + child.getPath() + for copy.); } - if (retry == 0) { + if (workResult.getSuccess()) { CopyListingFileStatus childCopyListingStatus = DistCpUtils.toCopyListingFileStatus(sourceFS, child, preserveAcls child.isDirectory(), @@ -417,7 +417,6 @@ public class SimpleCopyListing extends CopyListing { LOG.debug(Traversing into source dir: + child.getPath()); } workers.put(new WorkRequestFileStatus(child, retry)); - maybePrintStats(); } } else { LOG.error(Giving up on + child.getPath() + @@ -472,5 +471,6 @@ public class SimpleCopyListing extends CopyListing { totalDirs++; } totalPaths++; +maybePrintStats(); } }
hadoop git commit: HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak)
Repository: hadoop Updated Branches: refs/heads/trunk 80935268f - a287d2fb7 HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/a287d2fb Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/a287d2fb Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/a287d2fb Branch: refs/heads/trunk Commit: a287d2fb77d9873b61c6ab24134993d784ae8475 Parents: 8093526 Author: Ravi Prakash ravip...@altiscale.com Authored: Fri Apr 24 13:39:07 2015 -0700 Committer: Ravi Prakash ravip...@altiscale.com Committed: Fri Apr 24 13:39:07 2015 -0700 -- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/tools/SimpleCopyListing.java | 10 +- 2 files changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/a287d2fb/hadoop-common-project/hadoop-common/CHANGES.txt -- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 80c8a54..826c77e 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -561,6 +561,9 @@ Release 2.8.0 - UNRELEASED HADOOP-11864. JWTRedirectAuthenticationHandler breaks java8 javadocs. (Larry McCay via stevel) +HADOOP-11876. Refactor code to make it more readable, minor +maybePrintStats bug (Zoran Dimitrijevic via raviprak) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/a287d2fb/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java -- diff --git a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java index b9ba099..4ea1dc9 100644 --- a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java +++ b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java @@ -343,11 +343,12 @@ public class SimpleCopyListing extends CopyListing { } } result = new WorkReportFileStatus[]( -fileSystem.listStatus(parent.getPath()), 0, true); +fileSystem.listStatus(parent.getPath()), retry, true); } catch (FileNotFoundException fnf) { LOG.error(FileNotFoundException exception in listStatus: + fnf.getMessage()); -result = new WorkReportFileStatus[](new FileStatus[0], 0, true, fnf); +result = new WorkReportFileStatus[](new FileStatus[0], retry, true, + fnf); } catch (Exception e) { LOG.error(Exception in listStatus. Will send for retry.); FileStatus[] parentList = new FileStatus[1]; @@ -391,7 +392,6 @@ public class SimpleCopyListing extends CopyListing { for (FileStatus status : sourceDirs) { workers.put(new WorkRequestFileStatus(status, 0)); - maybePrintStats(); } while (workers.hasWork()) { @@ -402,7 +402,7 @@ public class SimpleCopyListing extends CopyListing { if (LOG.isDebugEnabled()) { LOG.debug(Recording source-path: + child.getPath() + for copy.); } - if (retry == 0) { + if (workResult.getSuccess()) { CopyListingFileStatus childCopyListingStatus = DistCpUtils.toCopyListingFileStatus(sourceFS, child, preserveAcls child.isDirectory(), @@ -417,7 +417,6 @@ public class SimpleCopyListing extends CopyListing { LOG.debug(Traversing into source dir: + child.getPath()); } workers.put(new WorkRequestFileStatus(child, retry)); - maybePrintStats(); } } else { LOG.error(Giving up on + child.getPath() + @@ -472,5 +471,6 @@ public class SimpleCopyListing extends CopyListing { totalDirs++; } totalPaths++; +maybePrintStats(); } }
hadoop git commit: HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak)
Repository: hadoop Updated Branches: refs/heads/branch-2 524593ee8 - 122262a1f HADOOP-11876. Refactor code to make it more readable, minor maybePrintStats bug (Zoran Dimitrijevic via raviprak) Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/122262a1 Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/122262a1 Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/122262a1 Branch: refs/heads/branch-2 Commit: 122262a1fb2225b487ed34a970c23e95cee3528c Parents: 524593e Author: Ravi Prakash ravip...@altiscale.com Authored: Fri Apr 24 13:39:07 2015 -0700 Committer: Ravi Prakash ravip...@altiscale.com Committed: Fri Apr 24 13:39:48 2015 -0700 -- hadoop-common-project/hadoop-common/CHANGES.txt | 3 +++ .../java/org/apache/hadoop/tools/SimpleCopyListing.java | 10 +- 2 files changed, 8 insertions(+), 5 deletions(-) -- http://git-wip-us.apache.org/repos/asf/hadoop/blob/122262a1/hadoop-common-project/hadoop-common/CHANGES.txt -- diff --git a/hadoop-common-project/hadoop-common/CHANGES.txt b/hadoop-common-project/hadoop-common/CHANGES.txt index 8a55411..e018bc9 100644 --- a/hadoop-common-project/hadoop-common/CHANGES.txt +++ b/hadoop-common-project/hadoop-common/CHANGES.txt @@ -112,6 +112,9 @@ Release 2.8.0 - UNRELEASED HADOOP-11864. JWTRedirectAuthenticationHandler breaks java8 javadocs. (Larry McCay via stevel) +HADOOP-11876. Refactor code to make it more readable, minor +maybePrintStats bug (Zoran Dimitrijevic via raviprak) + Release 2.7.1 - UNRELEASED INCOMPATIBLE CHANGES http://git-wip-us.apache.org/repos/asf/hadoop/blob/122262a1/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java -- diff --git a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java index b9ba099..4ea1dc9 100644 --- a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java +++ b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/SimpleCopyListing.java @@ -343,11 +343,12 @@ public class SimpleCopyListing extends CopyListing { } } result = new WorkReportFileStatus[]( -fileSystem.listStatus(parent.getPath()), 0, true); +fileSystem.listStatus(parent.getPath()), retry, true); } catch (FileNotFoundException fnf) { LOG.error(FileNotFoundException exception in listStatus: + fnf.getMessage()); -result = new WorkReportFileStatus[](new FileStatus[0], 0, true, fnf); +result = new WorkReportFileStatus[](new FileStatus[0], retry, true, + fnf); } catch (Exception e) { LOG.error(Exception in listStatus. Will send for retry.); FileStatus[] parentList = new FileStatus[1]; @@ -391,7 +392,6 @@ public class SimpleCopyListing extends CopyListing { for (FileStatus status : sourceDirs) { workers.put(new WorkRequestFileStatus(status, 0)); - maybePrintStats(); } while (workers.hasWork()) { @@ -402,7 +402,7 @@ public class SimpleCopyListing extends CopyListing { if (LOG.isDebugEnabled()) { LOG.debug(Recording source-path: + child.getPath() + for copy.); } - if (retry == 0) { + if (workResult.getSuccess()) { CopyListingFileStatus childCopyListingStatus = DistCpUtils.toCopyListingFileStatus(sourceFS, child, preserveAcls child.isDirectory(), @@ -417,7 +417,6 @@ public class SimpleCopyListing extends CopyListing { LOG.debug(Traversing into source dir: + child.getPath()); } workers.put(new WorkRequestFileStatus(child, retry)); - maybePrintStats(); } } else { LOG.error(Giving up on + child.getPath() + @@ -472,5 +471,6 @@ public class SimpleCopyListing extends CopyListing { totalDirs++; } totalPaths++; +maybePrintStats(); } }