Skip to content

Commit

Permalink
[FLINK-2499] [scripts] Warning message for hosts starting multiple da…
Browse files Browse the repository at this point in the history
…emons

Closes apache#1071
  • Loading branch information
mbalassi committed Aug 27, 2015
1 parent 0807eec commit 91069d1
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions flink-dist/src/main/flink-bin/bin/flink-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,12 @@ case $STARTSTOP in
rotateLogFile $log
rotateLogFile $out

# Print a warning if daemons are already running on host
if [ -f $pid ]; then
count=$(wc -l $pid | awk '{print $1}')
echo "[WARNING] $count instance(s) of $DAEMON are already running on $HOSTNAME."
fi

echo "Starting $DAEMON daemon on host $HOSTNAME."
$JAVA_RUN $JVM_ARGS ${FLINK_ENV_JAVA_OPTS} "${log_setting[@]}" -classpath "`manglePathList "$FLINK_TM_CLASSPATH:$INTERNAL_HADOOP_CLASSPATHS"`" ${CLASS_TO_RUN} ${ARGS} > "$out" 2>&1 < /dev/null &
mypid=$!
Expand Down

0 comments on commit 91069d1

Please sign in to comment.