flink-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (FLINK-9616) DatadogHttpReporter fails to be created due to missing shaded dependency
Date Mon, 09 Jul 2018 22:54:00 GMT

    [ https://issues.apache.org/jira/browse/FLINK-9616?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16537743#comment-16537743
] 

ASF GitHub Bot commented on FLINK-9616:
---------------------------------------

Github user addisonj commented on the issue:

    https://github.com/apache/flink/pull/6183
  
    This is fixed by #6191 


> DatadogHttpReporter fails to be created due to missing shaded dependency
> ------------------------------------------------------------------------
>
>                 Key: FLINK-9616
>                 URL: https://issues.apache.org/jira/browse/FLINK-9616
>             Project: Flink
>          Issue Type: Bug
>          Components: Metrics
>    Affects Versions: 1.5.0
>            Reporter: Addison Higham
>            Priority: Major
>
> When using the DatadogHttpReporter, it fails to instantiate with the following exception:
> {code:java}
> 2018-06-19 06:01:19,640 INFO org.apache.flink.runtime.metrics.MetricRegistryImpl - Configuring
dghttp with {apikey=<redacted>, tags=<redacted>, class=org.apache.flink.metrics.datadog.DatadogHttpReporter}.
> 2018-06-19 06:01:19,642 ERROR org.apache.flink.runtime.metrics.MetricRegistryImpl - Could
not instantiate metrics reporter dghttp. Metrics might not be exposed/reported.
> java.lang.NoClassDefFoundError: org/apache/flink/shaded/okhttp3/MediaType
> at org.apache.flink.metrics.datadog.DatadogHttpClient.<clinit>(DatadogHttpClient.java:45)
> at org.apache.flink.metrics.datadog.DatadogHttpReporter.open(DatadogHttpReporter.java:105)
> at org.apache.flink.runtime.metrics.MetricRegistryImpl.<init>(MetricRegistryImpl.java:150)
> at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.createMetricRegistry(ClusterEntrypoint.java:413)
> at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.initializeServices(ClusterEntrypoint.java:274)
> at org.apache.flink.mesos.entrypoint.MesosSessionClusterEntrypoint.initializeServices(MesosSessionClusterEntrypoint.java:92)
> at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(ClusterEntrypoint.java:225)
> at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startCluster$0(ClusterEntrypoint.java:189)
> at java.security.AccessController.doPrivileged(Native Method)
> at javax.security.auth.Subject.doAs(Subject.java:422)
> at org.apache.hadoop.security.UserGroupInformation.doAs(UserGroupInformation.java:1889)
> at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(HadoopSecurityContext.java:41)
> at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(ClusterEntrypoint.java:188)
> at org.apache.flink.mesos.entrypoint.MesosSessionClusterEntrypoint.main(MesosSessionClusterEntrypoint.java:181)
> Caused by: java.lang.ClassNotFoundException: org.apache.flink.shaded.okhttp3.MediaType
> at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
> at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
> ... 14 more
> {code}
> Looking at the pom.xml for `flink-metrics-datadog` it looks like that dependency is intended
to be shaded and included in the jar, however, when we build the jar we see the following
lines:
>  
> {noformat}
> $ mvn package
> [INFO] Scanning for projects...
> [INFO] 
> [INFO] ------------------------------------------------------------------------
> [INFO] Building flink-metrics-datadog 1.5.0
> [INFO] ------------------------------------------------------------------------
> ....
> [INFO] --- maven-shade-plugin:3.0.0:shade (shade-flink) @ flink-metrics-datadog ---
> [INFO] Excluding com.squareup.okhttp3:okhttp:jar:3.7.0 from the shaded jar.
> [INFO] Excluding com.squareup.okio:okio:jar:1.12.0 from the shaded jar.
> [INFO] Including org.apache.flink:force-shading:jar:1.5.0 in the shaded jar.
> [INFO] Replacing original artifact with shaded artifact.
> {noformat}
> And inspecting the built jar:
> {noformat}
> $ jar tf flink-metrics-datadog-1.5.0.jar
> META-INF/
> META-INF/MANIFEST.MF
> org/
> org/apache/
> org/apache/flink/
> org/apache/flink/metrics/
> org/apache/flink/metrics/datadog/
> org/apache/flink/metrics/datadog/DatadogHttpClient$EmptyCallback.class
> org/apache/flink/metrics/datadog/DMetric.class
> org/apache/flink/metrics/datadog/DSeries.class
> org/apache/flink/metrics/datadog/DGauge.class
> org/apache/flink/metrics/datadog/DatadogHttpReporter.class
> org/apache/flink/metrics/datadog/DatadogHttpClient.class
> org/apache/flink/metrics/datadog/MetricType.class
> org/apache/flink/metrics/datadog/DatadogHttpReporter$DatadogHttpRequest.class
> org/apache/flink/metrics/datadog/DMeter.class
> org/apache/flink/metrics/datadog/DCounter.class
> META-INF/DEPENDENCIES
> META-INF/maven/
> META-INF/maven/org.apache.flink/
> META-INF/maven/org.apache.flink/flink-metrics-datadog/
> META-INF/maven/org.apache.flink/flink-metrics-datadog/pom.xml
> META-INF/maven/org.apache.flink/flink-metrics-datadog/pom.properties
> META-INF/NOTICE
> {noformat}
> We don't see the included dependencies
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Mime
View raw message