From eacea17618933ccec6f26bd213da5cdb2ba71e97 Mon Sep 17 00:00:00 2001 From: Zhihong Yu Date: Tue, 29 Jan 2013 22:18:13 +0000 Subject: [PATCH] HBASE-7706 Remove reservation blocks from region server (Ted Yu) git-svn-id: https://svn.apache.org/repos/asf/hbase/trunk@1440183 13f79535-47bb-0310-9956-ffa450edef68 --- .../java/org/apache/hadoop/hbase/HConstants.java | 3 --- .../hadoop/hbase/regionserver/HRegionServer.java | 12 ------------ 2 files changed, 15 deletions(-) diff --git a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java index 60601b7960a..368ba3aee64 100644 --- a/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java +++ b/hbase-common/src/main/java/org/apache/hadoop/hbase/HConstants.java @@ -287,9 +287,6 @@ public final class HConstants { public static final boolean DEFAULT_HREGION_EDITS_REPLAY_SKIP_ERRORS = false; - /** Default size of a reservation block */ - public static final int DEFAULT_SIZE_RESERVATION_BLOCK = 1024 * 1024 * 5; - /** Maximum value length, enforced on KeyValue construction */ public static final int MAXIMUM_VALUE_LENGTH = Integer.MAX_VALUE - 1; diff --git a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java index f831e19a86d..b68137828dd 100644 --- a/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java +++ b/hbase-server/src/main/java/org/apache/hadoop/hbase/regionserver/HRegionServer.java @@ -342,13 +342,6 @@ public class HRegionServer implements ClientProtocol, /** region server configuration name */ public static final String REGIONSERVER_CONF = "regionserver_conf"; - /* - * Space is reserved in HRS constructor and then released when aborting to - * recover from an OOME. See HBASE-706. TODO: Make this percentage of the heap - * or a minimum. - */ - private final LinkedList reservedSpace = new LinkedList(); - private MetricsRegionServer metricsRegionServer; /* @@ -728,10 +721,6 @@ public class HRegionServer implements ClientProtocol, try { initializeZooKeeper(); initializeThreads(); - int nbBlocks = conf.getInt("hbase.regionserver.nbreservationblocks", 4); - for (int i = 0; i < nbBlocks; i++) { - reservedSpace.add(new byte[HConstants.DEFAULT_SIZE_RESERVATION_BLOCK]); - } } catch (Throwable t) { // Call stop if error or process will stick around for ever since server // puts up non-daemon threads. @@ -1735,7 +1724,6 @@ public class HRegionServer implements ClientProtocol, LOG.fatal(msg); } this.abortRequested = true; - this.reservedSpace.clear(); // HBASE-4014: show list of coprocessors that were loaded to help debug // regionserver crashes.Note that we're implicitly using // java.util.HashSet's toString() method to print the coprocessor names.