becketqin commented on a change in pull request #7930: [FLINK-11249][kafka] Fix
migration from FlinkKafkaProducer0.11 to universal
URL: https://github.com/apache/flink/pull/7930#discussion_r288435768
##########
File path:
flink-connectors/flink-connector-kafka-0.11/src/main/java/org/apache/flink/streaming/connectors/kafka/FlinkKafkaProducer011.java
##########
@@ -1355,5 +1374,114 @@ public NextTransactionalIdHint(int parallelism, long
nextFreeTransactionalId) {
this.lastParallelism = parallelism;
this.nextFreeTransactionalId = nextFreeTransactionalId;
}
+
+ @Override
+ public String toString() {
+ return "NextTransactionalIdHint[" +
+ "lastParallelism=" + lastParallelism +
+ ", nextFreeTransactionalId=" +
nextFreeTransactionalId +
+ ']';
+ }
+
+ @Override
+ public boolean equals(Object o) {
+ if (this == o) {
+ return true;
+ }
+ if (o == null || getClass() != o.getClass()) {
+ return false;
+ }
+
+ NextTransactionalIdHint that =
(NextTransactionalIdHint) o;
+
+ if (lastParallelism != that.lastParallelism) {
Review comment:
I am fine either way. I just feel the `condition1 && condition2` format is
easier to understand.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services