flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [flink] becketqin commented on a change in pull request #7930: [FLINK-11249][kafka] Fix migration from FlinkKafkaProducer0.11 to universal
Date Mon, 27 May 2019 10:15:15 GMT
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_r287711197
 
 

 ##########
 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:
   Nit pick: line 1397 to line 1400 can be replaced with
   ```
   return lastParallelism == that.lastParallelism && nextFreeTransactionalId == that.nextFreeTransactionalId;
   ```

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message