You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/03/12 12:12:58 UTC

[incubator-inlong] branch master updated: [INLONG-3075][InLong] Add FLINK_HOME param into standalone script (#3088)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new 0ec4e30  [INLONG-3075][InLong] Add FLINK_HOME param into standalone script (#3088)
0ec4e30 is described below

commit 0ec4e302d5b23dcc8c8c7b3ecde8f30f97cd3ab9
Author: crancchen <97...@users.noreply.github.com>
AuthorDate: Sat Mar 12 20:12:54 2022 +0800

    [INLONG-3075][InLong] Add FLINK_HOME param into standalone script (#3088)
---
 bin/inlong-daemon | 14 ++++----------
 conf/inlong.conf  |  5 +++++
 2 files changed, 9 insertions(+), 10 deletions(-)

diff --git a/bin/inlong-daemon b/bin/inlong-daemon
index 9de429d..92d7088 100644
--- a/bin/inlong-daemon
+++ b/bin/inlong-daemon
@@ -191,11 +191,9 @@ start_inlong_sort() {
   else
     echo "Currently, the system starts Flink, which is used to process sort tasks"
   fi
-  # This file is mainly used to find the Flink bin directory
-  flagfile=$(find / -name find-flink-home.sh)
-  flink_bin=$(dirname $flagfile)
+
   cd $INLONG_HOME
-  $flink_bin/flink run -c org.apache.inlong.sort.flink.Entrance inlong-sort/sort-dist*.jar \
+  $FLINK_HOME/bin/flink run -c org.apache.inlong.sort.flink.Entrance inlong-sort/sort-dist*.jar \
   --cluster-id $sort_app_name --zookeeper.quorum $zkserver_addr --zookeeper.path.root $cluster_zk_root \
   --source.type $source_type --sink.type $sink_type &
 }
@@ -301,17 +299,14 @@ stop_inlong_sort() {
     echo "cli_frontend stopped "
   fi
   echo "stop sort flink job"
-  #This file is mainly used to find the Flink bin directory
-  flagfile=$(find / -name find-flink-home.sh)
-  flink_bin=$(dirname $flagfile)
-  runjob=$($flink_bin/flink list -r | grep "$sort_app_name")
+  runjob=$($FLINK_HOME/bin/flink list -r | grep "$sort_app_name")
   OLD_IFS="$IFS"
   IFS=":"
   array=($runjob)
   IFS="$OLD_IFS"
   jobId=$(echo "${array[3]}")
   echo $jobId
-  $flink_bin/flink cancel $jobId
+  $FLINK_HOME/bin/flink cancel $jobId
 }
 
 # stop inlong
@@ -341,7 +336,6 @@ stop_inlong_all() {
   stop_inlong_sort
 }
 
-
 if [[ "$COMMAND" == start || "$COMMAND" == stop ]]; then
   case $SERVICE in
   tubemaster | tubebroker | tubemanager | manager | dashboard | dataproxy | agent | sort | audit)
diff --git a/conf/inlong.conf b/conf/inlong.conf
index 29486d5..546ea57 100644
--- a/conf/inlong.conf
+++ b/conf/inlong.conf
@@ -121,6 +121,11 @@ inlong_web_port=80
 docker_inlong_web_port=80
 ###############################################################################
 
+# flink_home(Required)
+###############################################################################
+FLINK_HOME=/tmp/flink
+###############################################################################
+
 # local_ip(Required)
 ###############################################################################
 local_ip=YOU_LOCAL_IP