This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/master by this push:
new 7cf85a9d8 [issue-4797] fix print error (#4798)
7cf85a9d8 is described below
commit 7cf85a9d8cbab667dd6ba212d4439039511f834a
Author: aiceflower <[email protected]>
AuthorDate: Sat Jul 22 23:12:14 2023 +0800
[issue-4797] fix print error (#4798)
* fix print error
* fix print error
---
linkis-dist/deploy-config/linkis-env.sh | 2 +-
linkis-dist/package/sbin/clear-server.sh | 30 ++++++++++++++++--------------
2 files changed, 17 insertions(+), 15 deletions(-)
diff --git a/linkis-dist/deploy-config/linkis-env.sh
b/linkis-dist/deploy-config/linkis-env.sh
index 2f04d5de1..2f160182c 100644
--- a/linkis-dist/deploy-config/linkis-env.sh
+++ b/linkis-dist/deploy-config/linkis-env.sh
@@ -31,7 +31,7 @@ deployPwd=
### database type
### choose mysql or postgresql, default mysql
dbType=mysql
-
+export dbType
##Linkis_SERVER_VERSION
LINKIS_SERVER_VERSION=v1
diff --git a/linkis-dist/package/sbin/clear-server.sh
b/linkis-dist/package/sbin/clear-server.sh
index 321bbbbc1..f4b374902 100644
--- a/linkis-dist/package/sbin/clear-server.sh
+++ b/linkis-dist/package/sbin/clear-server.sh
@@ -15,18 +15,20 @@
#
source ${LINKIS_HOME}/conf/db.sh
-echo 'DELETE FROM `linkis_cg_manager_label_value_relation` where
label_value_key="alias";
-DELETE FROM `linkis_cg_manager_label_value_relation` where
label_value_key="serviceName";
-DELETE FROM `linkis_cg_manager_label_value_relation` where
label_value_key="instance";
-DELETE FROM `linkis_cg_manager_label` where label_key="engineInstance" or
label_key="emInstance";
+if [ "$dbType" == "mysql" ]; then
+ echo 'DELETE FROM `linkis_cg_manager_label_value_relation` where
label_value_key="alias";
+ DELETE FROM `linkis_cg_manager_label_value_relation` where
label_value_key="serviceName";
+ DELETE FROM `linkis_cg_manager_label_value_relation` where
label_value_key="instance";
+ DELETE FROM `linkis_cg_manager_label` where label_key="engineInstance" or
label_key="emInstance";
-DELETE FROM `linkis_cg_manager_label_service_instance`;
-DELETE FROM `linkis_cg_manager_linkis_resources`;
-DELETE FROM `linkis_cg_manager_service_instance_metrics`;
-DELETE FROM `linkis_cg_manager_lock` ;
-DELETE FROM `linkis_cg_manager_label_resource`;
-DELETE FROM `linkis_cg_manager_service_instance`;
-DELETE FROM `linkis_cg_manager_engine_em`;
-' > /tmp/clearserver.command
-mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD}
${MYSQL_DB} < /tmp/clearserver.command
-rm -f /tmp/clearserver.command
+ DELETE FROM `linkis_cg_manager_label_service_instance`;
+ DELETE FROM `linkis_cg_manager_linkis_resources`;
+ DELETE FROM `linkis_cg_manager_service_instance_metrics`;
+ DELETE FROM `linkis_cg_manager_lock` ;
+ DELETE FROM `linkis_cg_manager_label_resource`;
+ DELETE FROM `linkis_cg_manager_service_instance`;
+ DELETE FROM `linkis_cg_manager_engine_em`;
+ ' > /tmp/clearserver.command
+ mysql -h ${MYSQL_HOST} -P${MYSQL_PORT} -u${MYSQL_USER} -p${MYSQL_PASSWORD}
${MYSQL_DB} < /tmp/clearserver.command
+ rm -f /tmp/clearserver.command
+fi
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]