hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ji...@apache.org
Subject hadoop git commit: HADOOP-11354. ThrottledInputStream doesn't perform effective throttling. Contributed by Ted Yu.
Date Mon, 08 Dec 2014 19:11:13 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 059c4a372 -> 582f96e41


HADOOP-11354. ThrottledInputStream doesn't perform effective throttling. Contributed by Ted
Yu.


Project: http://git-wip-us.apache.org/repos/asf/hadoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/hadoop/commit/582f96e4
Tree: http://git-wip-us.apache.org/repos/asf/hadoop/tree/582f96e4
Diff: http://git-wip-us.apache.org/repos/asf/hadoop/diff/582f96e4

Branch: refs/heads/branch-2
Commit: 582f96e41dc3a739b5ca24ca117f7cbc9f3e7bc9
Parents: 059c4a3
Author: Jing Zhao <jing9@apache.org>
Authored: Mon Dec 8 11:08:17 2014 -0800
Committer: Jing Zhao <jing9@apache.org>
Committed: Mon Dec 8 11:09:34 2014 -0800

----------------------------------------------------------------------
 hadoop-common-project/hadoop-common/CHANGES.txt                   | 3 +++
 .../java/org/apache/hadoop/tools/util/ThrottledInputStream.java   | 2 +-
 2 files changed, 4 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/582f96e4/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 617dfbb..33fa2f5 100644
--- a/hadoop-common-project/hadoop-common/CHANGES.txt
+++ b/hadoop-common-project/hadoop-common/CHANGES.txt
@@ -153,6 +153,9 @@ Release 2.7.0 - UNRELEASED
     HADOOP-11343. Overflow is not properly handled in caclulating final iv for
     AES CTR. (Jerry Chen via wang)
 
+    HADOOP-11354. ThrottledInputStream doesn't perform effective throttling.
+    (Ted Yu via jing9)
+
 Release 2.6.0 - 2014-11-18
 
   INCOMPATIBLE CHANGES

http://git-wip-us.apache.org/repos/asf/hadoop/blob/582f96e4/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/ThrottledInputStream.java
----------------------------------------------------------------------
diff --git a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/ThrottledInputStream.java
b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/ThrottledInputStream.java
index f6fe118..d08a301 100644
--- a/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/ThrottledInputStream.java
+++ b/hadoop-tools/hadoop-distcp/src/main/java/org/apache/hadoop/tools/util/ThrottledInputStream.java
@@ -115,7 +115,7 @@ public class ThrottledInputStream extends InputStream {
   }
 
   private void throttle() throws IOException {
-    if (getBytesPerSec() > maxBytesPerSec) {
+    while (getBytesPerSec() > maxBytesPerSec) {
       try {
         Thread.sleep(SLEEP_DURATION_MS);
         totalSleepTime += SLEEP_DURATION_MS;


Mime
View raw message