Gerrrr commented on code in PR #46:
URL:
https://github.com/apache/flink-connector-kafka/pull/46#discussion_r1317655417
##########
flink-connector-kafka/src/main/java/org/apache/flink/connector/kafka/sink/KafkaWriter.java:
##########
@@ -104,9 +103,10 @@ class KafkaWriter<IN>
// producer pool only used for exactly once
private final Deque<FlinkKafkaInternalProducer<byte[], byte[]>>
producerPool =
new ArrayDeque<>();
- private final Closer closer = Closer.create();
private long lastCheckpointId;
+ private final Set<AutoCloseable> closeables = new HashSet<>();
Review Comment:
I renamed the variable to `producerCloseables` and changed its type to
`Deque` in
[dfcfdb4](https://github.com/apache/flink-connector-kafka/pull/46/commits/dfcfdb47fabf63632edac94139f9acb3c36eb3b5).
I chose `Deque` because this is the type used by
[Closer](https://github.com/google/guava/blob/3dc3312423209098720e638ac3cb6884fbe77b75/guava/src/com/google/common/io/Closer.java#L111).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]