提交 0a5b98e3 编写于 作者: Z zentol

[FLINK-6628] Fix start scripts on Windows

This closes #3954.
上级 b9e75ff0
...@@ -391,7 +391,7 @@ rotateLogFilesWithPrefix() { ...@@ -391,7 +391,7 @@ rotateLogFilesWithPrefix() {
dir=$1 dir=$1
prefix=$2 prefix=$2
while read -r log ; do while read -r log ; do
rotateLogFile $log rotateLogFile "$log"
# find distinct set of log file names, ignoring the rotation number (trailing dot and digit) # 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) done < <(find "$dir" ! -type d -path "${prefix}*" | sed -E s/\.[0-9]+$// | sort | uniq)
} }
......
...@@ -97,7 +97,7 @@ case $STARTSTOP in ...@@ -97,7 +97,7 @@ case $STARTSTOP in
(start) (start)
# Rotate log files # 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 # Print a warning if daemons are already running on host
if [ -f $pid ]; then if [ -f $pid ]; then
......
...@@ -75,11 +75,9 @@ fi ...@@ -75,11 +75,9 @@ fi
if [[ $STARTSTOP == "start-foreground" ]]; then if [[ $STARTSTOP == "start-foreground" ]]; then
exec "${FLINK_BIN_DIR}"/flink-console.sh taskmanager "${args[@]}" exec "${FLINK_BIN_DIR}"/flink-console.sh taskmanager "${args[@]}"
else else
TM_COMMAND="${FLINK_BIN_DIR}/flink-daemon.sh $STARTSTOP taskmanager ${args[@]}"
if [[ $FLINK_TM_COMPUTE_NUMA == "false" ]]; then if [[ $FLINK_TM_COMPUTE_NUMA == "false" ]]; then
# Start a single TaskManager # Start a single TaskManager
$TM_COMMAND "${FLINK_BIN_DIR}"/flink-daemon.sh $STARTSTOP taskmanager "${args[@]}"
else else
# Example output from `numactl --show` on an AWS c4.8xlarge: # Example output from `numactl --show` on an AWS c4.8xlarge:
# policy: default # policy: default
...@@ -91,7 +89,7 @@ else ...@@ -91,7 +89,7 @@ else
read -ra NODE_LIST <<< $(numactl --show | grep "^nodebind: ") read -ra NODE_LIST <<< $(numactl --show | grep "^nodebind: ")
for NODE_ID in "${NODE_LIST[@]:1}"; do for NODE_ID in "${NODE_LIST[@]:1}"; do
# Start a TaskManager for each NUMA node # 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 done
fi fi
fi fi
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册