You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by zentol <gi...@git.apache.org> on 2017/01/12 11:51:30 UTC

[GitHub] flink pull request #3103: [FLINK-5464] [metrics] Prevent some NPEs

GitHub user zentol opened a pull request:

    https://github.com/apache/flink/pull/3103

    [FLINK-5464] [metrics] Prevent some NPEs

    This PR prevents some NullPointerExceptions from occurring in the metric system.
    
    - When registering a metric that is null the metric is ignored, and a warning is logged.
      - i.e ```group.counter("counter", null);```
    - The MetricDumpSerialization completely ignores gauges if their value is null.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/zentol/flink 5464_mqs_npe

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/3103.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #3103
    
----
commit 0912848b3ce54842fc6810aa0b041db5547ac690
Author: zentol <ch...@apache.org>
Date:   2017-01-12T11:41:56Z

    [FLINK-5464] [metrics] Ignore metrics that are null

commit 941c83a599221fc57c02605e2c3bc348d70aa8b2
Author: zentol <ch...@apache.org>
Date:   2017-01-12T11:42:26Z

    [FLINK-5464] [metrics] Prevent Gauge NPE in serialization

----


---
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.
---

[GitHub] flink issue #3103: [FLINK-5464] [metrics] Prevent some NPEs

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/3103
  
    yeah I'll have to rethink this :/
    
    I wanted to just ignore gauges returning null (since nothing in the web-interface accounts for that case), but did not adjust the count of metrics that are submitted. urgh.


---
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.
---

[GitHub] flink issue #3103: [FLINK-5464] [metrics] Prevent some NPEs

Posted by rmetzger <gi...@git.apache.org>.
Github user rmetzger commented on the issue:

    https://github.com/apache/flink/pull/3103
  
    While testing this PR, I found that the jobmanager.log is now full with exceptions like this one:
    
    ```
    java.io.EOFException
            at java.io.DataInputStream.readInt(DataInputStream.java:392)
            at org.apache.flink.runtime.metrics.dump.MetricDumpSerialization.deserializeString(MetricDumpSerialization.java:230)
            at org.apache.flink.runtime.metrics.dump.MetricDumpSerialization.deserializeMetricInfo(MetricDumpSerialization.java:278)
            at org.apache.flink.runtime.metrics.dump.MetricDumpSerialization.deserializeGauge(MetricDumpSerialization.java:243)
            at org.apache.flink.runtime.metrics.dump.MetricDumpSerialization.access$800(MetricDumpSerialization.java:47)
            at org.apache.flink.runtime.metrics.dump.MetricDumpSerialization$MetricDumpDeserializer.deserialize(MetricDumpSerialization.java:214)
            at org.apache.flink.runtime.webmonitor.metrics.MetricFetcher.addMetrics(MetricFetcher.java:196)
            at org.apache.flink.runtime.webmonitor.metrics.MetricFetcher.access$500(MetricFetcher.java:58)
            at org.apache.flink.runtime.webmonitor.metrics.MetricFetcher$4.onSuccess(MetricFetcher.java:188)
            at akka.dispatch.OnSuccess.internal(Future.scala:212)
            at akka.dispatch.japi$CallbackBridge.apply(Future.scala:175)
            at akka.dispatch.japi$CallbackBridge.apply(Future.scala:172)
            at scala.PartialFunction$class.applyOrElse(PartialFunction.scala:118)
            at scala.runtime.AbstractPartialFunction.applyOrElse(AbstractPartialFunction.scala:25)
            at scala.concurrent.Future$$anonfun$onSuccess$1.apply(Future.scala:117)
            at scala.concurrent.Future$$anonfun$onSuccess$1.apply(Future.scala:115)
            at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:32)
            at java.util.concurrent.ForkJoinTask$AdaptedRunnable.exec(ForkJoinTask.java:1265)
            at java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:334)
            at java.util.concurrent.ForkJoinWorkerThread.execTask(ForkJoinWorkerThread.java:604)
            at java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:784)
            at java.util.concurrent.ForkJoinPool.work(ForkJoinPool.java:646)
            at java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:398)
    ```



---
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.
---

[GitHub] flink pull request #3103: [FLINK-5464] [metrics] Prevent some NPEs

Posted by zentol <gi...@git.apache.org>.
Github user zentol closed the pull request at:

    https://github.com/apache/flink/pull/3103


---
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.
---

[GitHub] flink issue #3103: [FLINK-5464] [metrics] Prevent some NPEs

Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:

    https://github.com/apache/flink/pull/3103
  
    cc @rmetzger 


---
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.
---