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

Yiqun Lin commented on HDDS-1070:
---------------------------------

Thanks for addressing the comments, [~nandakumar131]! Looks great now, only 
some nits:

* Can we add the javadoc for class {{TestPipelineManagerMXBean}}, 
{{TestSCMPipelineMetrics }} and {{TestPipelineManagerMXBean}}?
* Can we use {{static import}} for {{MetricsAsserts#getLongCounter}}, 
{{MetricsAsserts#getMetrics}} across the unit tests? It will simplify lines.
* Looks like {{pipeline.getPipelineState();}} is redundant.
{noformat}
+  @Override
+  public Map<String, Integer> getPipelineInfo() {
...
+    stateManager.getPipelines().stream().forEach(pipeline -> {
+      pipeline.getPipelineState(); <===
+      pipelineInfo.computeIfPresent(
+          pipeline.getPipelineState().toString(), (k, v) -> v + 1);
+    });
+    return pipelineInfo;
+  }
{noformat}

> Adding Node and Pipeline related metrics in SCM
> -----------------------------------------------
>
>                 Key: HDDS-1070
>                 URL: https://issues.apache.org/jira/browse/HDDS-1070
>             Project: Hadoop Distributed Data Store
>          Issue Type: Improvement
>          Components: SCM
>    Affects Versions: 0.3.0
>            Reporter: Nanda kumar
>            Assignee: Nanda kumar
>            Priority: Major
>         Attachments: HDDS-1070.000.patch, HDDS-1070.001.patch
>
>
> This jira aims to add more Node and Pipeline related metrics to SCM.
> Following metrics will be added as part of this jira:
>  * numberOfSuccessfulPipelineCreation
>  * numberOfFailedPipelineCreation
>  * numberOfSuccessfulPipelineDestroy
>  * numberOfFailedPipelineDestroy
>  * numberOfPipelineReportProcessed
>  * numberOfNodeReportProcessed
>  * numberOfHBProcessed
>  * number of pipelines in different PipelineState



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

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to