Skip to content

Commit

Permalink
[Bug] Fixed the problem that local Debug could not read the applicati…
Browse files Browse the repository at this point in the history
…on yml configuration (#5020)

* add template_required column to linkis_ps_configuration_config_key close #5018

* Fix Local Debug cannot read application ymal
  • Loading branch information
peacewong authored Dec 6, 2023
1 parent 4c17598 commit b689f88
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 5 deletions.
5 changes: 3 additions & 2 deletions linkis-dist/bin/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,13 @@ else
fi

if [ "$DISCOVERY" == "NACOS" ]; then
rm -rf $LINKIS_HOME/conf/application-*
mv $LINKIS_HOME/conf/nacos/* $LINKIS_HOME/conf
echo "Use NACOS mode"
else
mv $LINKIS_HOME/conf/eureka/* $LINKIS_HOME/conf
echo "Use EUREKA mode"
fi
rm -rf $LINKIS_HOME/conf/nacos
rm -rf $LINKIS_HOME/conf/eureka

cp ${LINKIS_CONFIG_PATH} $LINKIS_HOME/conf
cp ${LINKIS_DB_CONFIG_PATH} $LINKIS_HOME/conf
Expand Down
23 changes: 21 additions & 2 deletions linkis-dist/package/db/linkis_ddl.sql
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ CREATE TABLE `linkis_ps_configuration_config_key`(
`en_description` varchar(200) DEFAULT NULL COMMENT 'english description',
`en_name` varchar(100) DEFAULT NULL COMMENT 'english name',
`en_treeName` varchar(100) DEFAULT NULL COMMENT 'english treeName',
`template_required` tinyint(1) DEFAULT 0 COMMENT 'template required 0 none / 1 must',
PRIMARY KEY (`id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;

Expand All @@ -64,7 +65,7 @@ DROP TABLE IF EXISTS `linkis_ps_configuration_config_value`;
CREATE TABLE `linkis_ps_configuration_config_value`(
`id` bigint(20) NOT NULL AUTO_INCREMENT,
`config_key_id` bigint(20),
`config_value` varchar(200),
`config_value` varchar(500),
`config_label_id`int(20),
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
Expand All @@ -85,7 +86,25 @@ CREATE TABLE `linkis_ps_configuration_category` (
UNIQUE INDEX `uniq_label_id` (`label_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_bin;


DROP TABLE IF EXISTS `linkis_ps_configuration_template_config_key`;
CREATE TABLE IF NOT EXISTS `linkis_ps_configuration_template_config_key` (
`id` BIGINT(20) NOT NULL AUTO_INCREMENT,
`template_name` VARCHAR(200) NOT NULL COMMENT 'Configuration template name redundant storage',
`template_uuid` VARCHAR(36) NOT NULL COMMENT 'uuid template id recorded by the third party',
`key_id` BIGINT(20) NOT NULL COMMENT 'id of linkis_ps_configuration_config_key',
`config_value` VARCHAR(200) NULL DEFAULT NULL COMMENT 'configuration value',
`max_value` VARCHAR(50) NULL DEFAULT NULL COMMENT 'upper limit value',
`min_value` VARCHAR(50) NULL DEFAULT NULL COMMENT 'Lower limit value (reserved)',
`validate_range` VARCHAR(50) NULL DEFAULT NULL COMMENT 'Verification regularity (reserved)',
`is_valid` VARCHAR(2) DEFAULT 'Y' COMMENT 'Is it valid? Reserved Y/N',
`create_by` VARCHAR(50) NOT NULL COMMENT 'Creator',
`create_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT 'create time',
`update_by` VARCHAR(50) NULL DEFAULT NULL COMMENT 'Update by',
`update_time` DATETIME DEFAULT CURRENT_TIMESTAMP COMMENT 'update time',
PRIMARY KEY (`id`),
UNIQUE INDEX `uniq_tid_kid` (`template_uuid`, `key_id`),
UNIQUE INDEX `uniq_tname_kid` (`template_uuid`, `key_id`)
)ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin;

DROP TABLE IF EXISTS `linkis_ps_configuration_key_limit_for_user`;
CREATE TABLE IF NOT EXISTS `linkis_ps_configuration_key_limit_for_user` (
Expand Down
3 changes: 2 additions & 1 deletion linkis-dist/package/db/linkis_ddl_pg.sql
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,8 @@ CREATE TABLE linkis_ps_configuration_config_key (
en_description varchar(200) NULL,
en_name varchar(100) NULL,
"en_treeName" varchar(100) NULL,
`boundary_type` int2 NOT NULL,
boundary_type int2 NOT NULL,
template_required bool NULL,
CONSTRAINT linkis_configuration_config_key_pkey PRIMARY KEY (id)
);
COMMENT ON COLUMN "linkis_ps_configuration_config_key"."key" IS 'Set key, e.g. spark.executor.instances';
Expand Down

0 comments on commit b689f88

Please sign in to comment.