Skip to content

Commit

Permalink
[FLINK-6628] Fix start scripts on Windows
Browse files Browse the repository at this point in the history
This closes apache#3954.
  • Loading branch information
zentol committed May 20, 2017
1 parent b9e75ff commit 0a5b98e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 6 deletions.
2 changes: 1 addition & 1 deletion flink-dist/src/main/flink-bin/bin/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -391,7 +391,7 @@ rotateLogFilesWithPrefix() {
dir=$1
prefix=$2
while read -r log ; do
rotateLogFile $log
rotateLogFile "$log"
# find distinct set of log file names, ignoring the rotation number (trailing dot and digit)
done < <(find "$dir" ! -type d -path "${prefix}*" | sed -E s/\.[0-9]+$// | sort | uniq)
}
Expand Down
2 changes: 1 addition & 1 deletion flink-dist/src/main/flink-bin/bin/flink-daemon.sh
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ case $STARTSTOP in

(start)
# Rotate log files
rotateLogFilesWithPrefix $FLINK_LOG_DIR $FLINK_LOG_PREFIX
rotateLogFilesWithPrefix "$FLINK_LOG_DIR" "$FLINK_LOG_PREFIX"

# Print a warning if daemons are already running on host
if [ -f $pid ]; then
Expand Down
6 changes: 2 additions & 4 deletions flink-dist/src/main/flink-bin/bin/taskmanager.sh
Original file line number Diff line number Diff line change
Expand Up @@ -75,11 +75,9 @@ fi
if [[ $STARTSTOP == "start-foreground" ]]; then
exec "${FLINK_BIN_DIR}"/flink-console.sh taskmanager "${args[@]}"
else
TM_COMMAND="${FLINK_BIN_DIR}/flink-daemon.sh $STARTSTOP taskmanager ${args[@]}"

if [[ $FLINK_TM_COMPUTE_NUMA == "false" ]]; then
# Start a single TaskManager
$TM_COMMAND
"${FLINK_BIN_DIR}"/flink-daemon.sh $STARTSTOP taskmanager "${args[@]}"
else
# Example output from `numactl --show` on an AWS c4.8xlarge:
# policy: default
Expand All @@ -91,7 +89,7 @@ else
read -ra NODE_LIST <<< $(numactl --show | grep "^nodebind: ")
for NODE_ID in "${NODE_LIST[@]:1}"; do
# Start a TaskManager for each NUMA node
numactl --membind=$NODE_ID --cpunodebind=$NODE_ID -- $TM_COMMAND
numactl --membind=$NODE_ID --cpunodebind=$NODE_ID -- "${FLINK_BIN_DIR}"/flink-daemon.sh $STARTSTOP taskmanager "${args[@]}"
done
fi
fi

0 comments on commit 0a5b98e

Please sign in to comment.