You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by GitBox <gi...@apache.org> on 2022/10/25 13:34:12 UTC

[GitHub] [flink] snuyanzin opened a new pull request, #21150: [hotfix] Replace deprecated DescribeTopicsResult#all, KafkaConsumer#poll and ContainerState#getContainerIpAddress

snuyanzin opened a new pull request, #21150:
URL: https://github.com/apache/flink/pull/21150

   The PR is replacing deprecated methods 
   _org.apache.kafka.clients.admin.DescribeTopicsResult#all()_
   _org.apache.kafka.clients.consumer.KafkaConsumer#poll(long)_
   _org.testcontainers.containers.ContainerState#getContainerIpAddress_
   as it was mentioned in corresponding javadocs
   
   ## What is the purpose of the change
   
   _org.apache.kafka.clients.admin.DescribeTopicsResult#all()_ was made deprecated at https://issues.apache.org/jira/browse/KAFKA-10774
   and it is suggested to use _org.apache.kafka.clients.admin.DescribeTopicsResult#allTopicNames_
   
   _org.apache.kafka.clients.consumer.KafkaConsumer#poll(long)_ was deprecated at https://issues.apache.org/jira/browse/KAFKA-5697
   and it's suggested to use _org.apache.kafka.clients.consumer.KafkaConsumer#poll(java.time.Duration)_
   
   _org.testcontainers.containers.ContainerState#getContainerIpAddress_ was deprecated at https://github.com/testcontainers/testcontainers-java/pull/5247 and it's suggested to use _org.testcontainers.containers.ContainerState#getHost_
   
   
   ## Verifying this change
   
   This change is a trivial rework / code cleanup without any test coverage.
   ## Does this pull request potentially affect one of the following parts:
   
     - Dependencies (does it add or upgrade a dependency): ( no)
     - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: ( no)
     - The serializers: ( no )
     - The runtime per-record code paths (performance sensitive): ( no )
     - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Kubernetes/Yarn, ZooKeeper: ( no )
     - The S3 file system connector: ( no)
   
   ## Documentation
   
     - Does this pull request introduce a new feature? ( no)
     - If yes, how is the feature documented? (not applicable)
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1300540487

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on a diff in pull request #21150: [FLINK-30056][connectors][kafka] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on code in PR #21150:
URL: https://github.com/apache/flink/pull/21150#discussion_r1024896571


