You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by bowenli86 <gi...@git.apache.org> on 2017/08/09 21:16:06 UTC
[GitHub] flink pull request #4508: [FLINK-7405][metrics] Reduce excessive warning log...
GitHub user bowenli86 opened a pull request:
https://github.com/apache/flink/pull/4508
[FLINK-7405][metrics] Reduce excessive warning logging from DatadogHttpReporter
## What is the purpose of the change
DatadogHttpReporter is logging too much when there's a connection timeout, and we need to reduce the amount of logging noise.
The excessive logging looks like:
```
2017-08-07 19:30:54,408 WARN org.apache.flink.metrics.datadog.DatadogHttpReporter - Failed reporting metrics to Datadog.
java.net.SocketTimeoutException: timeout
at org.apache.flink.shaded.okio.Okio$4.newTimeoutException(Okio.java:227)
at org.apache.flink.shaded.okio.AsyncTimeout.exit(AsyncTimeout.java:284)
at org.apache.flink.shaded.okio.AsyncTimeout$2.read(AsyncTimeout.java:240)
at org.apache.flink.shaded.okio.RealBufferedSource.indexOf(RealBufferedSource.java:344)
at org.apache.flink.shaded.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:216)
at org.apache.flink.shaded.okio.RealBufferedSource.readUtf8LineStrict(RealBufferedSource.java:210)
at org.apache.flink.shaded.okhttp3.internal.http1.Http1Codec.readResponseHeaders(Http1Codec.java:189)
at org.apache.flink.shaded.okhttp3.internal.http.CallServerInterceptor.intercept(CallServerInterceptor.java:75)
at org.apache.flink.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at org.apache.flink.shaded.okhttp3.internal.connection.ConnectInterceptor.intercept(ConnectInterceptor.java:45)
at org.apache.flink.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at org.apache.flink.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at org.apache.flink.shaded.okhttp3.internal.cache.CacheInterceptor.intercept(CacheInterceptor.java:93)
at org.apache.flink.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at org.apache.flink.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at org.apache.flink.shaded.okhttp3.internal.http.BridgeInterceptor.intercept(BridgeInterceptor.java:93)
at org.apache.flink.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at org.apache.flink.shaded.okhttp3.internal.http.RetryAndFollowUpInterceptor.intercept(RetryAndFollowUpInterceptor.java:120)
at org.apache.flink.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:92)
at org.apache.flink.shaded.okhttp3.internal.http.RealInterceptorChain.proceed(RealInterceptorChain.java:67)
at org.apache.flink.shaded.okhttp3.RealCall.getResponseWithInterceptorChain(RealCall.java:185)
at org.apache.flink.shaded.okhttp3.RealCall.execute(RealCall.java:69)
at org.apache.flink.metrics.datadog.DatadogHttpClient.send(DatadogHttpClient.java:85)
at org.apache.flink.metrics.datadog.DatadogHttpReporter.report(DatadogHttpReporter.java:142)
at org.apache.flink.runtime.metrics.MetricRegistry$ReporterTask.run(MetricRegistry.java:381)
at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.read(SocketInputStream.java:204)
at java.net.SocketInputStream.read(SocketInputStream.java:141)
at sun.security.ssl.InputRecord.readFully(InputRecord.java:465)
at sun.security.ssl.InputRecord.read(InputRecord.java:503)
at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:983)
at sun.security.ssl.SSLSocketImpl.readDataRecord(SSLSocketImpl.java:940)
at sun.security.ssl.AppInputStream.read(AppInputStream.java:105)
at org.apache.flink.shaded.okio.Okio$2.read(Okio.java:138)
at org.apache.flink.shaded.okio.AsyncTimeout$2.read(AsyncTimeout.java:236)
... 29 more
```
The logging doesn't matter since DatadogHttpReporter won't retry when it fails sending out requests. Thus, let's reduce it to something as concise as this:
```
2017-08-07 19:30:54,408 WARN org.apache.flink.metrics.datadog.DatadogHttpReporter - Failed reporting metrics to Datadog.
java.net.SocketTimeoutException: timeout
```
## Brief change log
Only log exception message rather than the whole stack trace
## Verifying this change
This change is a trivial rework / code cleanup without any test coverage.
## Does this pull request potentially affect one of the following parts:
## Documentation
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/bowenli86/flink FLINK-7405
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/flink/pull/4508.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 #4508
----
commit 1e9a1e8ea65a56d05c486e4d690bc6f1410b9a58
Author: Bowen Li <bo...@gmail.com>
Date: 2017-08-09T21:11:16Z
FLINK-7405 Reduce excessive warning logging from DatadogHttpReporter
----
---
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 #4508: [FLINK-7405][metrics] Reduce spamming warning logging fro...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:
https://github.com/apache/flink/pull/4508
merging.
---
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 #4508: [FLINK-7405][metrics] Reduce spamming warning logging fro...
Posted by bowenli86 <gi...@git.apache.org>.
Github user bowenli86 commented on the issue:
https://github.com/apache/flink/pull/4508
@zentol Please let me know if this is good :)
---
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 #4508: [FLINK-7405][metrics] Reduce spamming warning logg...
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/flink/pull/4508
---
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 #4508: [FLINK-7405][metrics] Reduce spamming warning logging fro...
Posted by zentol <gi...@git.apache.org>.
Github user zentol commented on the issue:
https://github.com/apache/flink/pull/4508
this way all exceptions are being cutoff, please add a separate catch block for socket timeout exceptions.
---
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 #4508: [FLINK-7405][metrics] Reduce spamming warning logging fro...
Posted by bowenli86 <gi...@git.apache.org>.
Github user bowenli86 commented on the issue:
https://github.com/apache/flink/pull/4508
Make sense
---
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.
---