Skip to content

Commit 11c2264

Browse files
lvyanquanAHeise
authored andcommitted
Fix compatibility with 2.1-SNAPSHOT.
1 parent df7d347 commit 11c2264

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

flink-connector-kafka/src/test/java/org/apache/flink/connector/kafka/sink/KafkaSinkITCase.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,6 @@
6666
import org.apache.flink.testutils.junit.SharedReference;
6767
import org.apache.flink.util.TestLogger;
6868

69-
import org.apache.flink.shaded.guava32.com.google.common.collect.Lists;
70-
7169
import org.apache.kafka.clients.CommonClientConfigs;
7270
import org.apache.kafka.clients.admin.AdminClient;
7371
import org.apache.kafka.clients.admin.CreateTopicsResult;
@@ -551,7 +549,9 @@ public Long map(Long value) {
551549
public void notifyCheckpointComplete(long checkpointId) throws Exception {
552550
// sync with shared object, this is guaranteed to sync eventually because of final
553551
// checkpoint
554-
checkpointedRecords.get().addAll(Lists.newArrayList(snapshottedRecords.get()));
552+
ArrayList<Long> committedRecords = new ArrayList<>();
553+
snapshottedRecords.get().forEach(committedRecords::add);
554+
checkpointedRecords.get().addAll(committedRecords);
555555
}
556556

557557
@Override

0 commit comments

Comments
 (0)