public class TestTimestampsFilter extends Object
TimestampsFilter using HBase client APIs. Sets up the HBase mini
cluster once at start. Each creates a table named for the method and does its stuff against that.| Modifier and Type | Field and Description |
|---|---|
static HBaseClassTestRule |
CLASS_RULE |
org.junit.rules.TestName |
name |
private static HBaseTestingUtility |
TEST_UTIL |
| Constructor and Description |
|---|
TestTimestampsFilter() |
| Modifier and Type | Method and Description |
|---|---|
private void |
checkOneCell(org.apache.hadoop.hbase.Cell kv,
byte[] cf,
int rowIdx,
int colIdx,
long ts)
Assert that the passed in KeyValue has expected contents for the specified row, column &
timestamp.
|
private void |
deleteOneVersion(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
int rowIdx,
int colIdx,
long version)
For row/column specified by rowIdx/colIdx, delete the cell corresponding to the specified
version.
|
private org.apache.hadoop.hbase.Cell[] |
getNVersions(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
int rowIdx,
int colIdx,
List<Long> versions)
Uses the TimestampFilter on a Get to request a specified list of versions for the row/column
specified by rowIdx & colIdx.
|
private void |
putNVersions(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
int rowIdx,
int colIdx,
long versionStart,
long versionEnd)
Insert in specific row/column versions with timestamps versionStart..versionEnd.
|
private org.apache.hadoop.hbase.client.Result[] |
scanNVersions(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
int startRowIdx,
int endRowIdx,
List<Long> versions)
Uses the TimestampFilter on a Scan to request a specified list of versions for the rows from
startRowIdx to endRowIdx (both inclusive).
|
void |
setUp() |
static void |
setUpBeforeClass() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testMultiColumns() |
void |
testTimestampsFilter()
Test from client side for TimestampsFilter.
|
void |
testWithVersionDeletes()
Test TimestampsFilter in the presence of version deletes.
|
private void |
testWithVersionDeletes(boolean flushTables) |
private void |
verifyInsertedValues(org.apache.hadoop.hbase.client.Table ht,
byte[] cf) |
public static final HBaseClassTestRule CLASS_RULE
private static final HBaseTestingUtility TEST_UTIL
public org.junit.rules.TestName name
public TestTimestampsFilter()
public static void setUpBeforeClass() throws Exception
Exceptionpublic static void tearDownAfterClass() throws Exception
Exceptionpublic void testTimestampsFilter() throws Exception
Exceptionpublic void testMultiColumns() throws Exception
Exceptionpublic void testWithVersionDeletes() throws Exception
Exceptionprivate void testWithVersionDeletes(boolean flushTables) throws IOException
IOExceptionprivate void verifyInsertedValues(org.apache.hadoop.hbase.client.Table ht, byte[] cf) throws IOException
IOExceptionprivate void checkOneCell(org.apache.hadoop.hbase.Cell kv, byte[] cf, int rowIdx, int colIdx, long ts)
private org.apache.hadoop.hbase.Cell[] getNVersions(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx, List<Long> versions) throws IOException
IOExceptionprivate org.apache.hadoop.hbase.client.Result[] scanNVersions(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int startRowIdx, int endRowIdx, List<Long> versions) throws IOException
IOExceptionprivate void putNVersions(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx, long versionStart, long versionEnd) throws IOException
IOExceptionprivate void deleteOneVersion(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx, long version) throws IOException
IOExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.