##########
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaConsumerThread.java:
##########
@@ -258,7 +259,7 @@ public void run() {
                 // over
                 if (records == null) {
                     try {
-                        records = consumer.poll(pollTimeout);
+                        records = consumer.poll(Duration.ofMillis(pollTimeout));

Review Comment:
   please let me know if i need to change commit message



##########
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaConsumerThread.java:
##########
@@ -258,7 +259,7 @@ public void run() {
                 // over
                 if (records == null) {
                     try {
-                        records = consumer.poll(pollTimeout);
+                        records = consumer.poll(Duration.ofMillis(pollTimeout));

Review Comment:
   please let me know if i need to change commit message or rebase



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1314523103

   
   @flinkbot run azure
   
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on a diff in pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #21150:
URL: https://github.com/apache/flink/pull/21150#discussion_r1022556918


##########
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaConsumerThread.java:
##########
@@ -258,7 +259,7 @@ public void run() {
                 // over
                 if (records == null) {
                     try {
-                        records = consumer.poll(pollTimeout);
+                        records = consumer.poll(Duration.ofMillis(pollTimeout));

Review Comment:
   Note:  This changes the blocking behavior of this call.
   
   https://cwiki.apache.org/confluence/display/KAFKA/KIP-266%3A+Fix+consumer+indefinite+blocking+behavior
   
   I'd like to see a proper ticket for this particular change.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1302005842

   
   @flinkbot run azure
   
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1304828724

   
   @flinkbot run azure
   
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated DescribeTopicsResult#all, KafkaConsumer#poll and ContainerState#getContainerIpAddress

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1291251696

   
   @flinkbot run azure
   
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1301432124

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on a diff in pull request #21150: [FLINK-30056][connectors][kafka] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #21150:
URL: https://github.com/apache/flink/pull/21150#discussion_r1030315651


##########
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaConsumerThread.java:
##########
@@ -258,7 +259,7 @@ public void run() {
                 // over
                 if (records == null) {
                     try {
-                        records = consumer.poll(pollTimeout);
+                        records = consumer.poll(Duration.ofMillis(pollTimeout));

Review Comment:
   Please split the commits such that 1 is making the poll change, and the other (hotfix) commit with the remaining changes.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] flinkbot commented on pull request #21150: [hotfix] Replace deprecated DescribeTopicsResult#all, KafkaConsumer#poll and ContainerState#getContainerIpAddress

Posted by GitBox <gi...@apache.org>.
flinkbot commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1290578950

   <!--
   Meta data
   {
     "version" : 1,
     "metaDataEntries" : [ {
       "hash" : "123bdaea55d8304d02407c619117e6a7dce5f146",
       "status" : "UNKNOWN",
       "url" : "TBD",
       "triggerID" : "123bdaea55d8304d02407c619117e6a7dce5f146",
       "triggerType" : "PUSH"
     } ]
   }-->
   ## CI report:
   
   * 123bdaea55d8304d02407c619117e6a7dce5f146 UNKNOWN
   
   <details>
   <summary>Bot commands</summary>
     The @flinkbot bot supports the following commands:
   
    - `@flinkbot run azure` re-run the last Azure build
   </details>


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated DescribeTopicsResult#all, KafkaConsumer#poll and ContainerState#getContainerIpAddress

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1290884251

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on a diff in pull request #21150: [FLINK-30056][connectors][kafka] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on code in PR #21150:
URL: https://github.com/apache/flink/pull/21150#discussion_r1030699635


##########
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaConsumerThread.java:
##########
@@ -258,7 +259,7 @@ public void run() {
                 // over
                 if (records == null) {
                     try {
-                        records = consumer.poll(pollTimeout);
+                        records = consumer.poll(Duration.ofMillis(pollTimeout));

Review Comment:
   done



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol merged pull request #21150: [FLINK-30056][connectors][kafka] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
zentol merged PR #21150:
URL: https://github.com/apache/flink/pull/21150


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on a diff in pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on code in PR #21150:
URL: https://github.com/apache/flink/pull/21150#discussion_r1024895646


##########
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaConsumerThread.java:
##########
@@ -258,7 +259,7 @@ public void run() {
                 // over
                 if (records == null) {
                     try {
-                        records = consumer.poll(pollTimeout);
+                        records = consumer.poll(Duration.ofMillis(pollTimeout));

Review Comment:
   yes, sure
   jira issue created https://issues.apache.org/jira/browse/FLINK-30056



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] zentol commented on a diff in pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
zentol commented on code in PR #21150:
URL: https://github.com/apache/flink/pull/21150#discussion_r1022556918


##########
flink-connectors/flink-connector-kafka/src/main/java/org/apache/flink/streaming/connectors/kafka/internals/KafkaConsumerThread.java:
##########
@@ -258,7 +259,7 @@ public void run() {
                 // over
                 if (records == null) {
                     try {
-                        records = consumer.poll(pollTimeout);
+                        records = consumer.poll(Duration.ofMillis(pollTimeout));

Review Comment:
   Note:  This changes the blocking behavior of this call.
   
   https://cwiki.apache.org/confluence/display/KAFKA/KIP-266%3A+Fix+consumer+indefinite+blocking+behavior
   
   I'd like to see a proper ticket for this change.



-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1301715846

   
   @flinkbot run azure
   
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1301775092

   
   @flinkbot run azure
   
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated kafka-clients methods

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1304918113

   @flinkbot run azure


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [flink] snuyanzin commented on pull request #21150: [hotfix] Replace deprecated DescribeTopicsResult#all, KafkaConsumer#poll and ContainerState#getContainerIpAddress

Posted by GitBox <gi...@apache.org>.
snuyanzin commented on PR #21150:
URL: https://github.com/apache/flink/pull/21150#issuecomment-1291173829

   
   @flinkbot run azure
   
   


-- 
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: issues-unsubscribe@flink.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org