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:

    what do you think about remove 
    if (numBytesOut != null) {
    and replace
     numBytesOut = metrics.getNumBytesOutCounter();
    + if (metrics.getNumBytesOutCounter() != null) {
    +    numBytesOut = metrics.getNumBytesOutCounter();
    + } else {
    +    numBytesOut = new NullCounter();
    + }
    where NullCounter have empty implementation for every method,
    we do null check in one place, because sometime we may forget to do it
    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.

View raw message