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

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

GitHub user tzulitai opened a pull request:

    https://github.com/apache/flink/pull/5336

    (release-1.4) [FLINK-8419] [kafka] Register metrics for dynamically 
discovered Kafka partitions

    ## What is the purpose of the change
    
    Different version of #5335, which is targeted for `release-1.4`.
    This version does not include the new offset metrics added in #5214 for the 
new partitions (those new metrics are only added in `master`).
    
    ## Brief change log
    
    - db39ec2: Preliminary cleanup of the registration of the `KafkaConsumer` 
user scope metric group. This commit refactors that for better separation of 
concerns and lessen code duplication.
    - 1acfc15: Register offset metrics for new partitions in 
`addDiscoveredPartitions`
    
    ## Verifying this change
    
    No new tests were added.
    By manually running a Flink job using the Kafka consumer and repartitioning 
the Kafka topic, you should be able to see metrics for the newly added 
partitions.
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (yes / **no**)
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: (yes / **no**)
      - The serializers: (yes / **no** / don't know)
      - The runtime per-record code paths (performance sensitive): (yes / 
**no** / don't know)
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: (yes / **no** / don't know)
      - The S3 file system connector: (yes / **no** / don't know)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes / **no**)
      - If yes, how is the feature documented? (**not applicable** / docs / 
JavaDocs / not documented)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/tzulitai/flink FLINK-8419-1.4

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/5336.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5336
    
----
commit db39ec2ed6f6b9cf46bc851125b859501d9a9df0
Author: Tzu-Li (Gordon) Tai <tzulitai@...>
Date:   2018-01-22T12:36:20Z

    [FLINK-8419] [kafka] Move consumer metric group registration to 
FlinkKafkaConsumerBase
    
    This commit is a refactor to move the registration of the consumer
    metric group (user scope "KafkaConsumer") to FlinkKafkaConsumerBase.
    Previously, the registration was scattered around in Kafka
    version-specific subclasses.

commit 1acfc1526e56abd5e5cb4f5a32641afbf2282905
Author: Tzu-Li (Gordon) Tai <tzulitai@...>
Date:   2018-01-22T13:14:44Z

    [FLINK-8419] [kafka] Register metrics for dynamically discovered Kafka 
partitions

----


> Kafka consumer's offset metrics are not registered for dynamically discovered 
> partitions
> ----------------------------------------------------------------------------------------
>
>                 Key: FLINK-8419
>                 URL: https://issues.apache.org/jira/browse/FLINK-8419
>             Project: Flink
>          Issue Type: Bug
>          Components: Kafka Connector, Metrics
>    Affects Versions: 1.4.0, 1.5.0
>            Reporter: Tzu-Li (Gordon) Tai
>            Assignee: Tzu-Li (Gordon) Tai
>            Priority: Blocker
>             Fix For: 1.5.0, 1.4.1
>
>
> Currently, the per-partition offset metrics are registered via the 
> {{AbstractFetcher#addOffsetStateGauge}} method. That method is only ever 
> called for the initial startup partitions, and not for dynamically discovered 
> partitions.
> We should consider adding some unit tests to make sure that metrics are 
> properly registered for all partitions. That would also safeguard us from 
> accidentally removing metrics.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to