Skip to content

Commit fbdbd27

Browse files
authored
[Improve] trivial improvements (#3699)
1 parent 12ff1be commit fbdbd27

File tree

14 files changed

+55
-72
lines changed

14 files changed

+55
-72
lines changed

streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -311,25 +311,6 @@ create table `t_variable` (
311311
unique key `un_team_vcode_inx` (`team_id`,`variable_code`) using btree
312312
) engine=innodb auto_increment=100000 default charset=utf8mb4 collate=utf8mb4_general_ci;
313313

314-
-- ----------------------------
315-
-- Table of t_resource
316-
-- ----------------------------
317-
drop table if exists `t_resource`;
318-
create table `t_resource` (
319-
`id` bigint not null auto_increment,
320-
`resource_name` varchar(128) collate utf8mb4_general_ci not null comment 'The name of the resource file',
321-
`resource_type` int not null comment '0:app 1:common 2:connector 3:format 4:udf',
322-
`resource` text collate utf8mb4_general_ci comment 'resource content, including jars and poms',
323-
`engine_type` int not null comment 'compute engine type, 0:apache flink 1:apache spark',
324-
`main_class` varchar(255) collate utf8mb4_general_ci default null,
325-
`description` text collate utf8mb4_general_ci default null comment 'More detailed description of resource',
326-
`creator_id` bigint collate utf8mb4_general_ci not null comment 'user id of creator',
327-
`team_id` bigint collate utf8mb4_general_ci not null comment 'team id',
328-
`create_time` datetime default null comment 'create time',
329-
`modify_time` datetime default null comment 'modify time',
330-
primary key (`id`) using btree,
331-
unique key `un_team_vcode_inx` (`team_id`,`resource_name`) using btree
332-
) engine=innodb auto_increment=100000 default charset=utf8mb4 collate=utf8mb4_general_ci;
333314

334315
-- ----------------------------
335316
-- Table structure for t_role
@@ -541,11 +522,11 @@ create table `t_yarn_queue` (
541522
-- ----------------------------
542523
drop table if exists `t_resource`;
543524
create table if not exists `t_resource` (
544-
`id` bigint not null auto_increment primary key,
525+
`id` bigint not null auto_increment ,
545526
`resource_name` varchar(128) not null comment 'The name of the resource',
546527
`resource_type` int not null comment '0:app 1:common 2:connector 3:format 4:udf',
547528
`resource_path` varchar(255) default null,
548-
`resource` text,
529+
`resource` text comment 'resource content, including jars and poms',
549530
`engine_type` int not null comment 'compute engine type, 0:apache flink 1:apache spark',
550531
`main_class` varchar(255) default null,
551532
`description` text default null comment 'More detailed description of resource',
@@ -554,8 +535,10 @@ create table if not exists `t_resource` (
554535
`connector_optional_options` text default null,
555536
`team_id` bigint not null comment 'team id',
556537
`create_time` datetime default null comment 'create time',
557-
`modify_time` datetime not null default current_timestamp comment 'modify time'
558-
);
538+
`modify_time` datetime not null default current_timestamp comment 'modify time',
539+
primary key (`id`) using btree,
540+
unique key `un_team_vcode_inx` (`team_id`,`resource_name`) using btree
541+
) engine=innodb auto_increment=100000 default charset=utf8mb4 collate=utf8mb4_general_ci;
559542

560543

561544
-- ----------------------------

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/FlinkClusterServiceImpl.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -104,19 +104,19 @@ public ResponseResult check(FlinkCluster cluster) {
104104
ResponseResult result = new ResponseResult();
105105
result.setStatus(0);
106106

107-
// 1) Check name is already exists
107+
// 1) Check name if already exists
108108
Boolean existsByClusterName =
109109
this.existsByClusterName(cluster.getClusterName(), cluster.getId());
110110
if (existsByClusterName) {
111-
result.setMsg("ClusterName is already exists, please check!");
111+
result.setMsg("ClusterName already exists, please check!");
112112
result.setStatus(1);
113113
return result;
114114
}
115115

116-
// 2) Check target-cluster is already exists
116+
// 2) Check target-cluster if already exists
117117
String clusterId = cluster.getClusterId();
118118
if (StringUtils.isNotBlank(clusterId) && this.existsByClusterId(clusterId, cluster.getId())) {
119-
result.setMsg("The clusterId " + clusterId + " is already exists,please check!");
119+
result.setMsg("The clusterId " + clusterId + " already exists,please check!");
120120
result.setStatus(2);
121121
return result;
122122
}

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/ResourceServiceImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ private RestResponse checkConnector(Resource resourceParam) throws JsonProcessin
320320
boolean exists =
321321
existsFlinkConnector(resourceParam.getId(), connectorResource.getFactoryIdentifier());
322322
if (exists) {
323-
return buildExceptResponse(new RuntimeException("connector is already exists"), 4);
323+
return buildExceptResponse(new RuntimeException("connector already exists"), 4);
324324
}
325325

326326
if (resourceParam.getId() != null

streampark-console/streampark-console-service/src/main/java/org/apache/streampark/console/core/service/impl/SavePointServiceImpl.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,7 +397,7 @@ private Optional<Integer> tryGetChkNumRetainedFromDynamicProps(String dynamicPro
397397
return Optional.of(value);
398398
}
399399
log.warn(
400-
"This value of dynamicProperties key: state.checkpoints.num-retained is invalid, must be gt 0");
400+
"This value of dynamicProperties key: state.checkpoints.num-retained is invalid, must be greater than 0");
401401
} catch (NumberFormatException e) {
402402
log.warn(
403403
"This value of dynamicProperties key: state.checkpoints.num-retained invalid, must be number");
@@ -425,11 +425,11 @@ private int getChkNumRetainedFromFlinkEnv(
425425
return value;
426426
}
427427
log.warn(
428-
"The value of key: state.checkpoints.num-retained in flink-conf.yaml is invalid, must be gt 0, default value: {} will be use",
428+
"The value of key: state.checkpoints.num-retained in flink-conf.yaml is invalid, must be greater than 0, default value: {} will be used",
429429
MAX_RETAINED_CHECKPOINTS.defaultValue());
430430
} catch (NumberFormatException e) {
431431
log.warn(
432-
"The value of key: state.checkpoints.num-retained in flink-conf.yaml is invalid, must be number, flink env: {}, default value: {} will be use",
432+
"The value of key: state.checkpoints.num-retained in flink-conf.yaml is invalid, must be number, flink env: {}, default value: {} will be used",
433433
flinkEnv.getFlinkHome(),
434434
flinkConfNumRetained);
435435
}

streampark-console/streampark-console-webapp/src/locales/lang/en/flink/app.ts

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default {
3030
executionMode: 'Execution Mode',
3131
historyVersion: 'History Version',
3232
resource: 'Resource',
33-
resourcePlaceHolder: 'please choose resource',
33+
resourcePlaceHolder: 'Please choose resource',
3434
selectAppPlaceHolder: 'choose app jar',
3535
dependency: 'Dependency',
3636
appConf: 'Application Conf',
@@ -244,38 +244,38 @@ export default {
244244
terminated: 'TERMINATED',
245245
},
246246
addAppTips: {
247-
developmentModePlaceholder: 'please select job type',
247+
developmentModePlaceholder: 'Please select job type',
248248
developmentModeIsRequiredMessage: 'Job Type is required',
249-
executionModePlaceholder: 'please select execution mode',
249+
executionModePlaceholder: 'Please select execution mode',
250250
executionModeIsRequiredMessage: 'Execution Mode is required',
251251
hadoopEnvInitMessage:
252252
'Hadoop environment initialization failed, please check the environment settings',
253253
resourceFromMessage: 'resource from is required',
254254
mainClassPlaceholder: 'Please enter Main class',
255255
mainClassIsRequiredMessage: 'Program Main is required',
256-
projectPlaceholder: 'Please select Project',
256+
projectPlaceholder: 'Please select project',
257257
projectIsRequiredMessage: 'Project is required',
258258
projectModulePlaceholder: 'Please select module of this project',
259-
appTypePlaceholder: 'Please select Application type',
259+
appTypePlaceholder: 'Please select application type',
260260
appTypeIsRequiredMessage: 'Application Type is required',
261261
programJarIsRequiredMessage: 'Program Jar is required',
262262
useSysHadoopConf: 'Use System Hadoop Conf',
263263
flinkVersionIsRequiredMessage: 'Flink Version is required',
264-
appNamePlaceholder: 'Please enter application Name',
265-
appNameIsRequiredMessage: 'The application Name is required',
266-
appNameNotUniqueMessage: 'The application Name is already exists, must be unique. ',
264+
appNamePlaceholder: 'Please enter application name',
265+
appNameIsRequiredMessage: 'The application name is required',
266+
appNameNotUniqueMessage: 'The application name already exists, must be unique. ',
267267
appNameExistsInYarnMessage:
268-
'The application name is already exists in YARN, cannot be repeated. Please check',
268+
'The application name already exists in YARN, cannot be repeated. Please check',
269269
appNameExistsInK8sMessage:
270-
'The application name is already exists in Kubernetes,cannot be repeated. Please check',
270+
'The application name already exists in Kubernetes,cannot be repeated. Please check',
271271
appNameNotValid:
272272
'The application name is invalid, must be (Chinese or English or "-" or "_"), two consecutive spaces cannot appear.Please check',
273273
flinkClusterIsRequiredMessage: 'Flink Cluster is required',
274274
flinkSqlIsRequiredMessage: 'Flink SQL is required',
275275
tagsPlaceholder: 'Please enter tags,if more than one, separate them with commas(,)',
276276
parallelismPlaceholder: 'The parallelism with which to run the program',
277277
slotsOfPerTaskManagerPlaceholder: 'Number of slots per TaskManager',
278-
restartSizePlaceholder: 'restart max size',
278+
restartSizePlaceholder: 'Restart max size',
279279
alertTemplatePlaceholder: 'Alert Template',
280280
totalMemoryOptionsPlaceholder: 'Please select the resource parameters to set',
281281
tmPlaceholder: 'Please select the resource parameters to set',
@@ -293,7 +293,7 @@ export default {
293293
hadoopXmlConfigFileTips:
294294
'Automatically copy configuration files from system environment parameters',
295295
dynamicPropertiesPlaceholder:
296-
'$key=$value,If there are multiple parameters,you can new line enter them (-D <arg>)',
296+
'Enter $key=$value,if there are multiple parameters,you can enter them on the new line (-D <arg>)',
297297
},
298298
noteInfo: {
299299
note: 'Note',
@@ -308,7 +308,7 @@ export default {
308308
totalMemoryNote:
309309
'Explicitly configuring both "total process memory" and "total Flink memory" is not recommended. It may lead to deployment failures due to potential memory configuration conflicts. Configuring other memory components also requires caution as it can produce further configuration conflicts, The easiest way is to set "total process memory"',
310310
dynamicProperties:
311-
'It works the same as -D$property=$value in CLI mode, Allows specifying multiple generic configuration options. The available options can be found from',
311+
'It works the same as -D$property=$value in CLI mode, allows specifying multiple generic configuration options. The available options can be found from',
312312
yarnQueue:
313313
'It\'s used to quickly specify not only "yarn.application.name" but also "yarn.application.node-label". For example, "queue1" represents the value of "yarn.application.name" is "queue1", but "queue1{\'@\'}label1,label2" represents that the value of "yarn.application.name" is "queue1" and the value of "yarn.application.node-label" is "label1,label2". The queue and label are joined by {\'@\'}.',
314314
},

streampark-console/streampark-console-webapp/src/locales/lang/en/flink/project.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -28,9 +28,9 @@ export default {
2828
searchPlaceholder: 'please enter a keyword search',
2929
form: {
3030
projectName: 'Project Name',
31-
projectNamePlaceholder: 'please input Project Name',
31+
projectNamePlaceholder: 'Please input project name',
3232
projectType: 'Project Type',
33-
projectTypePlaceholder: 'please select project type',
33+
projectTypePlaceholder: 'Please select project type',
3434
cvs: 'CVS',
3535
prvkeyPath: 'Private Key Path',
3636
prvkeyPathPlaceholder: 'private key path, e.g: ~/.ssh/id_rsa',
@@ -47,7 +47,7 @@ export default {
4747
branchesPlaceholder: 'Select a branch',
4848
pom: 'POM',
4949
pomPlaceholder:
50-
'By default,lookup pom.xml in root path,You can manually specify the module to compile pom.xmlh',
50+
'By default,lookup pom.xml in root path,you can manually specify the module to compile pom.xml',
5151
buildArgs: 'Build Argument',
5252
buildArgsPlaceholder: 'Build Argument, e.g: -Pprod',
5353
description: 'description',
@@ -57,12 +57,12 @@ export default {
5757
},
5858
operationTips: {
5959
projectNameIsRequiredMessage: 'Project Name is required',
60-
projectNameIsUniqueMessage: 'The Project Name is already exists. Please check',
60+
projectNameIsUniqueMessage: 'The Project Name already exists. Please check',
6161
projectTypeIsRequiredMessage: 'Project Type is required',
6262
cvsIsRequiredMessage: 'CVS is required',
6363
repositoryURLIsRequiredMessage: 'Repository URL is required',
6464
pomSpecifiesModuleMessage:
65-
'Specifies the module to compile pom.xml If it is not specified, it is found under the root path pom.xml',
65+
'Specifies the module to compile pom.xml if it is not specified, it is found under the root path pom.xml',
6666
projectIsbuildingMessage: 'The current project is building',
6767
projectIsbuildFailedMessage: 'Build Fail',
6868
deleteProjectSuccessMessage: 'delete successful',

streampark-console/streampark-console-webapp/src/locales/lang/en/flink/resource.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ export default {
5353
description: 'Description',
5454
},
5555
form: {
56-
descriptionMessage: 'exceeds maximum length limit of 100 characters',
57-
resourceNameIsRequiredMessage: 'resource name is required',
58-
engineTypeIsRequiredMessage: 'compute engine type is required',
59-
resourceTypeIsRequiredMessage: 'resource type is required',
56+
descriptionMessage: 'Exceeds maximum length limit of 100 characters',
57+
resourceNameIsRequiredMessage: 'Resource name is required',
58+
engineTypeIsRequiredMessage: 'Compute engine type is required',
59+
resourceTypeIsRequiredMessage: 'Resource type is required',
6060
resourceTypePlaceholder: 'Please select resource type',
6161
exists: 'Sorry, the Resource already exists',
6262
empty: 'Resource cannot be empty',

streampark-console/streampark-console-webapp/src/locales/lang/en/setting/alarm.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ export default {
7878
},
7979
fail: {
8080
title: 'Failed create AlertConfig',
81-
subTitle: 'alertName {0} is already exists!',
81+
subTitle: 'alertName {0} already exists!',
8282
update: 'Failed update AlertConfig',
8383
},
8484
success: {

streampark-console/streampark-console-webapp/src/locales/lang/en/setting/flinkCluster.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ export default {
4949
placeholder: {
5050
addType: 'Please select cluster Add Type',
5151
clusterName: 'Please enter cluster name',
52-
executionMode: 'Please enter cluster name',
53-
versionId: 'please select Flink Version',
52+
executionMode: 'Please enter execution mode',
53+
versionId: 'Please select flink version',
5454
addressRemoteMode: 'Please enter jobManager URL',
5555
addressNoRemoteMode: 'Please enter cluster address, e.g: http://host:port',
5656
yarnSessionClusterId: 'Please enter Yarn Session cluster',
@@ -65,7 +65,7 @@ export default {
6565
clusterDescription: 'Please enter description for this application',
6666
},
6767
required: {
68-
address: 'cluster address is required',
68+
address: 'Cluster address is required',
6969
executionMode: 'Execution Mode is required',
7070
clusterId: 'Yarn Session Cluster is required',
7171
versionId: 'Flink Version is required',

streampark-console/streampark-console-webapp/src/locales/lang/en/setting/flinkHome.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -27,14 +27,14 @@ export default {
2727
description: 'description',
2828
descriptionPlaceholder: 'Please enter description',
2929
operateMessage: {
30-
flinkNameTips: 'the flink name, e.g: flink-1.12',
31-
flinkNameIsRepeated: 'flink name is already exists',
32-
flinkNameIsRequired: 'flink name is required',
30+
flinkNameTips: 'The flink name, e.g: flink-1.12',
31+
flinkNameIsRepeated: 'Flink name already exists',
32+
flinkNameIsRequired: 'Flink name is required',
3333
flinkHomeTips: 'The absolute path of the FLINK_HOME',
34-
flinkHomeIsRequired: 'flink home is required',
35-
flinkHomePathIsInvalid: 'flink home path is invalid',
36-
flinkDistNotFound: 'can no found flink-dist in FLINK_HOME/lib',
37-
flinkDistIsRepeated: 'found multiple flink-dist in FLINK_HOME/lib, Must be only one',
34+
flinkHomeIsRequired: 'Flink home is required',
35+
flinkHomePathIsInvalid: 'Flink home path is invalid',
36+
flinkDistNotFound: 'Can not find flink-dist in FLINK_HOME/lib',
37+
flinkDistIsRepeated: 'Found multiple flink-dist in FLINK_HOME/lib, must be only one',
3838
createFlinkHomeSuccessful: ' create successful!',
3939
updateFlinkHomeSuccessful: ' update successful!',
4040
},

streampark-console/streampark-console-webapp/src/locales/lang/en/system/member.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,6 @@ export default {
2929
createTime: 'Create Time',
3030
modifyTime: 'Modify Time',
3131
},
32-
userNameRequire: 'please select a user name',
33-
roleRequire: 'please select role',
32+
userNameRequire: 'Please select a user name',
33+
roleRequire: 'Please select a role',
3434
};

streampark-console/streampark-console-webapp/src/locales/lang/en/system/team.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ export default {
2626
table: {
2727
title: 'Team List',
2828
teamName: 'Team Name',
29-
teamNamePlaceholder: 'please enter Team Name',
29+
teamNamePlaceholder: 'Please enter team name',
3030
description: 'Description',
31-
descriptionMessage: 'exceeds maximum length limit of 100 characters',
32-
teamMessage: 'teamName must be at least 4 characters',
31+
descriptionMessage: 'Exceeds maximum length limit of 100 characters',
32+
teamMessage: 'Team name must be at least 4 characters',
3333
},
3434
};

streampark-console/streampark-console-webapp/src/views/flink/app/hooks/useFlinkRender.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ export const renderDynamicProperties = ({ model, field }: RenderCallbackParams)
269269
<Input.TextArea
270270
rows={8}
271271
name="dynamicProperties"
272-
placeholder="$key=$value,If there are multiple parameters,you can new line enter them (-D <arg>)"
272+
placeholder="Enter $key=$value,if there are multiple parameters,you can enter them on the new line(-D <arg>)"
273273
value={model[field]}
274274
onInput={(e: ChangeEvent) => (model[field] = e?.target?.value)}
275275
/>

streampark-console/streampark-console-webapp/src/views/resource/project/useProject.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -70,8 +70,8 @@ export const useProject = () => {
7070
componentProps: {
7171
placeholder: t('flink.project.form.projectTypePlaceholder'),
7272
options: [
73-
{ label: 'apache flink', value: ProjectTypeEnum.FLINK, disabled: false },
74-
{ label: 'apache spark', value: ProjectTypeEnum.SPARK, disabled: true },
73+
{ label: 'Apache Flink', value: ProjectTypeEnum.FLINK, disabled: false },
74+
{ label: 'Apache Spark', value: ProjectTypeEnum.SPARK, disabled: true },
7575
],
7676
showSearch: true,
7777
optionFilterProp: 'children',

0 commit comments

Comments
 (0)