public class NumberSequenceRowSource extends Object implements org.apache.flink.api.connector.source.Source<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>>, org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>
RowData
.Modifier and Type | Class and Description |
---|---|
static class |
NumberSequenceRowSource.NumberSequenceSplit
A split of the source, representing a number sub-sequence.
|
Constructor and Description |
---|
NumberSequenceRowSource(long from,
long to)
Creates a new
NumberSequenceSource that produces parallel sequences covering the
range from to to (both boundaries are inclusive). |
Modifier and Type | Method and Description |
---|---|
org.apache.flink.api.connector.source.SplitEnumerator<NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>> |
createEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<NumberSequenceRowSource.NumberSequenceSplit> enumContext) |
org.apache.flink.api.connector.source.SourceReader<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit> |
createReader(org.apache.flink.api.connector.source.SourceReaderContext readerContext) |
org.apache.flink.api.connector.source.Boundedness |
getBoundedness() |
org.apache.flink.core.io.SimpleVersionedSerializer<Collection<NumberSequenceRowSource.NumberSequenceSplit>> |
getEnumeratorCheckpointSerializer() |
long |
getFrom() |
org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> |
getProducedType() |
org.apache.flink.core.io.SimpleVersionedSerializer<NumberSequenceRowSource.NumberSequenceSplit> |
getSplitSerializer() |
long |
getTo() |
org.apache.flink.api.connector.source.SplitEnumerator<NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>> |
restoreEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<NumberSequenceRowSource.NumberSequenceSplit> enumContext,
Collection<NumberSequenceRowSource.NumberSequenceSplit> checkpoint) |
protected List<NumberSequenceRowSource.NumberSequenceSplit> |
splitNumberRange(long from,
long to,
int numSplits) |
public NumberSequenceRowSource(long from, long to)
NumberSequenceSource
that produces parallel sequences covering the
range from
to to
(both boundaries are inclusive).public long getFrom()
public long getTo()
public org.apache.flink.api.common.typeinfo.TypeInformation<org.apache.flink.table.data.RowData> getProducedType()
getProducedType
in interface org.apache.flink.api.java.typeutils.ResultTypeQueryable<org.apache.flink.table.data.RowData>
public org.apache.flink.api.connector.source.Boundedness getBoundedness()
getBoundedness
in interface org.apache.flink.api.connector.source.Source<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>>
public org.apache.flink.api.connector.source.SourceReader<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit> createReader(org.apache.flink.api.connector.source.SourceReaderContext readerContext)
createReader
in interface org.apache.flink.api.connector.source.SourceReaderFactory<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit>
public org.apache.flink.api.connector.source.SplitEnumerator<NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>> createEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<NumberSequenceRowSource.NumberSequenceSplit> enumContext)
createEnumerator
in interface org.apache.flink.api.connector.source.Source<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>>
public org.apache.flink.api.connector.source.SplitEnumerator<NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>> restoreEnumerator(org.apache.flink.api.connector.source.SplitEnumeratorContext<NumberSequenceRowSource.NumberSequenceSplit> enumContext, Collection<NumberSequenceRowSource.NumberSequenceSplit> checkpoint)
restoreEnumerator
in interface org.apache.flink.api.connector.source.Source<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>>
public org.apache.flink.core.io.SimpleVersionedSerializer<NumberSequenceRowSource.NumberSequenceSplit> getSplitSerializer()
getSplitSerializer
in interface org.apache.flink.api.connector.source.Source<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>>
public org.apache.flink.core.io.SimpleVersionedSerializer<Collection<NumberSequenceRowSource.NumberSequenceSplit>> getEnumeratorCheckpointSerializer()
getEnumeratorCheckpointSerializer
in interface org.apache.flink.api.connector.source.Source<org.apache.flink.table.data.RowData,NumberSequenceRowSource.NumberSequenceSplit,Collection<NumberSequenceRowSource.NumberSequenceSplit>>
protected List<NumberSequenceRowSource.NumberSequenceSplit> splitNumberRange(long from, long to, int numSplits)
Copyright © 2023–2024 The Apache Software Foundation. All rights reserved.