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

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

Github user StephanEwen commented on a diff in the pull request:

    https://github.com/apache/flink/pull/2693#discussion_r85079818
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/io/network/partition/ResultPartition.java
 ---
    @@ -228,6 +232,23 @@ public long getTotalNumberOfBytes() {
                return totalNumberOfBytes;
        }
     
    +   public int getNumberOfQueuedBuffers() {
    +           int totalBuffers = 0;
    +
    +           for (ResultSubpartition subpartition : subpartitions) {
    +
    +                   if (subpartition instanceof PipelinedSubpartition) {
    --- End diff --
    
    If you add the `getNumberOfQueuedBuffers()` method to `ResultSubpartition` 
then you do not need to check and cast here.


> Expose input/output buffers and bufferPool usage as a metric for a Task
> -----------------------------------------------------------------------
>
>                 Key: FLINK-4923
>                 URL: https://issues.apache.org/jira/browse/FLINK-4923
>             Project: Flink
>          Issue Type: Improvement
>          Components: Metrics
>            Reporter: zhuhaifeng
>            Assignee: zhuhaifeng
>            Priority: Minor
>             Fix For: 1.2.0
>
>
> We should expose the following Metrics on the TaskIOMetricGroup:
>  1. Buffers.numIn: received buffers of InputGates for a task
>  2. Buffers.numOut: buffers of produced ResultPartitions for a task
>  3. Buffers.InPoolUsage: usage of InputGates buffer pool for a task
>  4. Buffers.OutPoolUsage: usage of produced ResultPartitions buffer pool for 
> a task



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

Reply via email to