public class TestDefaultMemStore extends Object
| Modifier and Type | Class and Description |
|---|---|
private class |
TestDefaultMemStore.EnvironmentEdgeForMemstoreTest |
private static class |
TestDefaultMemStore.ReadOwnWritesTester |
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.hadoop.hbase.regionserver.ChunkCreator |
chunkCreator |
static HBaseClassTestRule |
CLASS_RULE |
protected static byte[] |
FAMILY |
private static org.slf4j.Logger |
LOG |
protected org.apache.hadoop.hbase.regionserver.AbstractMemStore |
memstore |
protected org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl |
mvcc |
org.junit.rules.TestName |
name |
protected static int |
QUALIFIER_COUNT |
protected static int |
ROW_COUNT |
protected AtomicLong |
startSeqNum |
| Constructor and Description |
|---|
TestDefaultMemStore() |
| Modifier and Type | Method and Description |
|---|---|
static void |
addRegionToMETA(org.apache.hadoop.hbase.regionserver.HRegion meta,
org.apache.hadoop.hbase.regionserver.HRegion r)
Inserts a new region's meta information into the passed
meta region. |
protected int |
addRows(org.apache.hadoop.hbase.regionserver.AbstractMemStore hmc)
Adds
ROW_COUNT rows and QUALIFIER_COUNT |
private static void |
addRows(int count,
org.apache.hadoop.hbase.regionserver.MemStore mem) |
protected int |
addRows(org.apache.hadoop.hbase.regionserver.MemStore hmc,
long ts)
Adds
ROW_COUNT rows and QUALIFIER_COUNT |
protected void |
assertScannerResults(org.apache.hadoop.hbase.regionserver.KeyValueScanner scanner,
org.apache.hadoop.hbase.KeyValue[] expected) |
protected void |
checkShouldFlush(org.apache.hadoop.conf.Configuration conf,
boolean expected) |
(package private) static void |
doScan(org.apache.hadoop.hbase.regionserver.MemStore ms,
int iteration) |
private String |
getName() |
protected void |
internalSetUp() |
private void |
isExpectedRowWithoutTimestamps(int rowIndex,
List<org.apache.hadoop.hbase.Cell> kvs) |
static void |
main(String[] args) |
private static byte[] |
makeQualifier(int i1,
int i2) |
private long |
runSnapshot(org.apache.hadoop.hbase.regionserver.AbstractMemStore hmc) |
void |
setUp() |
static void |
tearDownClass() |
void |
testGet_memstoreAndSnapShot() |
void |
testGetNextRow()
Test getNextRow from memstore
|
void |
testGetWithDelete() |
void |
testGetWithDeleteColumn() |
void |
testGetWithDeleteFamily() |
void |
testKeepDeleteInmemstore() |
void |
testMemstoreConcurrentControl() |
void |
testMemstoreDeletesVisibilityWithSameKey()
When we insert a higher-memstoreTS deletion of a cell but with
the same timestamp, we still need to provide consistent reads
for the same scanner.
|
void |
testMemstoreEditsVisibilityWithSameKey()
Regression test for HBASE-2616, HBASE-2670.
|
void |
testMultipleVersionsSimple() |
void |
testPutSameCell() |
void |
testPutSameKey() |
void |
testReadOwnWritesUnderConcurrency() |
void |
testRetainsDeleteColumn() |
void |
testRetainsDeleteFamily() |
void |
testRetainsDeleteVersion() |
void |
testScanAcrossSnapshot()
Test memstore snapshot happening while scanning.
|
void |
testScanAcrossSnapshot2()
A simple test which verifies the 3 possible states when scanning across snapshot.
|
void |
testShouldFlush()
Tests the HRegion.shouldFlush method - adds an edit in the memstore
and checks that shouldFlush returns true, and another where it disables
the periodic flush functionality and tests whether shouldFlush returns
false.
|
void |
testShouldFlushMeta() |
void |
testSnapshotting()
Test memstore snapshots
|
void |
testUpdateToTimeOfOldestEdit()
Tests that the timeOfOldestEdit is updated correctly for the
various edit operations in memstore.
|
void |
testUpsertMemstoreSize()
Add keyvalues with a fixed memstoreTs, and checks that memstore size is decreased
as older keyvalues are deleted from the memstore.
|
protected void |
verifyScanAcrossSnapshot2(org.apache.hadoop.hbase.KeyValue kv1,
org.apache.hadoop.hbase.KeyValue kv2) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
public org.junit.rules.TestName name
protected org.apache.hadoop.hbase.regionserver.AbstractMemStore memstore
protected static final int ROW_COUNT
protected static final int QUALIFIER_COUNT
protected static final byte[] FAMILY
protected org.apache.hadoop.hbase.regionserver.MultiVersionConcurrencyControl mvcc
protected AtomicLong startSeqNum
protected org.apache.hadoop.hbase.regionserver.ChunkCreator chunkCreator
public TestDefaultMemStore()
public static void tearDownClass() throws Exception
Exceptionprotected void internalSetUp() throws Exception
Exceptionpublic void testPutSameKey()
public void testPutSameCell()
public void testScanAcrossSnapshot() throws IOException
IOExceptionpublic void testScanAcrossSnapshot2() throws IOException, CloneNotSupportedException
protected void verifyScanAcrossSnapshot2(org.apache.hadoop.hbase.KeyValue kv1, org.apache.hadoop.hbase.KeyValue kv2) throws IOException
IOExceptionprotected void assertScannerResults(org.apache.hadoop.hbase.regionserver.KeyValueScanner scanner, org.apache.hadoop.hbase.KeyValue[] expected) throws IOException
IOExceptionpublic void testMemstoreConcurrentControl() throws IOException
IOExceptionpublic void testMemstoreEditsVisibilityWithSameKey() throws IOException
IOExceptionpublic void testMemstoreDeletesVisibilityWithSameKey() throws IOException
IOExceptionpublic void testReadOwnWritesUnderConcurrency() throws Throwable
Throwablepublic void testSnapshotting() throws IOException
IOExceptionpublic void testMultipleVersionsSimple() throws Exception
Exceptionpublic void testGetNextRow() throws Exception
InterruptedExceptionExceptionpublic void testGet_memstoreAndSnapShot() throws IOException
IOExceptionpublic void testGetWithDelete() throws IOException
IOExceptionpublic void testGetWithDeleteColumn() throws IOException
IOExceptionpublic void testGetWithDeleteFamily() throws IOException
IOExceptionpublic void testKeepDeleteInmemstore()
public void testRetainsDeleteVersion() throws IOException
IOExceptionpublic void testRetainsDeleteColumn() throws IOException
IOExceptionpublic void testRetainsDeleteFamily() throws IOException
IOExceptionprivate static byte[] makeQualifier(int i1, int i2)
public void testUpsertMemstoreSize() throws Exception
Exceptionpublic void testUpdateToTimeOfOldestEdit() throws Exception
Exceptionpublic void testShouldFlush() throws Exception
Exceptionprotected void checkShouldFlush(org.apache.hadoop.conf.Configuration conf, boolean expected) throws Exception
Exceptionpublic void testShouldFlushMeta() throws Exception
Exceptionpublic static void addRegionToMETA(org.apache.hadoop.hbase.regionserver.HRegion meta, org.apache.hadoop.hbase.regionserver.HRegion r) throws IOException
meta region. Used by the HMaster bootstrap code adding
new table to hbase:meta table.meta - hbase:meta HRegion to be updatedr - HRegion to add to metaIOExceptionprotected int addRows(org.apache.hadoop.hbase.regionserver.AbstractMemStore hmc)
ROW_COUNT rows and QUALIFIER_COUNThmc - Instance to add rows to.IOExceptionprotected int addRows(org.apache.hadoop.hbase.regionserver.MemStore hmc, long ts)
ROW_COUNT rows and QUALIFIER_COUNThmc - Instance to add rows to.IOExceptionprivate long runSnapshot(org.apache.hadoop.hbase.regionserver.AbstractMemStore hmc) throws org.apache.hadoop.hbase.exceptions.UnexpectedStateException
org.apache.hadoop.hbase.exceptions.UnexpectedStateExceptionprivate void isExpectedRowWithoutTimestamps(int rowIndex, List<org.apache.hadoop.hbase.Cell> kvs)
private static void addRows(int count, org.apache.hadoop.hbase.regionserver.MemStore mem)
static void doScan(org.apache.hadoop.hbase.regionserver.MemStore ms, int iteration) throws IOException
IOExceptionpublic static void main(String[] args) throws IOException
IOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.