legendtkl opened a new issue, #1824: URL: https://github.com/apache/incubator-seatunnel/issues/1824
### Search before asking - [X] I had searched in the [issues](https://github.com/apache/incubator-seatunnel/issues?q=is%3Aissue+label%3A%22bug%22) and found no similar issues. ### What happened <img width="966" alt="image" src="https://user-images.githubusercontent.com/2370761/167278029-6b08ef73-36c0-4326-a841-7f90f9e7e0ad.png"> <img width="1115" alt="image" src="https://user-images.githubusercontent.com/2370761/167278035-f24b9017-453e-408e-a22b-132e6e56e129.png"> <img width="904" alt="image" src="https://user-images.githubusercontent.com/2370761/167278046-d4f12448-dcaa-401e-a925-96a12f8549ad.png"> Following the above logic, the configuration `SET parallelism.default = 2` will be parsed into ` parallelism.default ` and ` 2`. When the key-value (` parallelism.default `, ` 2`) is set into Flink Environment Configuration, it will throw `NumberFormatException`. ### SeaTunnel Version 2.1.1 ### SeaTunnel Config ```conf -- -- Licensed to the Apache Software Foundation (ASF) under one or more -- contributor license agreements. See the NOTICE file distributed with -- this work for additional information regarding copyright ownership. -- The ASF licenses this file to You under the Apache License, Version 2.0 -- (the "License"); you may not use this file except in compliance with -- the License. You may obtain a copy of the License at -- -- http://www.apache.org/licenses/LICENSE-2.0 -- -- Unless required by applicable law or agreed to in writing, software -- distributed under the License is distributed on an "AS IS" BASIS, -- WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -- See the License for the specific language governing permissions and -- limitations under the License. -- -- -- This config file is a demonstration of sql processing in SeaTunnel config -- -- SET table.dml-sync = true; SET parallelism.default = 2 CREATE TABLE events ( f_type INT, f_uid INT, ts AS localtimestamp, WATERMARK FOR ts AS ts ) WITH ( 'connector' = 'datagen', 'rows-per-second'='5', 'fields.f_type.min'='1', 'fields.f_type.max'='5', 'fields.f_uid.min'='1', 'fields.f_uid.max'='1000' ); CREATE TABLE print_table ( type INT, uid INT, lstmt TIMESTAMP ) WITH ( 'connector' = 'print', 'sink.parallelism' = '1' ); INSERT INTO print_table SELECT * FROM events where f_type = 1; ``` ### Running Command ```shell ./bin/start-seatunnel-sql.sh --config ./config/flink.sql.conf.template ``` ### Error Exception ```log ------------------------------------------------------------ The program finished with the following exception: org.apache.flink.client.program.ProgramInvocationException: The main method caused an error: Could not parse value ' 2' for key 'parallelism.default'. at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:372) at org.apache.flink.client.program.PackagedProgram.invokeInteractiveModeForExecution(PackagedProgram.java:222) at org.apache.flink.client.ClientUtils.executeProgram(ClientUtils.java:114) at org.apache.flink.client.cli.CliFrontend.executeProgram(CliFrontend.java:812) at org.apache.flink.client.cli.CliFrontend.run(CliFrontend.java:246) at org.apache.flink.client.cli.CliFrontend.parseAndRun(CliFrontend.java:1054) at org.apache.flink.client.cli.CliFrontend.lambda$main$10(CliFrontend.java:1132) at org.apache.flink.runtime.security.contexts.NoOpSecurityContext.runSecured(NoOpSecurityContext.java:28) at org.apache.flink.client.cli.CliFrontend.main(CliFrontend.java:1132) Caused by: java.lang.IllegalArgumentException: Could not parse value ' 2' for key 'parallelism.default'. at org.apache.flink.configuration.Configuration.getOptional(Configuration.java:700) at org.apache.flink.api.common.ExecutionConfig.configure(ExecutionConfig.java:1106) at org.apache.flink.streaming.api.environment.StreamExecutionEnvironment.configure(StreamExecutionEnvironment.java:891) at org.apache.flink.table.planner.delegation.PlannerBase.validateAndOverrideConfiguration(PlannerBase.scala:474) at org.apache.flink.table.planner.delegation.StreamPlanner.validateAndOverrideConfiguration(StreamPlanner.scala:178) at org.apache.flink.table.planner.delegation.PlannerBase.translate(PlannerBase.scala:157) at org.apache.flink.table.api.internal.TableEnvironmentImpl.translate(TableEnvironmentImpl.java:1518) at org.apache.flink.table.api.internal.TableEnvironmentImpl.executeInternal(TableEnvironmentImpl.java:740) at org.apache.flink.table.api.internal.StatementSetImpl.execute(StatementSetImpl.java:99) at org.apache.seatunnel.core.sql.job.Executor.runJob(Executor.java:52) at org.apache.seatunnel.core.sql.SeatunnelSql.main(SeatunnelSql.java:36) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.apache.flink.client.program.PackagedProgram.callMainMethod(PackagedProgram.java:355) ... 8 more Caused by: java.lang.NumberFormatException: For input string: " 2" at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) at java.lang.Integer.parseInt(Integer.java:569) at java.lang.Integer.parseInt(Integer.java:615) at org.apache.flink.configuration.ConfigurationUtils.convertToInt(ConfigurationUtils.java:432) at org.apache.flink.configuration.ConfigurationUtils.convertValue(ConfigurationUtils.java:294) at org.apache.flink.configuration.Configuration.lambda$getOptional$2(Configuration.java:696) at java.util.Optional.map(Optional.java:215) at org.apache.flink.configuration.Configuration.getOptional(Configuration.java:696) ... 23 more ``` ### Flink or Spark Version _No response_ ### Java or Scala Version _No response_ ### Screenshots _No response_ ### Are you willing to submit PR? - [X] Yes I am willing to submit a PR! ### Code of Conduct - [X] I agree to follow this project's [Code of Conduct](https://www.apache.org/foundation/policies/conduct) -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
