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
This commit is contained in:
Zhihong Yu 2013-01-29 22:18:13 +00:00
parent 554d5d239b
commit eacea17618
2 changed files with 0 additions and 15 deletions

View File

@ -287,9 +287,6 @@ public final class HConstants {
public static final boolean DEFAULT_HREGION_EDITS_REPLAY_SKIP_ERRORS = public static final boolean DEFAULT_HREGION_EDITS_REPLAY_SKIP_ERRORS =
false; 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 */ /** Maximum value length, enforced on KeyValue construction */
public static final int MAXIMUM_VALUE_LENGTH = Integer.MAX_VALUE - 1; public static final int MAXIMUM_VALUE_LENGTH = Integer.MAX_VALUE - 1;

View File

@ -342,13 +342,6 @@ public class HRegionServer implements ClientProtocol,
/** region server configuration name */ /** region server configuration name */
public static final String REGIONSERVER_CONF = "regionserver_conf"; 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<byte[]> reservedSpace = new LinkedList<byte[]>();
private MetricsRegionServer metricsRegionServer; private MetricsRegionServer metricsRegionServer;
/* /*
@ -728,10 +721,6 @@ public class HRegionServer implements ClientProtocol,
try { try {
initializeZooKeeper(); initializeZooKeeper();
initializeThreads(); 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) { } catch (Throwable t) {
// Call stop if error or process will stick around for ever since server // Call stop if error or process will stick around for ever since server
// puts up non-daemon threads. // puts up non-daemon threads.
@ -1735,7 +1724,6 @@ public class HRegionServer implements ClientProtocol,
LOG.fatal(msg); LOG.fatal(msg);
} }
this.abortRequested = true; this.abortRequested = true;
this.reservedSpace.clear();
// HBASE-4014: show list of coprocessors that were loaded to help debug // HBASE-4014: show list of coprocessors that were loaded to help debug
// regionserver crashes.Note that we're implicitly using // regionserver crashes.Note that we're implicitly using
// java.util.HashSet's toString() method to print the coprocessor names. // java.util.HashSet's toString() method to print the coprocessor names.