flink-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From trohrm...@apache.org
Subject flink git commit: [FLINK-7097] [scripts] Enable Flip-6 TaskExecutor to be started with taskmanager.sh
Date Wed, 05 Jul 2017 11:34:00 GMT
Repository: flink
Updated Branches:
  refs/heads/master 40dce2909 -> 9c4676414


[FLINK-7097] [scripts] Enable Flip-6 TaskExecutor to be started with taskmanager.sh

The taskmanager.sh script now supports to start a TaskExecutor by providing flip6 as
a second argument to the script.

This closes #4253.


Project: http://git-wip-us.apache.org/repos/asf/flink/repo
Commit: http://git-wip-us.apache.org/repos/asf/flink/commit/9c467641
Tree: http://git-wip-us.apache.org/repos/asf/flink/tree/9c467641
Diff: http://git-wip-us.apache.org/repos/asf/flink/diff/9c467641

Branch: refs/heads/master
Commit: 9c4676414c77be6e15ae48144314a23f30791c02
Parents: 40dce29
Author: Till Rohrmann <trohrmann@apache.org>
Authored: Tue Jul 4 15:37:15 2017 +0200
Committer: Till Rohrmann <trohrmann@apache.org>
Committed: Wed Jul 5 13:33:10 2017 +0200

----------------------------------------------------------------------
 flink-dist/src/main/flink-bin/bin/flink-console.sh |  4 ++++
 flink-dist/src/main/flink-bin/bin/flink-daemon.sh  |  4 ++++
 flink-dist/src/main/flink-bin/bin/taskmanager.sh   | 13 +++++++++----
 3 files changed, 17 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/flink/blob/9c467641/flink-dist/src/main/flink-bin/bin/flink-console.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/flink-console.sh b/flink-dist/src/main/flink-bin/bin/flink-console.sh
index e60b101..560c1de 100644
--- a/flink-dist/src/main/flink-bin/bin/flink-console.sh
+++ b/flink-dist/src/main/flink-bin/bin/flink-console.sh
@@ -38,6 +38,10 @@ case $SERVICE in
         CLASS_TO_RUN=org.apache.flink.runtime.taskmanager.TaskManager
     ;;
 
+    (taskexecutor)
+        CLASS_TO_RUN=org.apache.flink.runtime.taskexecutor.TaskManagerRunner
+    ;;
+
     (zookeeper)
         CLASS_TO_RUN=org.apache.flink.runtime.zookeeper.FlinkZooKeeperQuorumPeer
     ;;

http://git-wip-us.apache.org/repos/asf/flink/blob/9c467641/flink-dist/src/main/flink-bin/bin/flink-daemon.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/flink-daemon.sh b/flink-dist/src/main/flink-bin/bin/flink-daemon.sh
index e897a49..254c3c4 100644
--- a/flink-dist/src/main/flink-bin/bin/flink-daemon.sh
+++ b/flink-dist/src/main/flink-bin/bin/flink-daemon.sh
@@ -38,6 +38,10 @@ case $DAEMON in
         CLASS_TO_RUN=org.apache.flink.runtime.taskmanager.TaskManager
     ;;
 
+    (taskexecutor)
+        CLASS_TO_RUN=org.apache.flink.runtime.taskexecutor.TaskManagerRunner
+    ;;
+
     (zookeeper)
         CLASS_TO_RUN=org.apache.flink.runtime.zookeeper.FlinkZooKeeperQuorumPeer
     ;;

http://git-wip-us.apache.org/repos/asf/flink/blob/9c467641/flink-dist/src/main/flink-bin/bin/taskmanager.sh
----------------------------------------------------------------------
diff --git a/flink-dist/src/main/flink-bin/bin/taskmanager.sh b/flink-dist/src/main/flink-bin/bin/taskmanager.sh
index ba4fe1d..7509ac4 100755
--- a/flink-dist/src/main/flink-bin/bin/taskmanager.sh
+++ b/flink-dist/src/main/flink-bin/bin/taskmanager.sh
@@ -18,9 +18,14 @@
 ################################################################################
 
 # Start/stop a Flink TaskManager.
-USAGE="Usage: taskmanager.sh (start|start-foreground|stop|stop-all)"
+USAGE="Usage: taskmanager.sh (start|start-foreground|stop|stop-all) (flip6)"
 
 STARTSTOP=$1
+TYPE=taskmanager
+
+if [[ "$2" == "flip6" ]]; then
+    TYPE=taskexecutor
+fi
 
 if [[ $STARTSTOP != "start" ]] && [[ $STARTSTOP != "start-foreground" ]] &&
[[ $STARTSTOP != "stop" ]] && [[ $STARTSTOP != "stop-all" ]]; then
   echo $USAGE
@@ -73,11 +78,11 @@ if [[ $STARTSTOP == "start" ]] || [[ $STARTSTOP == "start-foreground"
]]; then
 fi
 
 if [[ $STARTSTOP == "start-foreground" ]]; then
-    exec "${FLINK_BIN_DIR}"/flink-console.sh taskmanager "${args[@]}"
+    exec "${FLINK_BIN_DIR}"/flink-console.sh $TYPE "${args[@]}"
 else
     if [[ $FLINK_TM_COMPUTE_NUMA == "false" ]]; then
         # Start a single TaskManager
-        "${FLINK_BIN_DIR}"/flink-daemon.sh $STARTSTOP taskmanager "${args[@]}"
+        "${FLINK_BIN_DIR}"/flink-daemon.sh $STARTSTOP $TYPE "${args[@]}"
     else
         # Example output from `numactl --show` on an AWS c4.8xlarge:
         # policy: default
@@ -89,7 +94,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 -- "${FLINK_BIN_DIR}"/flink-daemon.sh
$STARTSTOP taskmanager "${args[@]}"
+            numactl --membind=$NODE_ID --cpunodebind=$NODE_ID -- "${FLINK_BIN_DIR}"/flink-daemon.sh
$STARTSTOP $TYPE "${args[@]}"
         done
     fi
 fi


Mime
View raw message