hadoop-common-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From waltersu4...@apache.org
Subject hadoop git commit: HDFS-9772. TestBlockReplacement#testThrottler doesn't work as expected. Contributed by Lin Yiqun.
Date Wed, 13 Apr 2016 09:56:41 GMT
Repository: hadoop
Updated Branches:
  refs/heads/branch-2 2b0b332e2 -> c195b1c9f


HDFS-9772. TestBlockReplacement#testThrottler doesn't work as expected. Contributed by Lin
Yiqun.

(cherry picked from commit 903428bf946827b4d58c7c577ed0c574a7cff029)


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

Branch: refs/heads/branch-2
Commit: c195b1c9fef67a51640f1c33989cc0401c081970
Parents: 2b0b332
Author: Walter Su <waltersu4549@apache.org>
Authored: Wed Apr 13 17:49:45 2016 +0800
Committer: Walter Su <waltersu4549@apache.org>
Committed: Wed Apr 13 17:50:30 2016 +0800

----------------------------------------------------------------------
 .../apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java  | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hadoop/blob/c195b1c9/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java
----------------------------------------------------------------------
diff --git a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java
b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java
index 286a180..597dc46 100644
--- a/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java
+++ b/hadoop-hdfs-project/hadoop-hdfs/src/test/java/org/apache/hadoop/hdfs/server/datanode/TestBlockReplacement.java
@@ -81,7 +81,6 @@ public class TestBlockReplacement {
     long bytesToSend = TOTAL_BYTES; 
     long start = Time.monotonicNow();
     DataTransferThrottler throttler = new DataTransferThrottler(bandwidthPerSec);
-    long totalBytes = 0L;
     long bytesSent = 1024*512L; // 0.5MB
     throttler.throttle(bytesSent);
     bytesToSend -= bytesSent;
@@ -93,7 +92,7 @@ public class TestBlockReplacement {
     } catch (InterruptedException ignored) {}
     throttler.throttle(bytesToSend);
     long end = Time.monotonicNow();
-    assertTrue(totalBytes*1000/(end-start)<=bandwidthPerSec);
+    assertTrue(TOTAL_BYTES * 1000 / (end - start) <= bandwidthPerSec);
   }
   
   @Test


Mime
View raw message