You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hbase.apache.org by st...@apache.org on 2020/02/19 23:48:41 UTC

[hbase] branch master updated: HBASE-23872 [Flakey Test] TestGenerateDelegationToken; Master not initialized after 200000ms

This is an automated email from the ASF dual-hosted git repository.

stack pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/hbase.git


The following commit(s) were added to refs/heads/master by this push:
     new 435b793  HBASE-23872 [Flakey Test] TestGenerateDelegationToken; Master not initialized after 200000ms
435b793 is described below

commit 435b79335e81c0c6cc79dc8b1a1c6f495ed76d74
Author: stack <st...@apache.org>
AuthorDate: Wed Feb 19 13:41:18 2020 -0800

    HBASE-23872 [Flakey Test] TestGenerateDelegationToken; Master not initialized after 200000ms
---
 .../src/main/java/org/apache/hadoop/hbase/master/ServerManager.java   | 4 +++-
 .../org/apache/hadoop/hbase/security/token/SecureTestCluster.java     | 4 ++++
 2 files changed, 7 insertions(+), 1 deletion(-)

diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
index a61f96a..681d507 100644
--- a/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
+++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java
@@ -132,6 +132,8 @@ public class ServerManager {
   public static final int FLUSHEDSEQUENCEID_FLUSHER_INTERVAL_DEFAULT =
       3 * 60 * 60 * 1000; // 3 hours
 
+  public static final String MAX_CLOCK_SKEW_MS = "hbase.master.maxclockskew";
+
   private static final Logger LOG = LoggerFactory.getLogger(ServerManager.class);
 
   // Set if we are to shutdown the cluster.
@@ -179,7 +181,7 @@ public class ServerManager {
   public ServerManager(final MasterServices master) {
     this.master = master;
     Configuration c = master.getConfiguration();
-    maxSkew = c.getLong("hbase.master.maxclockskew", 30000);
+    maxSkew = c.getLong(MAX_CLOCK_SKEW_MS, 30000);
     warningSkew = c.getLong("hbase.master.warningclockskew", 10000);
     persistFlushedSequenceId = c.getBoolean(PERSIST_FLUSHEDSEQUENCEID,
         PERSIST_FLUSHEDSEQUENCEID_DEFAULT);
diff --git a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/SecureTestCluster.java b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/SecureTestCluster.java
index 964ef14..3900431 100644
--- a/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/SecureTestCluster.java
+++ b/hbase-server/src/test/java/org/apache/hadoop/hbase/security/token/SecureTestCluster.java
@@ -22,6 +22,7 @@ import org.apache.hadoop.fs.Path;
 import org.apache.hadoop.hbase.HBaseTestingUtility;
 import org.apache.hadoop.hbase.LocalHBaseCluster;
 import org.apache.hadoop.hbase.coprocessor.CoprocessorHost;
+import org.apache.hadoop.hbase.master.ServerManager;
 import org.apache.hadoop.hbase.security.HBaseKerberosUtils;
 import org.apache.hadoop.hbase.util.FSUtils;
 import org.apache.hadoop.minikdc.MiniKdc;
@@ -56,6 +57,9 @@ public class SecureTestCluster {
    */
   @BeforeClass
   public static void setUp() throws Exception {
+    // Can take a long time for the mini kdc to come up on loaded test cluster. Tolerate this in
+    // test by upping the skew time allowed from 30s to 90s.
+    TEST_UTIL.getConfiguration().setLong(ServerManager.MAX_CLOCK_SKEW_MS, 90000);
     KDC = TEST_UTIL.setupMiniKdc(KEYTAB_FILE);
     USERNAME = UserGroupInformation.getLoginUser().getShortUserName();
     PRINCIPAL = USERNAME + "/" + HOST;