kafka-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From guozh...@apache.org
Subject kafka git commit: KAFKA-5095: Adjust accepted overhead for ThreadCacheTest
Date Thu, 20 Apr 2017 21:55:57 GMT
Repository: kafka
Updated Branches:
  refs/heads/0.10.2 b9dadae97 -> 0731d35e5


KAFKA-5095: Adjust accepted overhead for ThreadCacheTest

Author: Eno Thereska <eno@confluent.io>

Reviewers: Damian Guy, Guozhang Wang

Closes #2877 from enothereska/KAFKA-5095-cacheOverheads

(cherry picked from commit f18a14af361f24851664b428b46d5789f51a80ea)
Signed-off-by: Guozhang Wang <wangguoz@gmail.com>


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

Branch: refs/heads/0.10.2
Commit: 0731d35e58b2d70e91c06edcd17c5e447b2a1f75
Parents: b9dadae
Author: Eno Thereska <eno@confluent.io>
Authored: Thu Apr 20 14:55:43 2017 -0700
Committer: Guozhang Wang <wangguoz@gmail.com>
Committed: Thu Apr 20 14:55:53 2017 -0700

----------------------------------------------------------------------
 .../apache/kafka/streams/state/internals/ThreadCacheTest.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/kafka/blob/0731d35e/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
----------------------------------------------------------------------
diff --git a/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
b/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
index 499d823..a228183 100644
--- a/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
+++ b/streams/src/test/java/org/apache/kafka/streams/state/internals/ThreadCacheTest.java
@@ -105,7 +105,7 @@ public class ThreadCacheTest {
     public void cacheOverheadsSmallValues() {
         Runtime runtime = Runtime.getRuntime();
         double factor = 0.05;
-        double systemFactor = 2.5;
+        double systemFactor = 3; // if I ask for a cache size of 10 MB, accept an overhead
of 3x, i.e., 30 MBs might be allocated
         long desiredCacheSize = Math.min(100 * 1024 * 1024L, runtime.maxMemory());
         int keySizeBytes = 8;
         int valueSizeBytes = 100;
@@ -117,7 +117,7 @@ public class ThreadCacheTest {
     public void cacheOverheadsLargeValues() {
         Runtime runtime = Runtime.getRuntime();
         double factor = 0.05;
-        double systemFactor = 1.5;
+        double systemFactor = 2; // if I ask for a cache size of 10 MB, accept an overhead
of 2x, i.e., 20 MBs might be allocated
         long desiredCacheSize = Math.min(100 * 1024 * 1024L, runtime.maxMemory());
         int keySizeBytes = 8;
         int valueSizeBytes = 1000;


Mime
View raw message