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 |
testConsistency() |
void |
testDDLOpertions() |
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 |
testGetTableDescriptor() |
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
Exceptionpublic static void afterClass() throws Exception
Exceptionprivate org.apache.hadoop.hbase.thrift2.ThriftHBaseServiceHandler createHandler() throws org.apache.thrift.TException
org.apache.thrift.TExceptionpublic void testExists() throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.apache.thrift.TExceptionpublic void testExistsAll() throws org.apache.hadoop.hbase.thrift2.generated.TIOError, org.apache.thrift.TException
org.apache.hadoop.hbase.thrift2.generated.TIOErrororg.apache.thrift.TExceptionpublic void testPutGet() throws Exception
Exceptionpublic void testPutGetMultiple() throws Exception
Exceptionpublic void testDeleteMultiple() throws Exception
Exceptionpublic void testDelete() throws Exception
Exceptionpublic void testDeleteAllTimestamps() throws Exception
Exceptionpublic void testDeleteSingleTimestamp() throws Exception
Exceptionpublic void testDeleteFamily() throws Exception
Exceptionpublic void testDeleteFamilyVersion() throws Exception
Exceptionpublic void testIncrement() throws Exception
Exceptionpublic void testAppend() throws Exception
Exceptionpublic void testCheckAndPut() throws Exception
Exceptionpublic void testCheckAndDelete() throws Exception
Exceptionpublic void testLongLivedScan() throws Exception
Exceptionpublic void testReverseScan() throws Exception
Exceptionpublic void testScanWithFilter() throws Exception
Exceptionpublic void testScanWithColumnFamilyTimeRange() throws Exception
Exceptionpublic void testSmallScan() throws Exception
Exceptionpublic void testPutTTL() throws Exception
Exceptionprivate String pad(int n, byte pad)
n - The number to pad.pad - The length to pad up to.public void testScanWithBatchSize() throws Exception
Exceptionpublic void testGetScannerResults() throws Exception
Exceptionpublic void testFilterRegistration() throws Exception
Exceptionpublic void testMetrics() throws Exception
Exceptionprivate static org.apache.hadoop.hbase.thrift.ThriftMetrics getMetrics(org.apache.hadoop.conf.Configuration conf) throws Exception
Exceptionpublic void testMetricsWithException() throws Exception
Exceptionprivate 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
Exceptionpublic void testAttribute() throws Exception
Exceptionpublic void testMutateRow() throws Exception
Exceptionpublic void testDurability() throws Exception
Exceptionpublic void testCheckAndMutate() throws Exception
Exceptionpublic void testConsistency() throws Exception
Exceptionpublic void testDDLOpertions() throws Exception
Exceptionpublic void testGetTableDescriptor() throws Exception
ExceptionCopyright © 2007–2020 The Apache Software Foundation. All rights reserved.