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 |
---|---|
private 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 n
|
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 n
|
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 |
verifyOneScanAcrossSnapshot2(org.apache.hadoop.hbase.KeyValue kv1,
org.apache.hadoop.hbase.KeyValue kv2) |
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
Exception
protected void internalSetUp() throws Exception
Exception
public void testPutSameKey()
public void testPutSameCell()
public void testScanAcrossSnapshot() throws IOException
IOException
public void testScanAcrossSnapshot2() throws IOException, CloneNotSupportedException
protected void verifyScanAcrossSnapshot2(org.apache.hadoop.hbase.KeyValue kv1, org.apache.hadoop.hbase.KeyValue kv2) throws IOException
IOException
protected void verifyOneScanAcrossSnapshot2(org.apache.hadoop.hbase.KeyValue kv1, org.apache.hadoop.hbase.KeyValue kv2) throws IOException
IOException
protected void assertScannerResults(org.apache.hadoop.hbase.regionserver.KeyValueScanner scanner, org.apache.hadoop.hbase.KeyValue[] expected) throws IOException
IOException
public void testMemstoreConcurrentControl() throws IOException
IOException
public void testMemstoreEditsVisibilityWithSameKey() throws IOException
IOException
public void testMemstoreDeletesVisibilityWithSameKey() throws IOException
IOException
public void testReadOwnWritesUnderConcurrency() throws Throwable
Throwable
public void testSnapshotting() throws IOException
IOException
public void testMultipleVersionsSimple() throws Exception
Exception
public void testGetNextRow() throws Exception
Exception
public void testGet_memstoreAndSnapShot() throws IOException
IOException
public void testGetWithDelete() throws IOException
IOException
public void testGetWithDeleteColumn() throws IOException
IOException
public void testGetWithDeleteFamily() throws IOException
IOException
public void testKeepDeleteInmemstore()
public void testRetainsDeleteVersion() throws IOException
IOException
public void testRetainsDeleteColumn() throws IOException
IOException
public void testRetainsDeleteFamily() throws IOException
IOException
private static byte[] makeQualifier(int i1, int i2)
public void testUpsertMemstoreSize() throws Exception
Exception
public void testUpdateToTimeOfOldestEdit() throws Exception
Exception
public void testShouldFlush() throws Exception
Exception
protected void checkShouldFlush(org.apache.hadoop.conf.Configuration conf, boolean expected) throws Exception
Exception
public void testShouldFlushMeta() throws Exception
Exception
private static void addRegionToMETA(org.apache.hadoop.hbase.regionserver.HRegion meta, org.apache.hadoop.hbase.regionserver.HRegion r) throws IOException
meta
region.meta
- hbase:meta HRegion to be updatedr
- HRegion to add to meta
IOException
protected int addRows(org.apache.hadoop.hbase.regionserver.AbstractMemStore hmc)
ROW_COUNT
rows and QUALIFIER_COUNT
hmc
- Instance to add rows to.protected int addRows(org.apache.hadoop.hbase.regionserver.MemStore hmc, long ts)
ROW_COUNT
rows and QUALIFIER_COUNT
hmc
- Instance to add rows to.private long runSnapshot(org.apache.hadoop.hbase.regionserver.AbstractMemStore hmc) throws org.apache.hadoop.hbase.exceptions.UnexpectedStateException
org.apache.hadoop.hbase.exceptions.UnexpectedStateException
private 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
IOException
public static void main(String[] args) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.