Skip to content

Commit

Permalink
update the start command
Browse files Browse the repository at this point in the history
  • Loading branch information
1996fanrui committed Mar 19, 2024
1 parent 6574017 commit c5cb894
Showing 1 changed file with 30 additions and 3 deletions.
33 changes: 30 additions & 3 deletions flink-autoscaler-standalone/src/main/bin/start-fa.sh
Original file line number Diff line number Diff line change
@@ -1,9 +1,26 @@
#!/bin/bash
################################################################################
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership. The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
################################################################################

export FA_HOME=${FA_HOME:-/opt/flink-autoscaler/active}
export FA_CONF_DIR=${FA_CONF_DIR:-/etc/flink-confs/flink-autoscaler/active/conf}
export FA_LOG_DIR=${FA_LOG_DIR:-/data/flink/log/flink-autoscaler}
export FM_CONF_YAML=${FA_CONF_DIR}/fi-conf.yaml
export FM_CONF_YAML=${FA_CONF_DIR}/fa-conf.yaml
export HADOOP_CONF_DIR="/etc/hadoop-client"
export HADOOP_USER_RPCPASSWORD=$(grep 'hadoop.user.rpcpassword' ${FM_CONF_YAML} | awk '{print $2}')

Expand All @@ -26,6 +43,16 @@ echo "FA_JVM_ARGS: ${FA_JVM_ARGS}"
echo "FA_CLASSPATH: ${FA_CLASSPATH}"
echo "LOG_SETTING: ${LOG_SETTING}"

exec /opt/jdk-17.0.5/bin/java ${FA_TIMEZONE} ${FA_JVM_ARGS} ${LOG_SETTING} -classpath "${FA_CLASSPATH}" org.apache.flink.autoscaler.standalone.StandaloneAutoscalerEntrypoint
# exec /opt/jdk-17.0.5/bin/java ${FA_TIMEZONE} ${FA_JVM_ARGS} ${LOG_SETTING} -classpath "${FA_CLASSPATH}" org.apache.flink.autoscaler.standalone.StandaloneAutoscalerEntrypoint

# nohup /opt/jdk-17.0.5/bin/java -classpath ./flink-autoscaler-standalone-1.8-SNAPSHOT.jar org.apache.flink.autoscaler.standalone.StandaloneAutoscalerEntrypoint > autoscaler.log &
JDBC_DRIVER_JAR=./mysql-connector-java-8.0.30.jar
# export the password of jdbc state store & jdbc event handler
export JDBC_PWD=123456

exec /opt/jdk-17.0.5/bin/java -classpath ./flink-autoscaler-standalone-1.8-SNAPSHOT.jar:${JDBC_DRIVER_JAR} \
org.apache.flink.autoscaler.standalone.StandaloneAutoscalerEntrypoint \
--autoscaler.standalone.state-store.type jdbc \
--autoscaler.standalone.event-handler.type jdbc \
--autoscaler.standalone.jdbc.url jdbc:mysql://xxx:6606/db_name \
--autoscaler.standalone.jdbc.username flink \
> autoscaler.log

0 comments on commit c5cb894

Please sign in to comment.