class FromClientSideBase extends Object
Modifier and Type | Field and Description |
---|---|
(package private) static byte[] |
FAMILY |
(package private) static byte[] |
INVALID_FAMILY |
private static org.slf4j.Logger |
LOG |
(package private) static byte[] |
QUALIFIER |
(package private) static byte[] |
ROW |
(package private) static int |
SLAVES |
(package private) static HBaseTestingUtility |
TEST_UTIL |
(package private) static byte[] |
VALUE |
Constructor and Description |
---|
FromClientSideBase() |
Modifier and Type | Method and Description |
---|---|
protected static void |
afterClass() |
private boolean |
allRegionsHaveHostnames(List<org.apache.hadoop.hbase.HRegionLocation> regions) |
protected void |
assertDoubleResult(org.apache.hadoop.hbase.client.Result result,
byte[] row,
byte[] familyA,
byte[] qualifierA,
byte[] valueA,
byte[] familyB,
byte[] qualifierB,
byte[] valueB)
Validate that result contains two specified keys, exactly.
|
protected void |
assertEmptyResult(org.apache.hadoop.hbase.client.Result result) |
protected static void |
assertIncrementKey(org.apache.hadoop.hbase.Cell key,
byte[] row,
byte[] family,
byte[] qualifier,
long value) |
protected void |
assertKey(org.apache.hadoop.hbase.Cell key,
byte[] row,
byte[] family,
byte[] qualifier,
byte[] value) |
protected void |
assertNResult(org.apache.hadoop.hbase.client.Result result,
byte[] row,
byte[][] families,
byte[][] qualifiers,
byte[][] values,
int[][] idxs) |
protected void |
assertNResult(org.apache.hadoop.hbase.client.Result result,
byte[] row,
byte[] family,
byte[] qualifier,
long[] stamps,
byte[][] values,
int start,
int end) |
protected void |
assertNullResult(org.apache.hadoop.hbase.client.Result result) |
protected void |
assertNumKeys(org.apache.hadoop.hbase.client.Result result,
int n) |
protected void |
assertRowCount(org.apache.hadoop.hbase.client.Table t,
int expected) |
protected void |
assertSingleResult(org.apache.hadoop.hbase.client.Result result,
byte[] row,
byte[] family,
byte[] qualifier,
byte[] value) |
protected void |
assertSingleResult(org.apache.hadoop.hbase.client.Result result,
byte[] row,
byte[] family,
byte[] qualifier,
long value) |
protected void |
assertSingleResult(org.apache.hadoop.hbase.client.Result result,
byte[] row,
byte[] family,
byte[] qualifier,
long ts,
byte[] value) |
protected org.apache.hadoop.hbase.client.ResultScanner |
buildScanner(String keyPrefix,
String value,
org.apache.hadoop.hbase.client.Table ht) |
protected org.apache.hadoop.hbase.client.Scan |
createScanWithRowFilter(byte[] key) |
protected org.apache.hadoop.hbase.client.Scan |
createScanWithRowFilter(byte[] key,
byte[] startRow,
org.apache.hadoop.hbase.CompareOperator op) |
protected void |
deleteColumns(org.apache.hadoop.hbase.client.Table ht,
String value,
String keyPrefix) |
protected static boolean |
equals(byte[] left,
byte[] right) |
protected void |
getAllVersionsAndVerify(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long[] stamps,
byte[][] values,
int start,
int end) |
protected int |
getNumberOfRows(String keyPrefix,
String value,
org.apache.hadoop.hbase.client.Table ht) |
protected org.apache.hadoop.hbase.client.Result |
getSingleScanResult(org.apache.hadoop.hbase.client.Table ht,
org.apache.hadoop.hbase.client.Scan scan) |
protected void |
getTestNull(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] value) |
protected void |
getTestNull(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
long value) |
protected void |
getVerifySingleColumn(org.apache.hadoop.hbase.client.Table ht,
byte[][] ROWS,
int ROWIDX,
byte[][] FAMILIES,
int FAMILYIDX,
byte[][] QUALIFIERS,
int QUALIFIERIDX,
byte[][] VALUES,
int VALUEIDX)
Verify a single column using gets.
|
protected void |
getVerifySingleEmpty(org.apache.hadoop.hbase.client.Table ht,
byte[][] ROWS,
int ROWIDX,
byte[][] FAMILIES,
int FAMILYIDX,
byte[][] QUALIFIERS,
int QUALIFIERIDX)
Verify we do not read any values by accident around a single column Same requirements as
getVerifySingleColumn
|
protected void |
getVersionAndVerify(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long stamp,
byte[] value) |
protected void |
getVersionAndVerifyMissing(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long stamp) |
protected void |
getVersionRangeAndVerify(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long[] stamps,
byte[][] values,
int start,
int end) |
protected void |
getVersionRangeAndVerifyGreaterThan(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long[] stamps,
byte[][] values,
int start,
int end) |
protected static void |
initialize(Class<?> registryImpl,
int numHedgedReqs,
Class<?>... cps) |
protected static boolean |
isSameParameterizedCluster(Class<?> registryImpl,
int numHedgedReqs)
JUnit does not provide an easy way to run a hook after each parameterized run.
|
protected byte[][] |
makeN(byte[] base,
int n) |
protected byte[][] |
makeNAscii(byte[] base,
int n) |
protected byte[][] |
makeNBig(byte[] base,
int n) |
protected long[] |
makeStamps(int n) |
protected void |
putRows(org.apache.hadoop.hbase.client.Table ht,
int numRows,
String value,
String key) |
protected void |
scanAllVersionsAndVerify(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long[] stamps,
byte[][] values,
int start,
int end) |
protected void |
scanTestNull(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] value) |
protected void |
scanTestNull(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] value,
boolean isReversedScan) |
protected void |
scanVerifySingleColumn(org.apache.hadoop.hbase.client.Table ht,
byte[][] ROWS,
int ROWIDX,
byte[][] FAMILIES,
int FAMILYIDX,
byte[][] QUALIFIERS,
int QUALIFIERIDX,
byte[][] VALUES,
int VALUEIDX)
Verify a single column using scanners.
|
protected void |
scanVerifySingleEmpty(org.apache.hadoop.hbase.client.Table ht,
byte[][] ROWS,
int ROWIDX,
byte[][] FAMILIES,
int FAMILYIDX,
byte[][] QUALIFIERS,
int QUALIFIERIDX) |
protected void |
scanVersionAndVerify(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long stamp,
byte[] value) |
protected void |
scanVersionAndVerifyMissing(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long stamp) |
protected void |
scanVersionRangeAndVerify(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long[] stamps,
byte[][] values,
int start,
int end) |
protected void |
scanVersionRangeAndVerifyGreaterThan(org.apache.hadoop.hbase.client.Table ht,
byte[] row,
byte[] family,
byte[] qualifier,
long[] stamps,
byte[][] values,
int start,
int end) |
protected void |
singleRowGetTest(org.apache.hadoop.hbase.client.Table ht,
byte[][] ROWS,
byte[][] FAMILIES,
byte[][] QUALIFIERS,
byte[][] VALUES) |
protected void |
singleRowScanTest(org.apache.hadoop.hbase.client.Table ht,
byte[][] ROWS,
byte[][] FAMILIES,
byte[][] QUALIFIERS,
byte[][] VALUES) |
protected List<org.apache.hadoop.hbase.HRegionLocation> |
splitTable(org.apache.hadoop.hbase.client.Table t)
Split table into multiple regions.
|
private List<org.apache.hadoop.hbase.HRegionLocation> |
waitOnSplit(org.apache.hadoop.hbase.client.Table t) |
private static final org.slf4j.Logger LOG
static HBaseTestingUtility TEST_UTIL
static byte[] ROW
static byte[] FAMILY
static final byte[] INVALID_FAMILY
static byte[] QUALIFIER
static byte[] VALUE
static int SLAVES
FromClientSideBase()
protected static boolean isSameParameterizedCluster(Class<?> registryImpl, int numHedgedReqs)
protected static final void initialize(Class<?> registryImpl, int numHedgedReqs, Class<?>... cps) throws Exception
Exception
protected static void afterClass() throws Exception
Exception
protected void deleteColumns(org.apache.hadoop.hbase.client.Table ht, String value, String keyPrefix) throws IOException
IOException
protected int getNumberOfRows(String keyPrefix, String value, org.apache.hadoop.hbase.client.Table ht) throws Exception
Exception
protected org.apache.hadoop.hbase.client.ResultScanner buildScanner(String keyPrefix, String value, org.apache.hadoop.hbase.client.Table ht) throws IOException
IOException
protected void putRows(org.apache.hadoop.hbase.client.Table ht, int numRows, String value, String key) throws IOException
IOException
protected void assertRowCount(org.apache.hadoop.hbase.client.Table t, int expected) throws IOException
IOException
protected org.apache.hadoop.hbase.client.Scan createScanWithRowFilter(byte[] key)
protected org.apache.hadoop.hbase.client.Scan createScanWithRowFilter(byte[] key, byte[] startRow, org.apache.hadoop.hbase.CompareOperator op)
protected List<org.apache.hadoop.hbase.HRegionLocation> splitTable(org.apache.hadoop.hbase.client.Table t) throws IOException
t
- Table to split.IOException
private List<org.apache.hadoop.hbase.HRegionLocation> waitOnSplit(org.apache.hadoop.hbase.client.Table t) throws IOException
IOException
private boolean allRegionsHaveHostnames(List<org.apache.hadoop.hbase.HRegionLocation> regions)
protected org.apache.hadoop.hbase.client.Result getSingleScanResult(org.apache.hadoop.hbase.client.Table ht, org.apache.hadoop.hbase.client.Scan scan) throws IOException
IOException
protected byte[][] makeNAscii(byte[] base, int n)
protected byte[][] makeN(byte[] base, int n)
protected byte[][] makeNBig(byte[] base, int n)
protected long[] makeStamps(int n)
protected static boolean equals(byte[] left, byte[] right)
protected void assertKey(org.apache.hadoop.hbase.Cell key, byte[] row, byte[] family, byte[] qualifier, byte[] value)
protected static void assertIncrementKey(org.apache.hadoop.hbase.Cell key, byte[] row, byte[] family, byte[] qualifier, long value)
protected void assertNumKeys(org.apache.hadoop.hbase.client.Result result, int n) throws Exception
Exception
protected void assertNResult(org.apache.hadoop.hbase.client.Result result, byte[] row, byte[][] families, byte[][] qualifiers, byte[][] values, int[][] idxs)
protected void assertNResult(org.apache.hadoop.hbase.client.Result result, byte[] row, byte[] family, byte[] qualifier, long[] stamps, byte[][] values, int start, int end)
protected void assertDoubleResult(org.apache.hadoop.hbase.client.Result result, byte[] row, byte[] familyA, byte[] qualifierA, byte[] valueA, byte[] familyB, byte[] qualifierB, byte[] valueB)
protected void assertSingleResult(org.apache.hadoop.hbase.client.Result result, byte[] row, byte[] family, byte[] qualifier, byte[] value)
protected void assertSingleResult(org.apache.hadoop.hbase.client.Result result, byte[] row, byte[] family, byte[] qualifier, long value)
protected void assertSingleResult(org.apache.hadoop.hbase.client.Result result, byte[] row, byte[] family, byte[] qualifier, long ts, byte[] value)
protected void assertEmptyResult(org.apache.hadoop.hbase.client.Result result) throws Exception
Exception
protected void assertNullResult(org.apache.hadoop.hbase.client.Result result) throws Exception
Exception
protected void getVersionRangeAndVerifyGreaterThan(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long[] stamps, byte[][] values, int start, int end) throws IOException
IOException
protected void getVersionRangeAndVerify(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long[] stamps, byte[][] values, int start, int end) throws IOException
IOException
protected void getAllVersionsAndVerify(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long[] stamps, byte[][] values, int start, int end) throws IOException
IOException
protected void scanVersionRangeAndVerifyGreaterThan(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long[] stamps, byte[][] values, int start, int end) throws IOException
IOException
protected void scanVersionRangeAndVerify(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long[] stamps, byte[][] values, int start, int end) throws IOException
IOException
protected void scanAllVersionsAndVerify(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long[] stamps, byte[][] values, int start, int end) throws IOException
IOException
protected void getVersionAndVerify(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long stamp, byte[] value) throws Exception
Exception
protected void getVersionAndVerifyMissing(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long stamp) throws Exception
Exception
protected void scanVersionAndVerify(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long stamp, byte[] value) throws Exception
Exception
protected void scanVersionAndVerifyMissing(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] qualifier, long stamp) throws Exception
Exception
protected void getTestNull(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] value) throws Exception
Exception
protected void getTestNull(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, long value) throws Exception
Exception
protected void scanTestNull(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] value) throws Exception
Exception
protected void scanTestNull(org.apache.hadoop.hbase.client.Table ht, byte[] row, byte[] family, byte[] value, boolean isReversedScan) throws Exception
Exception
protected void singleRowGetTest(org.apache.hadoop.hbase.client.Table ht, byte[][] ROWS, byte[][] FAMILIES, byte[][] QUALIFIERS, byte[][] VALUES) throws Exception
Exception
protected void singleRowScanTest(org.apache.hadoop.hbase.client.Table ht, byte[][] ROWS, byte[][] FAMILIES, byte[][] QUALIFIERS, byte[][] VALUES) throws Exception
Exception
protected void getVerifySingleColumn(org.apache.hadoop.hbase.client.Table ht, byte[][] ROWS, int ROWIDX, byte[][] FAMILIES, int FAMILYIDX, byte[][] QUALIFIERS, int QUALIFIERIDX, byte[][] VALUES, int VALUEIDX) throws Exception
Exception
protected void scanVerifySingleColumn(org.apache.hadoop.hbase.client.Table ht, byte[][] ROWS, int ROWIDX, byte[][] FAMILIES, int FAMILYIDX, byte[][] QUALIFIERS, int QUALIFIERIDX, byte[][] VALUES, int VALUEIDX) throws Exception
Exception
protected void getVerifySingleEmpty(org.apache.hadoop.hbase.client.Table ht, byte[][] ROWS, int ROWIDX, byte[][] FAMILIES, int FAMILYIDX, byte[][] QUALIFIERS, int QUALIFIERIDX) throws Exception
Exception
protected void scanVerifySingleEmpty(org.apache.hadoop.hbase.client.Table ht, byte[][] ROWS, int ROWIDX, byte[][] FAMILIES, int FAMILYIDX, byte[][] QUALIFIERS, int QUALIFIERIDX) throws Exception
Exception
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.