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 6B2C918A63 for ; Fri, 19 Feb 2016 12:48:18 +0000 (UTC) Received: (qmail 88529 invoked by uid 500); 19 Feb 2016 12:48:18 -0000 Delivered-To: apmail-flink-issues-archive@flink.apache.org Received: (qmail 88481 invoked by uid 500); 19 Feb 2016 12:48:18 -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 88461 invoked by uid 99); 19 Feb 2016 12:48:18 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 19 Feb 2016 12:48:18 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 206A92C14F4 for ; Fri, 19 Feb 2016 12:48:18 +0000 (UTC) Date: Fri, 19 Feb 2016 12:48:18 +0000 (UTC) From: "Till Rohrmann (JIRA)" To: issues@flink.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (FLINK-3441) Revisit quickstarts exclusion policy MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/FLINK-3441?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15154177#comment-15154177 ] Till Rohrmann commented on FLINK-3441: -------------------------------------- Yes the "provided" approach would be the cleanest in my opinion. With SBT you effectively do it as you've described it with IntelliJ. You have a special module which sets automatically all provided dependencies to "compile". So in order to run your job locally you have to choose the classpath of that module. Concerning possible problems with incompatible classes, I think that shading away all of Hadoop's dependencies would make it sound. > Revisit quickstarts exclusion policy > ------------------------------------ > > Key: FLINK-3441 > URL: https://issues.apache.org/jira/browse/FLINK-3441 > Project: Flink > Issue Type: Improvement > Components: Quickstarts > Affects Versions: 1.0.0 > Reporter: Till Rohrmann > Priority: Minor > > Flink provides quickstart projects to quickly set up a Flink project. In order to decrease the size of the resulting jar, the predefined {{pom.xml}} file contains a list of excluded dependencies. > The problem with this approach is two-fold: First of all, the list seems to be rather arbitrary. Why excluding {{org.apache.commons:commons-math}} but not {{org.apache.commons:commons-math3}}? It seems as if this list would have to be kept up to date with every changing dependency of Flink. > Secondly and the more severe problem is the following: The exclusions assume that Flink always provides a compatible version for an excluded dependency. However, since the exclusions are not bound to a specific version, this won't necessarily be true. For example, {{snappy-java}} is excluded from the user job jar, because Flink with Hadoop {{2.3.0}} comes with {{snappy-java:1.0.5}}. However, the {{kafka-clients:0.9.0}} which comes with the {{flink-connector-kafka-0.9}} dependency has a transitive dependency on {{snappy-java:1.1.1.7}}. Consequently, this dependency will be excluded from the user job jar per default. If version {{1.1.1.7}} is not compatible to {{snappy-java:1.0.5}}, then the program will crash at runtime. This will be very hard to understand for the user because it is a very subtle bug since the exclusions also affect the transitive dependencies. -- This message was sent by Atlassian JIRA (v6.3.4#6332)