[
https://issues.apache.org/jira/browse/FLINK-6247?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15974427#comment-15974427
]
ASF GitHub Bot commented on FLINK-6247:
---------------------------------------
Github user fhueske commented on a diff in the pull request:
https://github.com/apache/flink/pull/3666#discussion_r112152396
--- Diff: flink-libraries/flink-table/pom.xml ---
@@ -231,6 +237,25 @@ under the License.
</configuration>
</plugin>
+ <!-- build a jar-with-dependencies, to be included in
the 'opt' build folder -->
+ <plugin>
--- End diff --
Let's build the jar with dependencies as default jar using the shade plugin.
Currently, the default jar already contains most dependencies, including
Calcite (with relocates Guava) and Reflections. We only need to add Janino to
the shade plugin configuration (add `<include>org.codehaus.janino:*</include>`
after `<include>org.reflections:*</include>`) and then we can use the default
jar and put it into `./opt` because it contains all dependencies.
> Build a jar-with-dependencies for flink-table and put it into ./opt
> -------------------------------------------------------------------
>
> Key: FLINK-6247
> URL: https://issues.apache.org/jira/browse/FLINK-6247
> Project: Flink
> Issue Type: Improvement
> Components: Build System, Table API & SQL
> Affects Versions: 1.3.0
> Reporter: Fabian Hueske
> Assignee: sunjincheng
>
> Due to a problem with Calcite and the unloading of classes, user-code
> classloaders that include Calcite cannot be garbage collected. This is a
> problem for long-running clusters that execute multiple Table API / SQL
> programs with fat JARs that include the flink-table dependency. Each executed
> program comes with an own user-code classloader that cannot be cleaned up
> later.
> As a workaround, we recommend to copy the flink-table dependency into the
> ./lib folder. However, we do not have a jar file with all required transitive
> dependencies (Calcite, Janino, etc). Hence, users would need to build this
> jar file themselves or copy all jars into ./lib.
> This issue is about creating a jar-with-dependencies and adding it to the
> ./opt folder. Users can then copy the jar file from ./opt to ./lib to include
> the table API in the classpath of Flink.
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)