forked from apache/flink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FLINK-5091] Formalize the Mesos AppMaster environment for docker com…
…patibility - introduced ContainerSpecification. - reworked how the TM container environment is constructed; eliminated - special-case environment variables, file layout. - added dynamic configuration support to GlobalConfiguration. - integrated the SecurityContext into AM/TM runners. - added config setting for Mesos framework user. - support DCOS side-channel authentication. - set the FS default scheme. - made the artifact server more generic (no assumption about existence - of dispatcher, Path-based). - moved some test code related to overriding the JVM’s env. - moved the Mesos containerizer config code to the MesosTaskManagerParameters. This closes apache#2915.
- Loading branch information
Showing
36 changed files
with
2,450 additions
and
501 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
51 changes: 51 additions & 0 deletions
51
flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
#!/usr/bin/env bash | ||
################################################################################ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
################################################################################ | ||
|
||
bin=`dirname "$0"` | ||
bin=`cd "$bin"; pwd` | ||
|
||
# get Flink config | ||
. "$bin"/config.sh | ||
|
||
# auxilliary function to construct a lightweight classpath for the | ||
# Flink AppMaster | ||
constructAppMasterClassPath() { | ||
|
||
while read -d '' -r jarfile ; do | ||
if [[ $CC_CLASSPATH = "" ]]; then | ||
CC_CLASSPATH="$jarfile"; | ||
else | ||
CC_CLASSPATH="$CC_CLASSPATH":"$jarfile" | ||
fi | ||
done < <(find "$FLINK_LIB_DIR" ! -type d -name '*.jar' -print0) | ||
|
||
echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS | ||
} | ||
|
||
CC_CLASSPATH=`manglePathList $(constructAppMasterClassPath)` | ||
|
||
log=flink-appmaster.log | ||
log_setting="-Dlog.file="$log" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j.properties -Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback.xml" | ||
|
||
export FLINK_CONF_DIR | ||
export FLINK_BIN_DIR | ||
export FLINK_LIB_DIR | ||
|
||
$JAVA_RUN $JVM_ARGS -classpath "$CC_CLASSPATH" $log_setting org.apache.flink.mesos.runtime.clusterframework.MesosApplicationMasterRunner "$@" | ||
|
60 changes: 60 additions & 0 deletions
60
flink-dist/src/main/flink-bin/mesos-bin/mesos-taskmanager.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
#!/usr/bin/env bash | ||
################################################################################ | ||
# Licensed to the Apache Software Foundation (ASF) under one | ||
# or more contributor license agreements. See the NOTICE file | ||
# distributed with this work for additional information | ||
# regarding copyright ownership. The ASF licenses this file | ||
# to you under the Apache License, Version 2.0 (the | ||
# "License"); you may not use this file except in compliance | ||
# with the License. You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
################################################################################ | ||
|
||
bin=`dirname "$0"` | ||
bin=`cd "$bin"; pwd` | ||
|
||
# get Flink config | ||
. "$bin"/config.sh | ||
|
||
# auxilliary function to construct a lightweight classpath for the | ||
# Flink TaskManager | ||
constructTaskManagerClassPath() { | ||
|
||
while read -d '' -r jarfile ; do | ||
if [[ $CC_CLASSPATH = "" ]]; then | ||
CC_CLASSPATH="$jarfile"; | ||
else | ||
CC_CLASSPATH="$CC_CLASSPATH":"$jarfile" | ||
fi | ||
done < <(find "$FLINK_LIB_DIR" ! -type d -name '*.jar' -print0) | ||
|
||
echo $CC_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS | ||
} | ||
|
||
CC_CLASSPATH=`manglePathList $(constructTaskManagerClassPath)` | ||
|
||
log=flink-taskmanager.log | ||
log_setting="-Dlog.file="$log" -Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j.properties -Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback.xml" | ||
|
||
# Add precomputed memory JVM options | ||
if [ -z "${FLINK_ENV_JAVA_OPTS_MEM}" ]; then | ||
FLINK_ENV_JAVA_OPTS_MEM="" | ||
fi | ||
export FLINK_ENV_JAVA_OPTS="${FLINK_ENV_JAVA_OPTS} ${FLINK_ENV_JAVA_OPTS_MEM}" | ||
|
||
# Add TaskManager-specific JVM options | ||
export FLINK_ENV_JAVA_OPTS="${FLINK_ENV_JAVA_OPTS} ${FLINK_ENV_JAVA_OPTS_TM}" | ||
|
||
export FLINK_CONF_DIR | ||
export FLINK_BIN_DIR | ||
export FLINK_LIB_DIR | ||
|
||
$JAVA_RUN $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} -classpath "$CC_CLASSPATH" $log_setting org.apache.flink.mesos.runtime.clusterframework.MesosTaskManager "$@" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.