From 5dccb9751cfc107562b8d0ebe6b210251701a29b Mon Sep 17 00:00:00 2001 From: Michael Stack Date: Mon, 26 Apr 2010 22:13:18 +0000 Subject: [PATCH] HBASE-2488 Master should warn more loudly about unexpected events git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@938258 13f79535-47bb-0310-9956-ffa450edef68 --- CHANGES.txt | 2 ++ .../org/apache/hadoop/hbase/master/ServerManager.java | 9 ++++----- .../apache/hadoop/hbase/client/TestScannerTimeout.java | 4 ++-- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/CHANGES.txt b/CHANGES.txt index a695ea740a9..98ba9921b45 100644 --- a/CHANGES.txt +++ b/CHANGES.txt @@ -531,6 +531,8 @@ Release 0.21.0 - Unreleased HBASE-2452 Fix our Maven dependencies (Lars Francke via Stack) HBASE-2490 Improve the javadoc of the client API for HTable (Benoit Sigoure via Stack) + HBASE-2488 Master should warn more loudly about unexpected events + (Todd Lipcon via Stack) NEW FEATURES HBASE-1961 HBase EC2 scripts diff --git a/core/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java b/core/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java index b9e904ea665..213bb748a43 100644 --- a/core/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java +++ b/core/src/main/java/org/apache/hadoop/hbase/master/ServerManager.java @@ -254,6 +254,8 @@ public class ServerManager implements HConstants { throws IOException { HServerInfo info = new HServerInfo(serverInfo); if (isDead(info.getServerName())) { + LOG.info("Received report from region server " + info.getServerName() + + " previously marked dead. Rejecting report."); throw new Leases.LeaseStillHeldException(info.getServerName()); } if (msgs.length > 0) { @@ -573,11 +575,8 @@ public class ServerManager implements HConstants { } if (duplicateAssignment) { - if (LOG.isDebugEnabled()) { - LOG.debug("region server " + serverInfo.getServerAddress().toString() + - " should not have opened region " + - Bytes.toString(region.getRegionName())); - } + LOG.warn("region server " + serverInfo.getServerAddress().toString() + + " should not have opened region " + Bytes.toString(region.getRegionName())); // This Region should not have been opened. // Ask the server to shut it down, but don't report it as closed. diff --git a/core/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java b/core/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java index d74bc9b2342..56fbbf98e0a 100644 --- a/core/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java +++ b/core/src/test/java/org/apache/hadoop/hbase/client/TestScannerTimeout.java @@ -2,7 +2,7 @@ package org.apache.hadoop.hbase.client; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; -import org.apache.hadoop.hbase.HBaseConfiguration; +import org.apache.hadoop.conf.Configuration; import org.apache.hadoop.hbase.HBaseTestingUtility; import org.apache.hadoop.hbase.util.Bytes; import org.junit.After; @@ -30,7 +30,7 @@ public class TestScannerTimeout { */ @BeforeClass public static void setUpBeforeClass() throws Exception { - HBaseConfiguration c = TEST_UTIL.getConfiguration(); + Configuration c = TEST_UTIL.getConfiguration(); c.setInt("hbase.regionserver.lease.period", 1000); TEST_UTIL.startMiniCluster(1); }