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
Exception
public static void tearDownAfterClass() throws Exception
Exception
public void testReseeksWithOneColumnMiltipleTimestamp() throws IOException
IOException
public void testReseeksWithMultipleColumnOneTimestamp() throws IOException
IOException
public void testReseeksWithMultipleColumnMultipleTimestamp() throws IOException
IOException
public void testReseeksWithMultipleFiles() throws IOException
IOException
public void testWithVersionDeletes() throws Exception
Exception
public void testWithVersionDeletes(boolean flushTables) throws IOException
IOException
public void testWithMultipleVersionDeletes() throws IOException
IOException
public void testWithColumnDeletes() throws IOException
IOException
public void testWithFamilyDeletes() 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.ResultScanner scan(org.apache.hadoop.hbase.client.Table ht, byte[] cf, Integer[] rowIndexes, Integer[] columnIndexes, Long[] versions, int maxVersions) throws IOException
IOException
private void put(org.apache.hadoop.hbase.client.Table ht, byte[] cf, Integer[] rowIndexes, Integer[] columnIndexes, 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
private void deleteAllVersionsBefore(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx, long version) throws IOException
IOException
private void deleteColumn(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx, int colIdx) throws IOException
IOException
private void deleteFamily(org.apache.hadoop.hbase.client.Table ht, byte[] cf, int rowIdx) throws IOException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.