public class TestHStore extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestHStore.DummyStoreEngine |
(package private) static class |
TestHStore.FaultyFileSystem
Faulty file system that will fail if you write past its fault position the FIRST TIME
only; thereafter it will succeed.
|
(package private) static class |
TestHStore.FaultyOutputStream |
static class |
TestHStore.MyCompactingMemStore |
static class |
TestHStore.MyCompactingMemStoreWithCustomCompactor |
private static class |
TestHStore.MyList<T> |
(package private) static interface |
TestHStore.MyListHook |
private static class |
TestHStore.MyMemStoreCompactor |
private static class |
TestHStore.MyStore |
private static class |
TestHStore.MyStoreHook |
private static class |
TestHStore.MyThread |
Modifier and Type | Field and Description |
---|---|
private static int |
BLOCKSIZE_SMALL |
static HBaseClassTestRule |
CLASS_RULE |
private static String |
DIR |
(package private) List<org.apache.hadoop.hbase.Cell> |
expected |
(package private) byte[] |
family |
(package private) org.apache.hadoop.hbase.client.Get |
get |
(package private) long |
id |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
(package private) byte[] |
qf1 |
(package private) byte[] |
qf2 |
(package private) byte[] |
qf3 |
(package private) byte[] |
qf4 |
(package private) byte[] |
qf5 |
(package private) byte[] |
qf6 |
(package private) NavigableSet<byte[]> |
qualifiers |
(package private) org.apache.hadoop.hbase.regionserver.HRegion |
region |
(package private) List<org.apache.hadoop.hbase.Cell> |
result |
(package private) byte[] |
row |
(package private) byte[] |
row2 |
(package private) org.apache.hadoop.hbase.regionserver.HStore |
store |
(package private) byte[] |
table |
private static HBaseTestingUtility |
TEST_UTIL |
Constructor and Description |
---|
TestHStore() |
Modifier and Type | Method and Description |
---|---|
private void |
addStoreFile() |
private void |
archiveStoreFile(int index) |
private void |
assertCheck() |
private void |
closeCompactedFile(int index) |
private long |
countMemStoreScanner(org.apache.hadoop.hbase.regionserver.StoreScanner scanner) |
private org.apache.hadoop.hbase.Cell |
createCell(byte[] row,
byte[] qualifier,
long ts,
long sequenceId,
byte[] value) |
private org.apache.hadoop.hbase.Cell |
createCell(byte[] qualifier,
long ts,
long sequenceId,
byte[] value) |
private void |
flush(int storeFilessize) |
private static void |
flushStore(org.apache.hadoop.hbase.regionserver.HStore store,
long id) |
(package private) List<org.apache.hadoop.hbase.Cell> |
getKeyValueSet(long[] timestamps,
int numRows,
byte[] qualifier,
byte[] family)
Generate a list of KeyValues for testing based on given parameters
|
private static long |
getLowestTimeStampFromFS(org.apache.hadoop.fs.FileSystem fs,
Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> candidates) |
private void |
init(String methodName) |
private org.apache.hadoop.hbase.regionserver.HStore |
init(String methodName,
org.apache.hadoop.conf.Configuration conf) |
private org.apache.hadoop.hbase.regionserver.HStore |
init(String methodName,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd) |
private org.apache.hadoop.hbase.regionserver.HStore |
init(String methodName,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.client.TableDescriptorBuilder builder,
org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd) |
private org.apache.hadoop.hbase.regionserver.HStore |
init(String methodName,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.client.TableDescriptorBuilder builder,
org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd,
TestHStore.MyStoreHook hook) |
private org.apache.hadoop.hbase.regionserver.HStore |
init(String methodName,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.client.TableDescriptorBuilder builder,
org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd,
TestHStore.MyStoreHook hook,
boolean switchToPread) |
private void |
initHRegion(String methodName,
org.apache.hadoop.conf.Configuration conf,
org.apache.hadoop.hbase.client.TableDescriptorBuilder builder,
org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd,
TestHStore.MyStoreHook hook,
boolean switchToPread) |
private TestHStore.MyStore |
initMyStore(String methodName,
org.apache.hadoop.conf.Configuration conf,
TestHStore.MyStoreHook hook) |
private org.apache.hadoop.hbase.regionserver.HStoreFile |
mockStoreFile(long createdTime) |
private org.apache.hadoop.hbase.regionserver.HStoreFile |
mockStoreFileWithLength(long length) |
void |
setUp()
Setup
|
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testAge() |
void |
testCreateScannerAndSnapshotConcurrently() |
void |
testCreateWriter()
Verify that compression and data block encoding are respected by the
Store.createWriterInTmp() method, used on store flush.
|
void |
testDeleteExpiredStoreFiles() |
void |
testDeleteExpiredStoreFiles(int minVersions) |
void |
testEmptyStoreFile()
Test for hbase-1686.
|
private void |
testFlushBeforeCompletingScan(TestHStore.MyListHook hook,
org.apache.hadoop.hbase.filter.Filter filter,
int expectedSize) |
void |
testFlushBeforeCompletingScanWithFilter() |
void |
testFlushBeforeCompletingScanWithFilterHint() |
void |
testFlushBeforeCompletingScanWoFilter() |
void |
testFlushSizeSizing()
Test we do not lose data if we fail a flush and then close.
|
void |
testGet_FromFilesOnly()
Getting data from files only
|
void |
testGet_FromMemStoreAndFiles()
Getting data from memstore and files
|
void |
testGet_FromMemStoreOnly()
Getting data from memstore only
|
void |
testHandleErrorsInFlush() |
void |
testHFileContextSetWithCFAndTable() |
void |
testInMemoryCompactionTypeWithLowerCase() |
void |
testLowestModificationTime() |
void |
testMultipleTimestamps()
Test to ensure correctness when using Stores with multiple timestamps
|
void |
testNumberOfMemStoreScannersAfterFlush() |
private void |
testNumberOfMemStoreScannersAfterFlush(List<org.apache.hadoop.hbase.Cell> inputCellsBeforeSnapshot,
List<org.apache.hadoop.hbase.Cell> inputCellsAfterSnapshot) |
void |
testReclaimChunkWhenScaning() |
void |
testRefreshStoreFiles() |
void |
testRefreshStoreFilesNotChanged() |
void |
testRunDoubleMemStoreCompactors()
If there are two running InMemoryFlushRunnable, the later InMemoryFlushRunnable
may change the versionedList.
|
void |
testScanWithDoubleFlush() |
void |
testSpaceQuotaChangeAfterReplacement() |
void |
testSplitWithEmptyColFam()
Test for HBASE-3492 - Test split on empty colfam (no store files).
|
void |
testStoreUsesConfigurationFromHcdAndHtd() |
void |
testStoreUsesSearchEngineOverride() |
void |
testSwitchingPreadtoStreamParallelyWithCompactionDischarger() |
void |
testTimeRangeIfSomeCellsAreDroppedInFlush() |
private void |
testTimeRangeIfSomeCellsAreDroppedInFlush(int maxVersion) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
public org.junit.rules.TestName name
org.apache.hadoop.hbase.regionserver.HRegion region
org.apache.hadoop.hbase.regionserver.HStore store
byte[] table
byte[] family
byte[] row
byte[] row2
byte[] qf1
byte[] qf2
byte[] qf3
byte[] qf4
byte[] qf5
byte[] qf6
NavigableSet<byte[]> qualifiers
long id
org.apache.hadoop.hbase.client.Get get
private static final HBaseTestingUtility TEST_UTIL
private static final int BLOCKSIZE_SMALL
public TestHStore()
public void setUp() throws IOException
IOException
private void init(String methodName) throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HStore init(String methodName, org.apache.hadoop.conf.Configuration conf) throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HStore init(String methodName, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd) throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HStore init(String methodName, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptorBuilder builder, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd) throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HStore init(String methodName, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptorBuilder builder, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd, TestHStore.MyStoreHook hook) throws IOException
IOException
private void initHRegion(String methodName, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptorBuilder builder, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd, TestHStore.MyStoreHook hook, boolean switchToPread) throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HStore init(String methodName, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.TableDescriptorBuilder builder, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd, TestHStore.MyStoreHook hook, boolean switchToPread) throws IOException
IOException
public void testFlushSizeSizing() throws Exception
Exception
public void testCreateWriter() throws Exception
Exception
public void testDeleteExpiredStoreFiles() throws Exception
Exception
public void testDeleteExpiredStoreFiles(int minVersions) throws Exception
Exception
public void testLowestModificationTime() throws Exception
Exception
private static long getLowestTimeStampFromFS(org.apache.hadoop.fs.FileSystem fs, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> candidates) throws IOException
IOException
public void testEmptyStoreFile() throws IOException
IOException
public void testGet_FromMemStoreOnly() throws IOException
IOException
public void testTimeRangeIfSomeCellsAreDroppedInFlush() throws IOException
IOException
private void testTimeRangeIfSomeCellsAreDroppedInFlush(int maxVersion) throws IOException
IOException
public void testGet_FromFilesOnly() throws IOException
IOException
public void testGet_FromMemStoreAndFiles() throws IOException
IOException
private void flush(int storeFilessize) throws IOException
IOException
private void assertCheck()
public static void tearDownAfterClass() throws IOException
IOException
public void testHandleErrorsInFlush() throws Exception
Exception
private static void flushStore(org.apache.hadoop.hbase.regionserver.HStore store, long id) throws IOException
IOException
List<org.apache.hadoop.hbase.Cell> getKeyValueSet(long[] timestamps, int numRows, byte[] qualifier, byte[] family)
timestamps
- numRows
- qualifier
- family
- public void testMultipleTimestamps() throws IOException
IOException
public void testSplitWithEmptyColFam() throws IOException
IOException
- When the IO operations fail.public void testStoreUsesConfigurationFromHcdAndHtd() throws Exception
Exception
public void testStoreUsesSearchEngineOverride() throws Exception
Exception
private void addStoreFile() throws IOException
IOException
private void archiveStoreFile(int index) throws IOException
IOException
private void closeCompactedFile(int index) throws IOException
IOException
public void testRefreshStoreFiles() throws Exception
Exception
public void testRefreshStoreFilesNotChanged() throws IOException
IOException
private long countMemStoreScanner(org.apache.hadoop.hbase.regionserver.StoreScanner scanner)
public void testNumberOfMemStoreScannersAfterFlush() throws IOException
IOException
private void testNumberOfMemStoreScannersAfterFlush(List<org.apache.hadoop.hbase.Cell> inputCellsBeforeSnapshot, List<org.apache.hadoop.hbase.Cell> inputCellsAfterSnapshot) throws IOException
IOException
private org.apache.hadoop.hbase.Cell createCell(byte[] qualifier, long ts, long sequenceId, byte[] value) throws IOException
IOException
private org.apache.hadoop.hbase.Cell createCell(byte[] row, byte[] qualifier, long ts, long sequenceId, byte[] value) throws IOException
IOException
public void testFlushBeforeCompletingScanWoFilter() throws IOException, InterruptedException
IOException
InterruptedException
public void testFlushBeforeCompletingScanWithFilter() throws IOException, InterruptedException
IOException
InterruptedException
public void testFlushBeforeCompletingScanWithFilterHint() throws IOException, InterruptedException
IOException
InterruptedException
private void testFlushBeforeCompletingScan(TestHStore.MyListHook hook, org.apache.hadoop.hbase.filter.Filter filter, int expectedSize) throws IOException, InterruptedException
IOException
InterruptedException
public void testCreateScannerAndSnapshotConcurrently() throws IOException, InterruptedException
IOException
InterruptedException
public void testScanWithDoubleFlush() throws IOException
IOException
public void testReclaimChunkWhenScaning() throws IOException
IOException
public void testRunDoubleMemStoreCompactors() throws IOException, InterruptedException
IOException
InterruptedException
public void testAge() throws IOException
IOException
private org.apache.hadoop.hbase.regionserver.HStoreFile mockStoreFile(long createdTime)
private TestHStore.MyStore initMyStore(String methodName, org.apache.hadoop.conf.Configuration conf, TestHStore.MyStoreHook hook) throws IOException
IOException
public void testSwitchingPreadtoStreamParallelyWithCompactionDischarger() throws Exception
Exception
public void testInMemoryCompactionTypeWithLowerCase() throws IOException, InterruptedException
IOException
InterruptedException
public void testSpaceQuotaChangeAfterReplacement() throws IOException
IOException
public void testHFileContextSetWithCFAndTable() throws Exception
Exception
private org.apache.hadoop.hbase.regionserver.HStoreFile mockStoreFileWithLength(long length)
Copyright © 2007–2021 The Apache Software Foundation. All rights reserved.