Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update checkEnv.sh #4874

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions linkis-dist/bin/checkEnv.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,36 @@ shellDir=`dirname $0`
workDir=`cd ${shellDir}/..;pwd`
source ${workDir}/bin/common.sh
source ${workDir}/deploy-config/linkis-env.sh
source ${workDir}/deploy-config/db.sh

function checkTrino(){
TrinoDISAddress="echo $TRINO_DISCOVERY_URL|awk -F'\"' '{print $1}'|awk -F';' '{print $1}'"
curl $TrinoDISAddress > /dev/null 2>&1
isSuccess "execute cmd: Trino service check"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

batter to check server status is ok

}

function checkElasticSearch(){
ESRestfulAddress="echo $ES_RESTFUL_URL|awk -F'\"' '{print $1}'|awk -F';' '{print $1}'"
curl $ESRestfulAddress> /dev/null 2>&1
isSuccess "execute cmd: ElasticSearch service check"
}

function checkFlink(){
FlinkRestfulAddress="echo $Flink_RESTFUL_URL|awk -F'\"' '{print $1}'|awk -F';' '{print $1}'"
curl $FlinkRestfulAddress> /dev/null 2>&1
isSuccess "execute cmd: Flink service check"
}

if [ "$ENABLE_TRINO" == "true" ]; then
checkTrino
fi

if [ "$ENABLE_ES" == "true" ]; then
checkElasticSearch
fi

if [ "$ENABLE_FLINK" == "true" ]; then
fi
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nothing todo for "$ENABLE_FLINK" == "true" ?


say() {
printf 'check command fail \n %s\n' "$1"
Expand Down
Loading