Skip to content

Commit

Permalink
[issue-4797] fix print error (#4798)
Browse files Browse the repository at this point in the history
* fix print error

* fix print error
  • Loading branch information
aiceflower authored Jul 22, 2023
1 parent fe394ec commit 7cf85a9
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion linkis-dist/deploy-config/linkis-env.sh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ deployPwd=
### database type
### choose mysql or postgresql, default mysql
dbType=mysql

export dbType

##Linkis_SERVER_VERSION
LINKIS_SERVER_VERSION=v1
Expand Down
30 changes: 16 additions & 14 deletions linkis-dist/package/sbin/clear-server.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

0 comments on commit 7cf85a9

Please sign in to comment.