SplitT
- the type of the splits.public abstract class SourceReaderTestBase<SplitT extends SourceSplit> extends TestLogger
SourceReader
to inherit.Modifier and Type | Class and Description |
---|---|
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 int |
numSplits |
protected int |
totalNumRecords |
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 int |
getNumSplits() |
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 final int numSplits
protected final int totalNumRecords
protected static final int NUM_RECORDS_PER_SPLIT
public org.junit.rules.ExpectedException expectedException
protected int getNumSplits()
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–2023 The Apache Software Foundation. All rights reserved.