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-6176) Add JARs to CLASSPATH deterministically
Date Wed, 29 Mar 2017 16:25:41 GMT

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

ASF GitHub Bot commented on FLINK-6176:

Github user EronWright commented on the issue:

    With respect to making this change for Mesos, look to `mesos-appmaster.sh` and `mesos-taskmanager.sh`
which produce the classpath.  Those scripts do import `config.sh` but don't use `constructFlinkClassPath`
at the moment, related to inclusion of the Hadoop classpath I believe.  But there's potential
for unification.
    Note that the `lib` directory is scanned recursively; please verify the behavior in that
    Overall this change seems like a hack attempting to mask a true conflict (reportedly between
the Flink and kinesis connector libs).   Seems to me that if ordering matters (and i hope
it doesn't), placing Flink last would tend to destabilize the system.

> Add JARs to CLASSPATH deterministically
> ---------------------------------------
>                 Key: FLINK-6176
>                 URL: https://issues.apache.org/jira/browse/FLINK-6176
>             Project: Flink
>          Issue Type: Bug
>          Components: Core
>    Affects Versions: 1.2.0
>            Reporter: Scott Kidder
>            Assignee: Greg Hogan
>             Fix For: 1.3.0
> The {{config.sh}} script uses the following shell-script function to build the {{FLINK_CLASSPATH}}
variable from a listing of JAR files in the {{$FLINK_LIB_DIR}} directory:
> {code}
> constructFlinkClassPath() {
>     while read -d '' -r jarfile ; do
>         if [[ $FLINK_CLASSPATH = "" ]]; then
>             FLINK_CLASSPATH="$jarfile";
>         else
>             FLINK_CLASSPATH="$FLINK_CLASSPATH":"$jarfile"
>         fi
>     done < <(find "$FLINK_LIB_DIR" ! -type d -name '*.jar' -print0)
> }
> {code}
> The {{find}} command as specified will return files in directory-order, which varies
by OS and filesystem.
> The inconsistent ordering of directory contents caused problems for me when installing
a Flink Docker image onto new machine with a newer version of Docker and different filesystem
(UFS). The differences in the Docker filesystem implementation led to different ordering of
the directory contents; this affected the {{FLINK_CLASSPATH}} ordering and generated very
puzzling {{NoClassNotFoundException}} errors when running my Flink application.
> This should be addressed by deterministically ordering JAR files added to the {{FLINK_CLASSPATH}}.

This message was sent by Atlassian JIRA

View raw message