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

ASF GitHub Bot commented on STORM-1950:
---------------------------------------

GitHub user HeartSaVioR opened a pull request:

    https://github.com/apache/storm/pull/1545

    STORM-1950 Change response json of "Topology Lag" REST API to keyed by 
spoutId, topic, partition

    * bin/storm-kafka-monitor: guard classpath to only uses 
storm-kafka-monitor*.jar
    * KafkaOffsetLagUtil: when succeed to get, output is keyed by topic and 
partition
    * TopologySpoutLag: modify JSON response keyed by spoutId
    * reflect changes on topology page
    
    Here's sample JSON response from /lag API
    ```
    {
       "kafka-spout":{
          "spoutLagResult":{
             "myKafkaTopic":{
                "0":{
                   "consumerCommittedOffset":749491,
                   "logHeadOffset":911511,
                   "lag":162020
                },
                "1":{
                   "consumerCommittedOffset":1168,
                   "logHeadOffset":1168,
                   "lag":0
                },
                "2":{
                   "consumerCommittedOffset":159339,
                   "logHeadOffset":159339,
                   "lag":0
                }
             }
          },
          "spoutId":"kafka-spout",
          "spoutType":"KAFKA"
       }
    }
    ```

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

    $ git pull https://github.com/HeartSaVioR/storm STORM-1950

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

    https://github.com/apache/storm/pull/1545.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 #1545
    
----
commit e3e26daec8e1d57bc87343807df74acf6626eb5f
Author: Jungtaek Lim <[email protected]>
Date:   2016-07-08T06:07:05Z

    STORM-1950 Change response json of "Topology Lag" REST API to keyed by 
spoutId, topic, partition
    
    * bin/storm-kafka-monitor: guard classpath to only uses 
storm-kafka-monitor*.jar
    * KafkaOffsetLagUtil: when succeed to get, output is keyed by topic and 
partition
    * TopologySpoutLag: modify JSON response keyed by spoutId
    * reflect changes on topology page

----


> Change response json of "Topology Lag" REST API to keyed by spoutId, topic, 
> partition
> -------------------------------------------------------------------------------------
>
>                 Key: STORM-1950
>                 URL: https://issues.apache.org/jira/browse/STORM-1950
>             Project: Apache Storm
>          Issue Type: Improvement
>          Components: storm-ui
>    Affects Versions: 1.1.0
>            Reporter: Jungtaek Lim
>            Assignee: Jungtaek Lim
>
> From code review for STORM-1945, there's an idea to change JSON response of 
> "Topology Lag" API to keyed by topic, partition number.
> https://github.com/apache/storm/pull/1541#issuecomment-230983140
> I think also make result keyed by spout id would be good.
> Here's sample JSON of output after this issue is resolved.
> {code}
> {
>    "spout1":{
>       "spoutId":"spout1",
>       "spoutType":"KAFKA",
>       "spoutLagResult":{
>          "topic":{
>             "partition0":{
>                "consumerCommittedOffset":1175610,
>                "logHeadOffset":5634192,
>                "lag":4458582
>             },
>             "partition2":{
>                "consumerCommittedOffset":1175610,
>                "logHeadOffset":5634192,
>                "lag":4458582
>             }
>          },
>          "topic2":{
>             "partition0":{
>                "consumerCommittedOffset":1175610,
>                "logHeadOffset":5634192,
>                "lag":4458582
>             },
>             "partition2":{
>                "consumerCommittedOffset":1175610,
>                "logHeadOffset":5634192,
>                "lag":4458582
>             }
>          }
>       }
>    }
> }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to