HBASE-2054 memstore size 0 is >= than blocking -2.0g size
HBASE-2057 Cluster won't stop git-svn-id: https://svn.apache.org/repos/asf/hadoop/hbase/trunk@892392 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
21bd10825a
commit
91fa2ad048
|
@ -133,6 +133,8 @@ Release 0.21.0 - Unreleased
|
||||||
HBASE-2044 HBASE-1822 removed not-deprecated APIs
|
HBASE-2044 HBASE-1822 removed not-deprecated APIs
|
||||||
HBASE-1960 Master should wait for DFS to come up when creating
|
HBASE-1960 Master should wait for DFS to come up when creating
|
||||||
hbase.version
|
hbase.version
|
||||||
|
HBASE-2054 memstore size 0 is >= than blocking -2.0g size
|
||||||
|
HBASE-2057 Cluster won't stop
|
||||||
|
|
||||||
IMPROVEMENTS
|
IMPROVEMENTS
|
||||||
HBASE-1760 Cleanup TODOs in HTable
|
HBASE-1760 Cleanup TODOs in HTable
|
||||||
|
|
|
@ -91,9 +91,9 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
|
||||||
|
|
||||||
public static final boolean DEFAULT_READONLY = false;
|
public static final boolean DEFAULT_READONLY = false;
|
||||||
|
|
||||||
public static final int DEFAULT_MEMSTORE_FLUSH_SIZE = 1024*1024*64;
|
public static final long DEFAULT_MEMSTORE_FLUSH_SIZE = 1024*1024*64L;
|
||||||
|
|
||||||
public static final int DEFAULT_MAX_FILESIZE = 1024*1024*256;
|
public static final long DEFAULT_MAX_FILESIZE = 1024*1024*256L;
|
||||||
|
|
||||||
public static final boolean DEFAULT_DEFERRED_LOG_FLUSH = true;
|
public static final boolean DEFAULT_DEFERRED_LOG_FLUSH = true;
|
||||||
|
|
||||||
|
@ -421,7 +421,7 @@ public class HTableDescriptor implements WritableComparable<HTableDescriptor> {
|
||||||
/**
|
/**
|
||||||
* @return memory cache flush size for each hregion
|
* @return memory cache flush size for each hregion
|
||||||
*/
|
*/
|
||||||
public int getMemStoreFlushSize() {
|
public long getMemStoreFlushSize() {
|
||||||
byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY);
|
byte [] value = getValue(MEMSTORE_FLUSHSIZE_KEY);
|
||||||
if (value != null)
|
if (value != null)
|
||||||
return Integer.valueOf(Bytes.toString(value)).intValue();
|
return Integer.valueOf(Bytes.toString(value)).intValue();
|
||||||
|
|
|
@ -182,10 +182,10 @@ public class HRegion implements HConstants, HeapSize { // , Writable{
|
||||||
|
|
||||||
private volatile WriteState writestate = new WriteState();
|
private volatile WriteState writestate = new WriteState();
|
||||||
|
|
||||||
final int memstoreFlushSize;
|
final long memstoreFlushSize;
|
||||||
private volatile long lastFlushTime;
|
private volatile long lastFlushTime;
|
||||||
final FlushRequester flushListener;
|
final FlushRequester flushListener;
|
||||||
private final int blockingMemStoreSize;
|
private final long blockingMemStoreSize;
|
||||||
final long threadWakeFrequency;
|
final long threadWakeFrequency;
|
||||||
// Used to guard splits and closes
|
// Used to guard splits and closes
|
||||||
private final ReentrantReadWriteLock splitsAndClosesLock =
|
private final ReentrantReadWriteLock splitsAndClosesLock =
|
||||||
|
@ -216,11 +216,11 @@ public class HRegion implements HConstants, HeapSize { // , Writable{
|
||||||
*/
|
*/
|
||||||
public HRegion(){
|
public HRegion(){
|
||||||
this.basedir = null;
|
this.basedir = null;
|
||||||
this.blockingMemStoreSize = 0;
|
this.blockingMemStoreSize = 0L;
|
||||||
this.conf = null;
|
this.conf = null;
|
||||||
this.flushListener = null;
|
this.flushListener = null;
|
||||||
this.fs = null;
|
this.fs = null;
|
||||||
this.memstoreFlushSize = 0;
|
this.memstoreFlushSize = 0L;
|
||||||
this.log = null;
|
this.log = null;
|
||||||
this.regionCompactionDir = null;
|
this.regionCompactionDir = null;
|
||||||
this.regiondir = null;
|
this.regiondir = null;
|
||||||
|
@ -267,14 +267,14 @@ public class HRegion implements HConstants, HeapSize { // , Writable{
|
||||||
}
|
}
|
||||||
this.regionCompactionDir =
|
this.regionCompactionDir =
|
||||||
new Path(getCompactionDir(basedir), encodedNameStr);
|
new Path(getCompactionDir(basedir), encodedNameStr);
|
||||||
int flushSize = regionInfo.getTableDesc().getMemStoreFlushSize();
|
long flushSize = regionInfo.getTableDesc().getMemStoreFlushSize();
|
||||||
if (flushSize == HTableDescriptor.DEFAULT_MEMSTORE_FLUSH_SIZE) {
|
if (flushSize == HTableDescriptor.DEFAULT_MEMSTORE_FLUSH_SIZE) {
|
||||||
flushSize = conf.getInt("hbase.hregion.memstore.flush.size",
|
flushSize = conf.getLong("hbase.hregion.memstore.flush.size",
|
||||||
HTableDescriptor.DEFAULT_MEMSTORE_FLUSH_SIZE);
|
HTableDescriptor.DEFAULT_MEMSTORE_FLUSH_SIZE);
|
||||||
}
|
}
|
||||||
this.memstoreFlushSize = flushSize;
|
this.memstoreFlushSize = flushSize;
|
||||||
this.blockingMemStoreSize = this.memstoreFlushSize *
|
this.blockingMemStoreSize = this.memstoreFlushSize *
|
||||||
conf.getInt("hbase.hregion.memstore.block.multiplier", 1);
|
conf.getLong("hbase.hregion.memstore.block.multiplier", 2);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -2398,7 +2398,7 @@ public class HRegion implements HConstants, HeapSize { // , Writable{
|
||||||
}
|
}
|
||||||
|
|
||||||
public static final long FIXED_OVERHEAD = ClassSize.align(
|
public static final long FIXED_OVERHEAD = ClassSize.align(
|
||||||
(3 * Bytes.SIZEOF_LONG) + (2 * Bytes.SIZEOF_INT) + Bytes.SIZEOF_BOOLEAN +
|
(5 * Bytes.SIZEOF_LONG) + Bytes.SIZEOF_BOOLEAN +
|
||||||
(19 * ClassSize.REFERENCE) + ClassSize.OBJECT);
|
(19 * ClassSize.REFERENCE) + ClassSize.OBJECT);
|
||||||
|
|
||||||
public static final long DEEP_OVERHEAD = ClassSize.align(FIXED_OVERHEAD +
|
public static final long DEEP_OVERHEAD = ClassSize.align(FIXED_OVERHEAD +
|
||||||
|
|
|
@ -340,8 +340,12 @@ public class ZooKeeperWrapper implements HConstants {
|
||||||
} catch (InterruptedException e) {
|
} catch (InterruptedException e) {
|
||||||
LOG.warn("Failed to set state node in ZooKeeper", e);
|
LOG.warn("Failed to set state node in ZooKeeper", e);
|
||||||
} catch (KeeperException e) {
|
} catch (KeeperException e) {
|
||||||
|
if(e.code() == KeeperException.Code.NODEEXISTS) {
|
||||||
|
LOG.debug("State node exists.");
|
||||||
|
} else {
|
||||||
LOG.warn("Failed to set state node in ZooKeeper", e);
|
LOG.warn("Failed to set state node in ZooKeeper", e);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue