SplitT
- the type of the splits.public abstract class SourceReaderTestBase<SplitT extends SourceSplit> extends TestLogger
SourceReader
to inherit.Modifier and Type | Class and Description |
---|---|
static class |
SourceReaderTestBase.ValidatingSourceOutput
A source output that validates the output.
|
Modifier and Type | Field and Description |
---|---|
org.junit.rules.ExpectedException |
expectedException |
protected static int |
NUM_RECORDS_PER_SPLIT |
protected static int |
NUM_SPLITS |
protected static int |
TOTAL_NUM_RECORDS |
log, nameProvider, watchman
Constructor and Description |
---|
SourceReaderTestBase() |
Modifier and Type | Method and Description |
---|---|
protected abstract SourceReader<Integer,SplitT> |
createReader() |
void |
ensureNoDangling() |
protected abstract long |
getNextRecordIndex(SplitT split) |
protected abstract SplitT |
getSplit(int splitId,
int numRecords,
Boundedness boundedness) |
protected abstract List<SplitT> |
getSplits(int numSplits,
int numRecordsPerSplit,
Boundedness boundedness) |
void |
testAddSplitToExistingFetcher() |
void |
testAvailableOnEmptyQueue() |
void |
testPollingFromEmptyQueue() |
void |
testRead()
Simply test the reader reads all the splits fine.
|
void |
testSnapshot() |
protected static final int NUM_SPLITS
protected static final int NUM_RECORDS_PER_SPLIT
protected static final int TOTAL_NUM_RECORDS
public org.junit.rules.ExpectedException expectedException
public void ensureNoDangling()
public void testRead() throws Exception
Exception
public void testAddSplitToExistingFetcher() throws Exception
Exception
public void testPollingFromEmptyQueue() throws Exception
Exception
public void testAvailableOnEmptyQueue() throws Exception
Exception
protected abstract SourceReader<Integer,SplitT> createReader() throws Exception
Exception
protected abstract List<SplitT> getSplits(int numSplits, int numRecordsPerSplit, Boundedness boundedness)
protected abstract SplitT getSplit(int splitId, int numRecords, Boundedness boundedness)
protected abstract long getNextRecordIndex(SplitT split)
Copyright © 2014–2022 The Apache Software Foundation. All rights reserved.