public class TestThriftHBaseServiceHandler extends Object
Modifier and Type | Class and Description |
---|---|
static class |
TestThriftHBaseServiceHandler.DelayingRegionObserver |
Modifier and Type | Field and Description |
---|---|
static HBaseClassTestRule |
CLASS_RULE |
private static org.apache.hadoop.hbase.HColumnDescriptor[] |
families |
private static byte[] |
familyAname |
private static byte[] |
familyBname |
private static org.slf4j.Logger |
LOG |
private static MetricsAssertHelper |
metricsHelper |
org.junit.rules.TestName |
name |
private static byte[] |
qualifierAname |
private static byte[] |
qualifierBname |
private static byte[] |
tableAname |
private static HBaseTestingUtility |
UTIL |
private static byte[] |
valueAname |
private static byte[] |
valueBname |
Constructor and Description |
---|
TestThriftHBaseServiceHandler() |
Modifier and Type | Method and Description |
---|---|
static void |
afterClass() |
void |
assertTColumnValueEqual(org.apache.hadoop.hbase.thrift2.generated.TColumnValue a,
org.apache.hadoop.hbase.thrift2.generated.TColumnValue b) |
void |
assertTColumnValuesEqual(List<org.apache.hadoop.hbase.thrift2.generated.TColumnValue> columnValuesA,
List<org.apache.hadoop.hbase.thrift2.generated.TColumnValue> columnValuesB) |
static void |
beforeClass() |
private org.apache.hadoop.hbase.thrift2.ThriftHBaseServiceHandler |
createHandler() |
private static org.apache.hadoop.hbase.thrift.ThriftMetrics |
getMetrics(org.apache.hadoop.conf.Configuration conf) |
private String |
pad(int n,
byte pad)
Padding numbers to make comparison of sort order easier in a for loop
|
void |
setup() |
void |
testAppend() |
void |
testAttribute() |
void |
testCheckAndDelete()
check that checkAndDelete fails if the cell does not exist, then put in the cell, then
check that the checkAndDelete succeeds.
|
void |
testCheckAndMutate() |
void |
testCheckAndPut()
check that checkAndPut fails if the cell does not exist, then put in the cell, then check
that the checkAndPut succeeds.
|
void |
testDelete() |
void |
testDeleteAllTimestamps() |
void |
testDeleteFamily() |
void |
testDeleteFamilyVersion() |
void |
testDeleteMultiple() |
void |
testDeleteSingleTimestamp() |
void |
testDurability()
Create TPut, TDelete , TIncrement objects, set durability then call ThriftUtility
functions to get Put , Delete and Increment respectively.
|
private void |
testExceptionType(org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface handler,
org.apache.hadoop.hbase.thrift.ThriftMetrics metrics,
ByteBuffer tTableName,
byte[] rowkey,
ErrorThrowingGetObserver.ErrorType errorType) |
void |
testExists() |
void |
testExistsAll() |
void |
testFilterRegistration() |
void |
testGetScannerResults() |
void |
testIncrement() |
void |
testLongLivedScan()
Tests keeping a HBase scanner alive for long periods of time.
|
void |
testMetrics() |
void |
testMetricsPrecision()
See HBASE-17611
Latency metrics were capped at ~ 2 seconds due to the use of an int variable to capture the
duration.
|
void |
testMetricsWithException() |
void |
testMutateRow()
Put valueA to a row, make sure put has happened, then create a mutation object to put valueB
and delete ValueA, then check that the row value is only valueB.
|
void |
testPutGet() |
void |
testPutGetMultiple() |
void |
testPutTTL() |
void |
testReverseScan() |
void |
testScan() |
void |
testScanWithBatchSize() |
void |
testScanWithColumnFamilyTimeRange() |
void |
testScanWithFilter() |
void |
testSmallScan() |
public static final HBaseClassTestRule CLASS_RULE
private static final org.slf4j.Logger LOG
private static final HBaseTestingUtility UTIL
private static byte[] tableAname
private static byte[] familyAname
private static byte[] familyBname
private static byte[] qualifierAname
private static byte[] qualifierBname
private static byte[] valueAname
private static byte[] valueBname
private static org.apache.hadoop.hbase.HColumnDescriptor[] families
private static final MetricsAssertHelper metricsHelper
public org.junit.rules.TestName name
public TestThriftHBaseServiceHandler()
public void assertTColumnValuesEqual(List<org.apache.hadoop.hbase.thrift2.generated.TColumnValue> columnValuesA, List<org.apache.hadoop.hbase.thrift2.generated.TColumnValue> columnValuesB)
public void assertTColumnValueEqual(org.apache.hadoop.hbase.thrift2.generated.TColumnValue a, org.apache.hadoop.hbase.thrift2.generated.TColumnValue b)
public static void beforeClass() throws Exception
Exception
public static void afterClass() throws Exception
Exception
private org.apache.hadoop.hbase.thrift2.ThriftHBaseServiceHandler createHandler() throws org.apache.thrift.TException
org.apache.thrift.TException
public void testExists() throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
public void testExistsAll() throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift2.generated.TIOError
org.apache.thrift.TException
public void testPutGet() throws Exception
Exception
public void testPutGetMultiple() throws Exception
Exception
public void testDeleteMultiple() throws Exception
Exception
public void testDelete() throws Exception
Exception
public void testDeleteAllTimestamps() throws Exception
Exception
public void testDeleteSingleTimestamp() throws Exception
Exception
public void testDeleteFamily() throws Exception
Exception
public void testDeleteFamilyVersion() throws Exception
Exception
public void testIncrement() throws Exception
Exception
public void testAppend() throws Exception
Exception
public void testCheckAndPut() throws Exception
Exception
public void testCheckAndDelete() throws Exception
Exception
public void testLongLivedScan() throws Exception
Exception
public void testReverseScan() throws Exception
Exception
public void testScanWithFilter() throws Exception
Exception
public void testScanWithColumnFamilyTimeRange() throws Exception
Exception
public void testSmallScan() throws Exception
Exception
public void testPutTTL() throws Exception
Exception
private String pad(int n, byte pad)
n
- The number to pad.pad
- The length to pad up to.public void testScanWithBatchSize() throws Exception
Exception
public void testGetScannerResults() throws Exception
Exception
public void testFilterRegistration() throws Exception
Exception
public void testMetrics() throws Exception
Exception
private static org.apache.hadoop.hbase.thrift.ThriftMetrics getMetrics(org.apache.hadoop.conf.Configuration conf) throws Exception
Exception
public void testMetricsWithException() throws Exception
Exception
private void testExceptionType(org.apache.hadoop.hbase.thrift2.generated.THBaseService.Iface handler, org.apache.hadoop.hbase.thrift.ThriftMetrics metrics, ByteBuffer tTableName, byte[] rowkey, ErrorThrowingGetObserver.ErrorType errorType)
public void testMetricsPrecision() throws Exception
Exception
public void testAttribute() throws Exception
Exception
public void testMutateRow() throws Exception
Exception
public void testDurability() throws Exception
Exception
public void testCheckAndMutate() throws Exception
Exception
Copyright © 2007–2019 The Apache Software Foundation. All rights reserved.