flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From xhumanoid <...@git.apache.org>
Subject [GitHub] flink issue #3106: [FLINK-5118] Fix inconsistent numBytesIn/Out metrics
Date Sun, 15 Jan 2017 20:04:11 GMT
Github user xhumanoid commented on the issue:

    https://github.com/apache/flink/pull/3106
  
    @zentol 
    what do you think about remove 
    if (numBytesOut != null) {
    
    and replace
     numBytesOut = metrics.getNumBytesOutCounter();
    
    with
    
    + if (metrics.getNumBytesOutCounter() != null) {
    +    numBytesOut = metrics.getNumBytesOutCounter();
    + } else {
    +    numBytesOut = new NullCounter();
    + }
    
    where NullCounter have empty implementation for every method,
    
    prof:
    we do null check in one place, because sometime we may forget to do it
    
    cons:
    sometimes we broke devirtualization and inlining for counter.inc(..) method


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message