From 1fb69ec11a9d1dbc72a70d0d6a078bb4d609b80e Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Fri, 15 Aug 2008 18:27:37 +0000 Subject: [PATCH] HBASE-830 Debugging HCM.locateRegionInMeta is painful git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@686308 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 1 + conf/hbase-default.xml | 2 +- src/java/org/apache/hadoop/hbase/HConstants.java | 4 ++-- .../org/apache/hadoop/hbase/client/HConnectionManager.java | 6 ++++-- 4 files changed, 8 insertions(+), 5 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index d59e10ed1df..530728294d2 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -35,6 +35,7 @@ Release 0.3.0 - Unreleased instead of Map (Jonathan Gray via Stack) HBASE-795 More Table operation in TableHandler for REST interface (Sishen Freecity via Stack) + HBASE-830 Debugging HCM.locateRegionInMeta is painful NEW FEATURES HBASE-787 Postgresql to HBase table replication example (Tim Sell via Stack) diff --git a/conf/hbase-default.xml b/conf/hbase-default.xml index 28e3ab0414d..1da626462ab 100644 --- a/conf/hbase-default.xml +++ b/conf/hbase-default.xml @@ -106,7 +106,7 @@ hbase.client.pause - 10000 + 2000 General client pause value. Used mostly as value to wait before running a retry of a failed get, region lookup, etc. diff --git a/src/java/org/apache/hadoop/hbase/HConstants.java b/src/java/org/apache/hadoop/hbase/HConstants.java index c7e89a6dc4a..1ff54250fbf 100644 --- a/src/java/org/apache/hadoop/hbase/HConstants.java +++ b/src/java/org/apache/hadoop/hbase/HConstants.java @@ -231,5 +231,5 @@ public interface HConstants { * This is a retry backoff multiplier table similar to the BSD TCP syn * backoff table, a bit more aggressive than simple exponential backoff. */ - public static int RETRY_BACKOFF[] = { 1, 1, 1, 1, 2, 4, 8, 16, 32, 64 }; -} \ No newline at end of file + public static int RETRY_BACKOFF[] = { 1, 1, 1, 2, 2, 4, 4, 8, 16, 32 }; +} diff --git a/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java b/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java index b5d5aa6d0fe..b317104874f 100644 --- a/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java +++ b/src/java/org/apache/hadoop/hbase/client/HConnectionManager.java @@ -163,7 +163,7 @@ public class HConnectionManager implements HConstants { "Unable to find region server interface " + serverClassName, e); } - this.pause = conf.getLong("hbase.client.pause", 10 * 1000); + this.pause = conf.getLong("hbase.client.pause", 2 * 1000); this.numRetries = conf.getInt("hbase.client.retries.number", 10); this.maxRPCAttempts = conf.getInt("hbase.client.rpc.maxattempts", 1); @@ -557,7 +557,9 @@ public class HConnectionManager implements HConstants { } if (tries < numRetries - 1) { if (LOG.isDebugEnabled()) { - LOG.debug("reloading table servers because: " + e.getMessage()); + LOG.debug("Attempt " + tries + " of " + this.numRetries + + " failed with <" + e + ">. Retrying after sleep of " + + getPauseTime(tries)); } relocateRegion(parentTable, metaKey); } else {