public class TestPartialResultsFromClientSide
extends java.lang.Object
Results that contain only a portion of a row's complete list of cells. Partial results
are formed when the server breaches its maximum result size when trying to service a client's RPC
request. It is the responsibility of the scanner on the client side to recognize when partial
results have been returned and to take action to form the complete results.
Unless the flag Scan#setAllowPartialResults(boolean) has been set to true, the caller of
ResultScanner#next() should never see partial results.
| Constructor and Description |
|---|
TestPartialResultsFromClientSide() |
| Modifier and Type | Method and Description |
|---|---|
static void |
setUpBeforeClass() |
static void |
tearDownAfterClass() |
void |
testAllowPartialResults()
Ensure that we only see Results marked as partial when the allowPartial flag is set
|
void |
testBatchingResultWhenRegionMove() |
void |
testCompleteResultWhenRegionMove() |
void |
testEquivalenceOfScanResults()
Ensure that the results returned from a scanner that retrieves all results in a single RPC call
matches the results that are returned from a scanner that must incrementally combine partial
results into complete results.
|
void |
testEquivalenceOfScanResults(Table table,
Scan scan1,
Scan scan2) |
void |
testExceptionThrownOnMismatchedPartialResults()
When reconstructing the complete result from its partials we ensure that the row of each
partial result is the same.
|
void |
testExpectedNumberOfCellsPerPartialResult()
Setting the max result size allows us to control how many cells we expect to see on each call
to next on the scanner.
|
void |
testExpectedNumberOfCellsPerPartialResult(Scan baseScan) |
void |
testExpectedNumberOfCellsPerPartialResult(Scan baseScan,
int expectedNumberOfCells) |
void |
testExpectedValuesOfPartialResults()
Ensure that the expected key values appear in a result returned from a scanner that is
combining partial results into complete results
|
void |
testExpectedValuesOfPartialResults(boolean reversed) |
void |
testNoPartialResultsWhenRowFilterPresent()
When a scan has a filter where
org.apache.hadoop.hbase.filter.Filter#hasFilterRow() is
true, the scanner should not return partial results. |
void |
testOrderingOfCellsInPartialResults()
Order of cells in partial results matches the ordering of cells from complete results
|
void |
testOrderingOfCellsInPartialResults(Scan basePartialScan) |
void |
testPartialResultsAndBatch()
Test various combinations of batching and partial results for correctness
|
void |
testPartialResultsAndBatch(int batch,
int cellsPerPartialResult) |
void |
testPartialResultsAndCaching()
Examine the interaction between the maxResultSize and caching.
|
void |
testPartialResultsAndCaching(int resultSizeRowLimit,
int cachingRowLimit) |
void |
testPartialResultsReassembly()
Test the method
Result#createCompleteResult(List) |
void |
testPartialResultsReassembly(Scan scanBase) |
void |
testPartialResultsWithColumnFilter()
Test partial Result re-assembly in the presence of different filters.
|
void |
testPartialResultsWithColumnFilter(Filter filter) |
void |
testPartialResultWhenRegionMove() |
void |
testReadPointAndPartialResults() |
void |
testReversedCompleteResultWhenRegionMove() |
void |
testReversedPartialResultWhenRegionMove() |
void |
testSmallScansDoNotAllowPartials()
Small scans should not return partial results because it would prevent small scans from
retrieving all of the necessary results in a single RPC request which is what makese small
scans useful.
|
void |
testSmallScansDoNotAllowPartials(Scan baseScan) |
public static void setUpBeforeClass()
throws java.lang.Exception
java.lang.Exceptionpublic static void tearDownAfterClass()
throws java.lang.Exception
java.lang.Exceptionpublic void testExpectedValuesOfPartialResults()
throws java.lang.Exception
java.lang.Exceptionpublic void testExpectedValuesOfPartialResults(boolean reversed)
throws java.lang.Exception
java.lang.Exceptionpublic void testAllowPartialResults()
throws java.lang.Exception
java.lang.Exceptionpublic void testEquivalenceOfScanResults()
throws java.lang.Exception
java.lang.Exceptionpublic void testEquivalenceOfScanResults(Table table,
Scan scan1,
Scan scan2)
throws java.lang.Exception
java.lang.Exceptionpublic void testOrderingOfCellsInPartialResults()
throws java.lang.Exception
java.lang.Exceptionpublic void testOrderingOfCellsInPartialResults(Scan basePartialScan)
throws java.lang.Exception
java.lang.Exceptionpublic void testExpectedNumberOfCellsPerPartialResult()
throws java.lang.Exception
java.lang.Exceptionpublic void testExpectedNumberOfCellsPerPartialResult(Scan baseScan)
throws java.lang.Exception
java.lang.Exceptionpublic void testExpectedNumberOfCellsPerPartialResult(Scan baseScan,
int expectedNumberOfCells)
throws java.lang.Exception
java.lang.Exceptionpublic void testPartialResultsAndBatch()
throws java.lang.Exception
java.lang.Exceptionpublic void testPartialResultsAndBatch(int batch,
int cellsPerPartialResult)
throws java.lang.Exception
java.lang.Exceptionpublic void testPartialResultsReassembly()
throws java.lang.Exception
Result#createCompleteResult(List)java.lang.Exceptionpublic void testPartialResultsReassembly(Scan scanBase)
throws java.lang.Exception
java.lang.Exceptionpublic void testExceptionThrownOnMismatchedPartialResults()
throws java.io.IOException
java.io.IOExceptionpublic void testNoPartialResultsWhenRowFilterPresent()
throws java.lang.Exception
org.apache.hadoop.hbase.filter.Filter#hasFilterRow() is
true, the scanner should not return partial results. The scanner cannot return partial results
because the entire row needs to be read for the include/exclude decision to be madejava.lang.Exceptionpublic void testPartialResultsAndCaching()
throws java.lang.Exception
java.lang.Exceptionpublic void testPartialResultsAndCaching(int resultSizeRowLimit,
int cachingRowLimit)
throws java.lang.Exception
resultSizeRowLimit - The row limit that will be enforced through maxResultSizecachingRowLimit - The row limit that will be enforced through cachingjava.lang.Exceptionpublic void testSmallScansDoNotAllowPartials()
throws java.lang.Exception
Scan#getAllowPartialResults() is true, small
scans do not return partial resultsjava.lang.Exceptionpublic void testSmallScansDoNotAllowPartials(Scan baseScan)
throws java.lang.Exception
java.lang.Exceptionpublic void testReadPointAndPartialResults()
throws java.lang.Exception
java.lang.Exceptionpublic void testPartialResultsWithColumnFilter()
throws java.lang.Exception
java.lang.Exceptionpublic void testPartialResultsWithColumnFilter(Filter filter)
throws java.lang.Exception
java.lang.Exceptionpublic void testPartialResultWhenRegionMove()
throws java.io.IOException
java.io.IOExceptionpublic void testReversedPartialResultWhenRegionMove()
throws java.io.IOException
java.io.IOExceptionpublic void testCompleteResultWhenRegionMove()
throws java.io.IOException
java.io.IOExceptionpublic void testReversedCompleteResultWhenRegionMove()
throws java.io.IOException
java.io.IOExceptionpublic void testBatchingResultWhenRegionMove()
throws java.io.IOException
java.io.IOException