hbase-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From te...@apache.org
Subject hbase git commit: HBASE-16051 TestScannerHeartbeatMessages fails on some machines (Phil Yang)
Date Tue, 21 Jun 2016 14:32:41 GMT
Repository: hbase
Updated Branches:
  refs/heads/master 471f942ec -> b006e41a3


HBASE-16051 TestScannerHeartbeatMessages fails on some machines (Phil Yang)


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

Branch: refs/heads/master
Commit: b006e41a37de7f87b91d73407978f6b09b12a15b
Parents: 471f942
Author: tedyu <yuzhihong@gmail.com>
Authored: Tue Jun 21 07:32:30 2016 -0700
Committer: tedyu <yuzhihong@gmail.com>
Committed: Tue Jun 21 07:32:30 2016 -0700

----------------------------------------------------------------------
 .../TestScannerHeartbeatMessages.java           | 26 +++++++++++---------
 1 file changed, 15 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/hbase/blob/b006e41a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerHeartbeatMessages.java
----------------------------------------------------------------------
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerHeartbeatMessages.java
b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerHeartbeatMessages.java
index a958ee0..54bee94 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerHeartbeatMessages.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/regionserver/TestScannerHeartbeatMessages.java
@@ -92,7 +92,7 @@ public class TestScannerHeartbeatMessages {
   private static byte[] ROW = Bytes.toBytes("testRow");
   private static byte[][] ROWS = HTestConst.makeNAscii(ROW, NUM_ROWS);
 
-  private static int NUM_FAMILIES = 3;
+  private static int NUM_FAMILIES = 4;
   private static byte[] FAMILY = Bytes.toBytes("testFamily");
   private static byte[][] FAMILIES = HTestConst.makeNAscii(FAMILY, NUM_FAMILIES);
 
@@ -103,19 +103,23 @@ public class TestScannerHeartbeatMessages {
   private static int VALUE_SIZE = 128;
   private static byte[] VALUE = Bytes.createMaxByteArray(VALUE_SIZE);
 
-
-  private static int SERVER_TIMEOUT = 6000;
+  // The time limit should be based on the rpc timeout at client, or the client will regards
+  // the request as timeout before server return a heartbeat.
+  private static int SERVER_TIMEOUT = 60000;
 
   // Time, in milliseconds, that the client will wait for a response from the server before
timing
   // out. This value is used server side to determine when it is necessary to send a heartbeat
-  // message to the client
-  private static int CLIENT_TIMEOUT = SERVER_TIMEOUT / 3;
-
-  // By default, at most one row's worth of cells will be retrieved before the time limit
is reached
-  private static int DEFAULT_ROW_SLEEP_TIME = CLIENT_TIMEOUT / 5;
-  // By default, at most cells for two column families are retrieved before the time limit
is
-  // reached
-  private static int DEFAULT_CF_SLEEP_TIME = DEFAULT_ROW_SLEEP_TIME / NUM_FAMILIES;
+  // message to the client. Time limit will be 500 ms.
+  private static int CLIENT_TIMEOUT = 1000;
+
+  // In this test, we sleep after reading each row. So we should make sure after we get some
number
+  // of rows and sleep same times we must reach time limit, and do not timeout after next
sleeping.
+  // So set this to 200, we will get 3 rows and reach time limit at the start of 4th row,
then sleep
+  // for the 4th time. Total time is 800 ms so we will not timeout.
+  private static int DEFAULT_ROW_SLEEP_TIME = 200;
+
+  // Similar with row sleep time.
+  private static int DEFAULT_CF_SLEEP_TIME = 200;
 
   @BeforeClass
   public static void setUpBeforeClass() throws Exception {


Mime
View raw message