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 |
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
IOExceptionprivate void init(String methodName) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.regionserver.HStore init(String methodName, org.apache.hadoop.conf.Configuration conf) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.regionserver.HStore init(String methodName, org.apache.hadoop.conf.Configuration conf, org.apache.hadoop.hbase.client.ColumnFamilyDescriptor hcd) throws IOException
IOExceptionprivate 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
IOExceptionprivate 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
IOExceptionprivate 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
IOExceptionprivate 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
IOExceptionpublic void testFlushSizeSizing() throws Exception
Exceptionpublic void testCreateWriter() throws Exception
Exceptionpublic void testDeleteExpiredStoreFiles() throws Exception
Exceptionpublic void testDeleteExpiredStoreFiles(int minVersions) throws Exception
Exceptionpublic void testLowestModificationTime() throws Exception
Exceptionprivate static long getLowestTimeStampFromFS(org.apache.hadoop.fs.FileSystem fs, Collection<org.apache.hadoop.hbase.regionserver.HStoreFile> candidates) throws IOException
IOExceptionpublic void testEmptyStoreFile() throws IOException
IOExceptionpublic void testGet_FromMemStoreOnly() throws IOException
IOExceptionpublic void testTimeRangeIfSomeCellsAreDroppedInFlush() throws IOException
IOExceptionprivate void testTimeRangeIfSomeCellsAreDroppedInFlush(int maxVersion) throws IOException
IOExceptionpublic void testGet_FromFilesOnly() throws IOException
IOExceptionpublic void testGet_FromMemStoreAndFiles() throws IOException
IOExceptionprivate void flush(int storeFilessize) throws IOException
IOExceptionprivate void assertCheck()
public static void tearDownAfterClass() throws IOException
IOExceptionpublic void testHandleErrorsInFlush() throws Exception
Exceptionprivate static void flushStore(org.apache.hadoop.hbase.regionserver.HStore store, long id) throws IOException
IOExceptionList<org.apache.hadoop.hbase.Cell> getKeyValueSet(long[] timestamps, int numRows, byte[] qualifier, byte[] family)
timestamps - numRows - qualifier - family - public void testMultipleTimestamps() throws IOException
IOExceptionpublic void testSplitWithEmptyColFam() throws IOException
IOException - When the IO operations fail.public void testStoreUsesConfigurationFromHcdAndHtd() throws Exception
Exceptionpublic void testStoreUsesSearchEngineOverride() throws Exception
Exceptionprivate void addStoreFile() throws IOException
IOExceptionprivate void archiveStoreFile(int index) throws IOException
IOExceptionprivate void closeCompactedFile(int index) throws IOException
IOExceptionpublic void testRefreshStoreFiles() throws Exception
Exceptionpublic void testRefreshStoreFilesNotChanged() throws IOException
IOExceptionprivate long countMemStoreScanner(org.apache.hadoop.hbase.regionserver.StoreScanner scanner)
public void testNumberOfMemStoreScannersAfterFlush() throws IOException
IOExceptionprivate void testNumberOfMemStoreScannersAfterFlush(List<org.apache.hadoop.hbase.Cell> inputCellsBeforeSnapshot, List<org.apache.hadoop.hbase.Cell> inputCellsAfterSnapshot) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.Cell createCell(byte[] qualifier, long ts, long sequenceId, byte[] value) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.Cell createCell(byte[] row, byte[] qualifier, long ts, long sequenceId, byte[] value) throws IOException
IOExceptionpublic void testFlushBeforeCompletingScanWoFilter() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testFlushBeforeCompletingScanWithFilter() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testFlushBeforeCompletingScanWithFilterHint() throws IOException, InterruptedException
IOExceptionInterruptedExceptionprivate void testFlushBeforeCompletingScan(TestHStore.MyListHook hook, org.apache.hadoop.hbase.filter.Filter filter, int expectedSize) throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testCreateScannerAndSnapshotConcurrently() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testScanWithDoubleFlush() throws IOException
IOExceptionpublic void testReclaimChunkWhenScaning() throws IOException
IOExceptionpublic void testRunDoubleMemStoreCompactors() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testAge() throws IOException
IOExceptionprivate 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
IOExceptionpublic void testSwitchingPreadtoStreamParallelyWithCompactionDischarger() throws Exception
Exceptionpublic void testInMemoryCompactionTypeWithLowerCase() throws IOException, InterruptedException
IOExceptionInterruptedExceptionpublic void testSpaceQuotaChangeAfterReplacement() throws IOException
IOExceptionprivate org.apache.hadoop.hbase.regionserver.HStoreFile mockStoreFileWithLength(long length)
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.