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
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void testTimestampsFilter() throws Exception
Exception
public void testMultiColumns() throws Exception
Exception
public void testWithVersionDeletes() throws Exception
Exception
private void testWithVersionDeletes(boolean flushTables) throws IOException
IOException
private void verifyInsertedValues(org.apache.hadoop.hbase.client.Table ht, byte[] cf) throws IOException
IOException
private 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
IOException
private 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
IOException
private void putNVersions(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx, long versionStart, long versionEnd) throws IOException
IOException
private void deleteOneVersion(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx, long version) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.