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 [email protected] or file a JIRA ticket
with INFRA.
---