use of org.apache.flink.api.connector.source.ReaderInfo in project flink by apache.
the class KafkaEnumeratorTest method registerReader.
// ---------------------
private void registerReader(MockSplitEnumeratorContext<KafkaPartitionSplit> context, KafkaSourceEnumerator enumerator, int reader) {
context.registerReader(new ReaderInfo(reader, "location 0"));
enumerator.addReader(reader);
}
use of org.apache.flink.api.connector.source.ReaderInfo in project flink by apache.
the class PulsarSourceEnumeratorTest method registerReader.
private void registerReader(MockSplitEnumeratorContext<PulsarPartitionSplit> context, PulsarSourceEnumerator enumerator, int reader) {
context.registerReader(new ReaderInfo(reader, "testing location "));
enumerator.addReader(reader);
}
use of org.apache.flink.api.connector.source.ReaderInfo in project flink by apache.
the class SourceCoordinatorContextTest method registerReaders.
// ------------------------
private List<ReaderInfo> registerReaders() {
final List<ReaderInfo> infos = Arrays.asList(new ReaderInfo(0, "subtask_0_location"), new ReaderInfo(1, "subtask_1_location"), new ReaderInfo(2, "subtask_2_location"));
for (ReaderInfo info : infos) {
sourceCoordinator.handleEventFromOperator(info.getSubtaskId(), new ReaderRegistrationEvent(info.getSubtaskId(), info.getLocation()));
}
waitForCoordinatorToProcessActions();
return infos;
}
use of org.apache.flink.api.connector.source.ReaderInfo in project flink by apache.
the class SourceCoordinator method handleReaderRegistrationEvent.
// --------------------- private methods -------------
private void handleReaderRegistrationEvent(ReaderRegistrationEvent event) {
context.registerSourceReader(new ReaderInfo(event.subtaskId(), event.location()));
enumerator.addReader(event.subtaskId());
}
use of org.apache.flink.api.connector.source.ReaderInfo in project flink by apache.
the class HybridSourceSplitEnumeratorTest method registerReader.
private static void registerReader(MockSplitEnumeratorContext<HybridSourceSplit> context, HybridSourceSplitEnumerator enumerator, int reader) {
context.registerReader(new ReaderInfo(reader, "location 0"));
enumerator.addReader(reader);
}
Aggregations