public class TestPartialResultsFromClientSide extends Object
Result
s 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 |
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
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, Result) |
void |
testPartialResultsReassembly(Scan scanBase) |
void |
testPartialResultsWithColumnFilter()
Test partial Result re-assembly in the presence of different filters.
|
void |
testPartialResultsWithColumnFilter(Filter filter) |
void |
testReadPointAndPartialResults() |
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 void testExpectedValuesOfPartialResults() throws Exception
Exception
public void testExpectedValuesOfPartialResults(boolean reversed) throws Exception
Exception
public void testAllowPartialResults() throws Exception
Exception
public void testEquivalenceOfScanResults() throws Exception
Exception
public void testEquivalenceOfScanResults(Table table, Scan scan1, Scan scan2) throws Exception
Exception
public void testOrderingOfCellsInPartialResults() throws Exception
Exception
public void testOrderingOfCellsInPartialResults(Scan basePartialScan) throws Exception
Exception
public void testExpectedNumberOfCellsPerPartialResult() throws Exception
Exception
public void testExpectedNumberOfCellsPerPartialResult(Scan baseScan) throws Exception
Exception
public void testExpectedNumberOfCellsPerPartialResult(Scan baseScan, int expectedNumberOfCells) throws Exception
Exception
public void testPartialResultsAndBatch() throws Exception
Exception
public void testPartialResultsAndBatch(int batch, int cellsPerPartialResult) throws Exception
Exception
public void testPartialResultsReassembly() throws Exception
Result#createCompleteResult(List, Result)
Exception
public void testPartialResultsReassembly(Scan scanBase) throws Exception
Exception
public void testExceptionThrownOnMismatchedPartialResults() throws IOException
IOException
public void testNoPartialResultsWhenRowFilterPresent() throws Exception
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 madeException
public void testPartialResultsAndCaching() throws Exception
Exception
public void testPartialResultsAndCaching(int resultSizeRowLimit, int cachingRowLimit) throws Exception
resultSizeRowLimit
- The row limit that will be enforced through maxResultSizecachingRowLimit
- The row limit that will be enforced through cachingException
public void testSmallScansDoNotAllowPartials() throws Exception
Scan.getAllowPartialResults()
is true, small
scans do not return partial resultsException
public void testSmallScansDoNotAllowPartials(Scan baseScan) throws Exception
Exception
public void testReadPointAndPartialResults() throws Exception
Exception
public void testPartialResultsWithColumnFilter() throws Exception
Exception