[ https://issues.apache.org/jira/browse/FLINK-36745?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Andrei Kaigorodov updated FLINK-36745: -------------------------------------- Description: In Flink 2.0, a few deprecated constructors for SplitFetcherManager and SourceReaderBase have been removed by FLINK-36245 [https://github.com/apache/flink/pull/25331] more specifically the constructors that let the client code pass the _elementsQueue_ object. However, the examples on [the Data Sources page|https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/sources/] still use the old API: [https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/sources/] see code snippets for FixedSizeSplitFetcherManager and FixedFetcherSizeSourceReader. {code:java} public FixedSizeSplitFetcherManager( int numFetchers, FutureCompletingBlockingQueue<RecordsWithSplitIds<E>> elementsQueue, Supplier<SplitReader<E, SplitT>> splitReaderSupplier) { super(elementsQueue, splitReaderSupplier); <- it refers to the removed constructor {code} Additionally FixedFetcherSizeSourceReader uses getInteger method of Configuration that was removed in in Flink 1.20-preview by FLINK-34082 i.e. the examples should be adjusted to match the new API was: In Flink 2.0, a few deprecated constructors for SplitFetcherManager and SourceReaderBase have been removed by FLINK-36245 [https://github.com/apache/flink/pull/25331] more specifically the constructors that let the client code pass the _elementsQueue_ object. However, the examples on [the Data Sources page|https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/sources/] still use the old API: [https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/sources/] see code snippets for FixedSizeSplitFetcherManager and FixedFetcherSizeSourceReader. {code:java} public FixedSizeSplitFetcherManager( int numFetchers, FutureCompletingBlockingQueue<RecordsWithSplitIds<E>> elementsQueue, Supplier<SplitReader<E, SplitT>> splitReaderSupplier) { super(elementsQueue, splitReaderSupplier); <- it refers to the removed constructor {code} Additionally FixedFetcherSizeSourceReader uses getInteger method of Configuration that was removed in in Flink 1.20-preview by https://issues.apache.org/jira/browse/FLINK-34082 i.e. the examples should be adjusted to match the new API > Code snippets on the Data Sources page use deprecated (and removed in 2.0) > APIs > ------------------------------------------------------------------------------- > > Key: FLINK-36745 > URL: https://issues.apache.org/jira/browse/FLINK-36745 > Project: Flink > Issue Type: Bug > Components: Connectors / Common, Documentation > Affects Versions: 1.20.0, 1.20.1 > Reporter: Andrei Kaigorodov > Priority: Major > Labels: 2.0-related, pull-request-available > > In Flink 2.0, a few deprecated constructors for SplitFetcherManager and > SourceReaderBase have been removed by > FLINK-36245 [https://github.com/apache/flink/pull/25331] > more specifically the constructors that let the client code pass the > _elementsQueue_ object. > However, the examples on [the Data Sources > page|https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/sources/] > still use the old API: > [https://nightlies.apache.org/flink/flink-docs-master/docs/dev/datastream/sources/] > see code snippets for FixedSizeSplitFetcherManager and > FixedFetcherSizeSourceReader. > {code:java} > public FixedSizeSplitFetcherManager( > int numFetchers, > FutureCompletingBlockingQueue<RecordsWithSplitIds<E>> > elementsQueue, > Supplier<SplitReader<E, SplitT>> splitReaderSupplier) { > super(elementsQueue, splitReaderSupplier); <- it refers to the > removed constructor > {code} > > Additionally > FixedFetcherSizeSourceReader uses getInteger method of Configuration that was > removed in in Flink 1.20-preview by FLINK-34082 > > i.e. the examples should be adjusted to match the new API -- This message was sent by Atlassian Jira (v8.20.10#820010)