[ 
https://issues.apache.org/jira/browse/FLINK-7174?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16086022#comment-16086022
 ] 

ASF GitHub Bot commented on FLINK-7174:
---------------------------------------

Github user pnowojski commented on the issue:

    https://github.com/apache/flink/pull/4321
  
    Good catch with with this spinning, I missed that.
    
    Checking per each iteration for assigned partitions is unfortunately 
costly, because there is no cheap `isEmpty()` method. The one that I have found 
`consumer.assignment()` is pretty costly (creates quite a lot of objects and 
takes some locks). I wouldn't want to call it very often.
    
    I could move this variable to local scope of `run()` function, but it would 
be a little bit more error prone (in case some refactoring and for example 
calling `reassignPartitions()` from somewhere else outside of the `run()` 
method).


> Bump dependency of Kafka 0.10.x to the latest one
> -------------------------------------------------
>
>                 Key: FLINK-7174
>                 URL: https://issues.apache.org/jira/browse/FLINK-7174
>             Project: Flink
>          Issue Type: Improvement
>            Reporter: Piotr Nowojski
>            Assignee: Piotr Nowojski
>
> We are using pretty old Kafka version for 0.10. Besides any bug fixes and 
> improvements that were made between 0.10.0.1 and 0.10.2.1, it 0.10.2.1 
> version is more similar to 0.11.0.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to