SplitT - the type of the splits.public abstract class SourceReaderTestBase<SplitT extends org.apache.flink.api.connector.source.SourceSplit>
extends org.apache.flink.util.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 |
| Constructor and Description |
|---|
SourceReaderTestBase() |
| Modifier and Type | Method and Description |
|---|---|
protected abstract org.apache.flink.api.connector.source.SourceReader<Integer,SplitT> |
createReader() |
void |
ensureNoDangling() |
protected abstract long |
getNextRecordIndex(SplitT split) |
protected abstract SplitT |
getSplit(int splitId,
int numRecords,
org.apache.flink.api.connector.source.Boundedness boundedness) |
protected abstract List<SplitT> |
getSplits(int numSplits,
int numRecordsPerSplit,
org.apache.flink.api.connector.source.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
Exceptionpublic void testAddSplitToExistingFetcher()
throws Exception
Exceptionpublic void testPollingFromEmptyQueue()
throws Exception
Exceptionpublic void testAvailableOnEmptyQueue()
throws Exception
Exceptionprotected abstract org.apache.flink.api.connector.source.SourceReader<Integer,SplitT> createReader()
protected abstract List<SplitT> getSplits(int numSplits, int numRecordsPerSplit, org.apache.flink.api.connector.source.Boundedness boundedness)
protected abstract SplitT getSplit(int splitId, int numRecords, org.apache.flink.api.connector.source.Boundedness boundedness)
protected abstract long getNextRecordIndex(SplitT split)
Copyright © 2014–2021 The Apache Software Foundation. All rights reserved.