From issues-return-176187-apmail-flink-issues-archive=flink.apache.org@flink.apache.org Mon Jul 9 22:54:02 2018 Return-Path: X-Original-To: apmail-flink-issues-archive@minotaur.apache.org Delivered-To: apmail-flink-issues-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 8DB5718E68 for ; Mon, 9 Jul 2018 22:54:02 +0000 (UTC) Received: (qmail 49225 invoked by uid 500); 9 Jul 2018 22:54:02 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 49187 invoked by uid 500); 9 Jul 2018 22:54:02 -0000 Mailing-List: contact issues-help@flink.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@flink.apache.org Delivered-To: mailing list issues@flink.apache.org Received: (qmail 49178 invoked by uid 99); 9 Jul 2018 22:54:02 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd1-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 09 Jul 2018 22:54:02 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd1-us-west.apache.org (ASF Mail Server at spamd1-us-west.apache.org) with ESMTP id 71D41C930E for ; Mon, 9 Jul 2018 22:54:01 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd1-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -109.501 X-Spam-Level: X-Spam-Status: No, score=-109.501 tagged_above=-999 required=6.31 tests=[ENV_AND_HDR_SPF_MATCH=-0.5, KAM_ASCII_DIVIDERS=0.8, RCVD_IN_DNSWL_MED=-2.3, SPF_PASS=-0.001, USER_IN_DEF_SPF_WL=-7.5, USER_IN_WHITELIST=-100] autolearn=disabled Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd1-us-west.apache.org [10.40.0.7]) (amavisd-new, port 10024) with ESMTP id p6xv21Dx_Fyv for ; Mon, 9 Jul 2018 22:54:00 +0000 (UTC) Received: from mailrelay1-us-west.apache.org (mailrelay1-us-west.apache.org [209.188.14.139]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTP id E806A5F385 for ; Mon, 9 Jul 2018 22:54:00 +0000 (UTC) Received: from jira-lw-us.apache.org (unknown [207.244.88.139]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id 6C6C9E0EF5 for ; Mon, 9 Jul 2018 22:54:00 +0000 (UTC) Received: from jira-lw-us.apache.org (localhost [127.0.0.1]) by jira-lw-us.apache.org (ASF Mail Server at jira-lw-us.apache.org) with ESMTP id 3024F23E94 for ; Mon, 9 Jul 2018 22:54:00 +0000 (UTC) Date: Mon, 9 Jul 2018 22:54:00 +0000 (UTC) From: "ASF GitHub Bot (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-9616) DatadogHttpReporter fails to be created due to missing shaded dependency MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-9616?page=3Dcom.atlassian= .jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=3D1653= 7744#comment-16537744 ]=20 ASF GitHub Bot commented on FLINK-9616: --------------------------------------- Github user addisonj closed the pull request at: https://github.com/apache/flink/pull/6183 > 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 foll= owing exception: > {code:java} > 2018-06-19 06:01:19,640 INFO org.apache.flink.runtime.metrics.MetricRegis= tryImpl - Configuring dghttp with {apikey=3D, tags=3D, = class=3Dorg.apache.flink.metrics.datadog.DatadogHttpReporter}. > 2018-06-19 06:01:19,642 ERROR org.apache.flink.runtime.metrics.MetricRegi= stryImpl - 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.(DatadogHtt= pClient.java:45) > at org.apache.flink.metrics.datadog.DatadogHttpReporter.open(DatadogHttpR= eporter.java:105) > at org.apache.flink.runtime.metrics.MetricRegistryImpl.(MetricRegis= tryImpl.java:150) > at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.createMetricRegi= stry(ClusterEntrypoint.java:413) > at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.initializeServic= es(ClusterEntrypoint.java:274) > at org.apache.flink.mesos.entrypoint.MesosSessionClusterEntrypoint.initia= lizeServices(MesosSessionClusterEntrypoint.java:92) > at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.runCluster(Clust= erEntrypoint.java:225) > at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.lambda$startClus= ter$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(UserGroupInformat= ion.java:1889) > at org.apache.flink.runtime.security.HadoopSecurityContext.runSecured(Had= oopSecurityContext.java:41) > at org.apache.flink.runtime.entrypoint.ClusterEntrypoint.startCluster(Clu= sterEntrypoint.java:188) > at org.apache.flink.mesos.entrypoint.MesosSessionClusterEntrypoint.main(M= esosSessionClusterEntrypoint.java:181) > Caused by: java.lang.ClassNotFoundException: org.apache.flink.shaded.okht= tp3.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 dep= endency is intended to be shaded and included in the jar, however, when we = build the jar we see the following lines: > =C2=A0 > {noformat} > $ mvn package > [INFO] Scanning for projects... > [INFO]=20 > [INFO] ------------------------------------------------------------------= ------ > [INFO] Building flink-metrics-datadog 1.5.0 > [INFO] ------------------------------------------------------------------= ------ > .... > [INFO] --- maven-shade-plugin:3.0.0:shade (shade-flink) @ flink-metrics-d= atadog --- > [INFO] Excluding com.squareup.okhttp3:okhttp:jar:3.7.0 from the shaded ja= r. > [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 j= ar. > [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.c= lass > 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 > =C2=A0 -- This message was sent by Atlassian JIRA (v7.6.3#76005)