public class TestMultipleTimestamps 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 |
private static org.slf4j.Logger |
LOG |
org.junit.rules.TestName |
name |
private static HBaseTestingUtility |
TEST_UTIL |
| Constructor and Description |
|---|
TestMultipleTimestamps() |
| 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 |
deleteAllVersionsBefore(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
int rowIdx,
int colIdx,
long version)
For row/column specified by rowIdx/colIdx, delete all cells
preceeding the specified version.
|
private void |
deleteColumn(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
int rowIdx,
int colIdx) |
private void |
deleteFamily(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
int rowIdx) |
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 |
put(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
Integer[] rowIndexes,
Integer[] columnIndexes,
Long[] versions) |
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.ResultScanner |
scan(org.apache.hadoop.hbase.client.Table ht,
byte[] cf,
Integer[] rowIndexes,
Integer[] columnIndexes,
Long[] versions,
int maxVersions) |
void |
setUp() |
static void |
setUpBeforeClass() |
void |
tearDown() |
static void |
tearDownAfterClass() |
void |
testReseeksWithMultipleColumnMultipleTimestamp() |
void |
testReseeksWithMultipleColumnOneTimestamp() |
void |
testReseeksWithMultipleFiles() |
void |
testReseeksWithOneColumnMiltipleTimestamp() |
void |
testWithColumnDeletes() |
void |
testWithFamilyDeletes() |
void |
testWithMultipleVersionDeletes() |
void |
testWithVersionDeletes() |
void |
testWithVersionDeletes(boolean flushTables) |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility TEST_UTIL
public org.junit.rules.TestName name
public TestMultipleTimestamps()
public static void setUpBeforeClass() throws Exception
Exceptionpublic static void tearDownAfterClass() throws Exception
Exceptionpublic void testReseeksWithOneColumnMiltipleTimestamp() throws IOException
IOExceptionpublic void testReseeksWithMultipleColumnOneTimestamp() throws IOException
IOExceptionpublic void testReseeksWithMultipleColumnMultipleTimestamp() throws IOException
IOExceptionpublic void testReseeksWithMultipleFiles() throws IOException
IOExceptionpublic void testWithVersionDeletes() throws Exception
Exceptionpublic void testWithVersionDeletes(boolean flushTables) throws IOException
IOExceptionpublic void testWithMultipleVersionDeletes() throws IOException
IOExceptionpublic void testWithColumnDeletes() throws IOException
IOExceptionpublic void testWithFamilyDeletes() 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.ResultScanner scan(org.apache.hadoop.hbase.client.Table ht, byte[] cf, Integer[] rowIndexes, Integer[] columnIndexes, Long[] versions, int maxVersions) throws IOException
IOExceptionprivate void put(org.apache.hadoop.hbase.client.Table ht, byte[] cf, Integer[] rowIndexes, Integer[] columnIndexes, 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
IOExceptionprivate void deleteAllVersionsBefore(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx, long version) throws IOException
IOExceptionprivate void deleteColumn(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx) throws IOException
IOExceptionprivate void deleteFamily(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx) throws IOException
IOExceptionCopyright © 2007–2021 The Apache Software Foundation. All rights reserved.