Skip to content

Commit 08e8df2

Browse files
committed
fix comment
Signed-off-by: peiyu <[email protected]>
1 parent 5c54a55 commit 08e8df2

File tree

2 files changed

+19
-4
lines changed

2 files changed

+19
-4
lines changed

fluss-flink/fluss-flink-common/src/main/java/org/apache/fluss/flink/procedure/ResetClusterConfigsProcedure.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@
4747
* CALL sys.reset_cluster_configs('kv.rocksdb.shared-rate-limiter.bytes-per-sec');
4848
*
4949
* -- reset multiple configurations at one time
50-
* CALL sys.reset_cluster_configs('kv.rocksdb.shared-rate-limiter.bytes-per-sec','datalake.format');
50+
* CALL sys.reset_cluster_configs('kv.rocksdb.shared-rate-limiter.bytes-per-sec', 'datalake.format');
5151
*
5252
* </pre>
5353
*
@@ -64,7 +64,7 @@ public String[] call(ProcedureContext context, String... configKeys) throws Exce
6464
// Validate config key
6565
if (configKeys.length == 0) {
6666
throw new IllegalArgumentException(
67-
"config_pairs cannot be null or empty. "
67+
"config_keys cannot be null or empty. "
6868
+ "Please specify valid configuration keys.");
6969
}
7070

@@ -76,7 +76,7 @@ public String[] call(ProcedureContext context, String... configKeys) throws Exce
7676
if (configKey.isEmpty()) {
7777
throw new IllegalArgumentException(
7878
"Config key cannot be null or empty. "
79-
+ "Please specify valid configuration key.");
79+
+ "Please specify a valid configuration key.");
8080
}
8181

8282
String operationDesc = "deleted (reset to default)";

fluss-flink/fluss-flink-common/src/test/java/org/apache/fluss/flink/procedure/FlinkProcedureITCase.java

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -428,7 +428,22 @@ void testSetClusterConfigValidation() throws Exception {
428428
.await())
429429
.rootCause()
430430
.hasMessageContaining(
431-
"config_pairs must be set in pairs. Please specify a valid configuration pairs.");
431+
"config_pairs must be set in pairs. Please specify a valid configuration pairs");
432+
}
433+
434+
@Test
435+
void testResetClusterConfigValidation() throws Exception {
436+
// Try to reset an invalid config
437+
assertThatThrownBy(
438+
() ->
439+
tEnv.executeSql(
440+
String.format(
441+
"Call %s.sys.reset_cluster_configs('')",
442+
CATALOG_NAME))
443+
.await())
444+
.rootCause()
445+
.hasMessageContaining(
446+
"Config key cannot be null or empty. Please specify a valid configuration key");
432447
}
433448

434449
@ParameterizedTest

0 commit comments

Comments
 (0)