Skip to content

Commit

Permalink
[hotfix][tests] Fix raw generics in OperatorEventSendingCheckpointITCase
Browse files Browse the repository at this point in the history
  • Loading branch information
StephanEwen committed Jul 21, 2021
1 parent b34ef1e commit cc5c9c0
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,7 @@
import java.util.ArrayDeque;
import java.util.Collection;
import java.util.Collections;
import java.util.Iterator;
import java.util.List;
import java.util.Queue;
import java.util.Set;
Expand Down Expand Up @@ -336,12 +337,14 @@ public TestingNumberSequenceSource(long from, long to, int numSplits) {
@Override
public SourceReader<Long, NumberSequenceSplit> createReader(
SourceReaderContext readerContext) {
return new CheckpointListeningIteratorSourceReader(
return new CheckpointListeningIteratorSourceReader<>(
readerContext, numAllowedMessageBeforeCheckpoint);
}
}

private static class CheckpointListeningIteratorSourceReader extends IteratorSourceReader {
private static class CheckpointListeningIteratorSourceReader<
E, IterT extends Iterator<E>, SplitT extends IteratorSourceSplit<E, IterT>>
extends IteratorSourceReader<E, IterT, SplitT> {
private boolean checkpointed = false;
private long messagesProduced = 0;
private final long numAllowedMessageBeforeCheckpoint;
Expand All @@ -353,7 +356,7 @@ public CheckpointListeningIteratorSourceReader(
}

@Override
public InputStatus pollNext(ReaderOutput output) {
public InputStatus pollNext(ReaderOutput<E> output) {
if (messagesProduced < numAllowedMessageBeforeCheckpoint || checkpointed) {
messagesProduced++;
return super.pollNext(output);
Expand Down

0 comments on commit cc5c9c0

Please sign in to comment.