zentol commented on a change in pull request #11863:
URL: https://github.com/apache/flink/pull/11863#discussion_r413672750



##########
File path: flink-dist/src/main/flink-bin/mesos-bin/mesos-appmaster.sh
##########
@@ -17,29 +17,10 @@
 # limitations under the License.
 
################################################################################
 
-bin=`dirname "$0"`
-bin=`cd "$bin"; pwd`
+bin=$(dirname "$0")
+bin=$(cd "${bin}" || exit; pwd)
 
 # get Flink config
-. "$bin"/config.sh
+. "${bin}"/config.sh
 
-if [ "$FLINK_IDENT_STRING" = "" ]; then
-    FLINK_IDENT_STRING="$USER"
-fi
-
-CC_CLASSPATH=`manglePathList 
$(constructFlinkClassPath):$INTERNAL_HADOOP_CLASSPATHS`
-
-log="${FLINK_LOG_DIR}/flink-${FLINK_IDENT_STRING}-mesos-appmaster-${HOSTNAME}.log"
-log_setting="-Dlog.file="$log" 
-Dlog4j.configuration=file:"$FLINK_CONF_DIR"/log4j.properties 
-Dlog4j.configurationFile=file:"$FLINK_CONF_DIR"/log4j.properties 
-Dlogback.configurationFile=file:"$FLINK_CONF_DIR"/logback.xml"
-
-ENTRY_POINT=org.apache.flink.mesos.entrypoint.MesosSessionClusterEntrypoint
-
-exec $JAVA_RUN $JVM_ARGS -classpath "$CC_CLASSPATH" $log_setting 
${ENTRY_POINT} "$@"
-
-rc=$?
-
-if [[ $rc -ne 0 ]]; then
-    echo "Error while starting the mesos application master. Please check 
${log} for more details."
-fi
-
-exit $rc
+exec "${FLINK_BIN_DIR}"/mesos-jobmanager.sh 
"org.apache.flink.mesos.entrypoint.MesosSessionClusterEntrypoint" "$@"

Review comment:
       is the `exec` actually necessary? I see both approaches in 
`taskmanager.sh`; would be good to make a conscious decision to pick one.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


Reply via email to