This is an automated email from the ASF dual-hosted git repository.

kezhenxu94 pushed a commit to branch dev
in repository https://gitbox.apache.org/repos/asf/incubator-seatunnel.git


The following commit(s) were added to refs/heads/dev by this push:
     new 1401ede  Fix misspelled field name (#902)
1401ede is described below

commit 1401ede5252083f6c517cbc32c86825d445bc59e
Author: Simon <[email protected]>
AuthorDate: Thu Dec 30 15:37:55 2021 +0800

    Fix misspelled field name (#902)
---
 .../src/main/java/org/apache/seatunnel/Seatunnel.java    |  6 +++---
 .../apache/seatunnel/config/command/CommandLineArgs.java | 16 ++++++++--------
 .../seatunnel/config/command/CommandLineUtilsTest.java   |  2 +-
 .../java/org/apache/seatunnel/core/sql/SeatunnelSql.java |  2 +-
 4 files changed, 13 insertions(+), 13 deletions(-)

diff --git 
a/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/Seatunnel.java
 
b/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/Seatunnel.java
index b1b2795..fafebaa 100644
--- 
a/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/Seatunnel.java
+++ 
b/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/Seatunnel.java
@@ -71,14 +71,14 @@ public class Seatunnel {
         String path = null;
         switch (engine) {
             case FLINK:
-                path = cmdArgs.getConfiFile();
+                path = cmdArgs.getConfigFile();
                 break;
             case SPARK:
                 final Optional<String> mode = Common.getDeployMode();
                 if (mode.isPresent() && "cluster".equals(mode.get())) {
-                    path = 
Paths.get(cmdArgs.getConfiFile()).getFileName().toString();
+                    path = 
Paths.get(cmdArgs.getConfigFile()).getFileName().toString();
                 } else {
-                    path = cmdArgs.getConfiFile();
+                    path = cmdArgs.getConfigFile();
                 }
                 break;
             default:
diff --git 
a/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/config/command/CommandLineArgs.java
 
b/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/config/command/CommandLineArgs.java
index b19f334..2990fdf 100644
--- 
a/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/config/command/CommandLineArgs.java
+++ 
b/seatunnel-core/seatunnel-core-base/src/main/java/org/apache/seatunnel/config/command/CommandLineArgs.java
@@ -20,17 +20,17 @@ package org.apache.seatunnel.config.command;
 public class CommandLineArgs {
 
     private String deployMode = "client";
-    private String confiFile;
-    private boolean testConfig;
+    private final String configFile;
+    private final boolean testConfig;
 
-    public CommandLineArgs(String confiFile, boolean testConfig) {
-        this.confiFile = confiFile;
+    public CommandLineArgs(String configFile, boolean testConfig) {
+        this.configFile = configFile;
         this.testConfig = testConfig;
     }
 
-    public CommandLineArgs(String deployMode, String confiFile, boolean 
testConfig) {
+    public CommandLineArgs(String deployMode, String configFile, boolean 
testConfig) {
         this.deployMode = deployMode;
-        this.confiFile = confiFile;
+        this.configFile = configFile;
         this.testConfig = testConfig;
     }
 
@@ -38,8 +38,8 @@ public class CommandLineArgs {
         return deployMode;
     }
 
-    public String getConfiFile() {
-        return confiFile;
+    public String getConfigFile() {
+        return configFile;
     }
 
     public boolean isTestConfig() {
diff --git 
a/seatunnel-core/seatunnel-core-base/src/test/java/org/apache/seatunnel/config/command/CommandLineUtilsTest.java
 
b/seatunnel-core/seatunnel-core-base/src/test/java/org/apache/seatunnel/config/command/CommandLineUtilsTest.java
index d52dc73..7231b89 100644
--- 
a/seatunnel-core/seatunnel-core-base/src/test/java/org/apache/seatunnel/config/command/CommandLineUtilsTest.java
+++ 
b/seatunnel-core/seatunnel-core-base/src/test/java/org/apache/seatunnel/config/command/CommandLineUtilsTest.java
@@ -28,7 +28,7 @@ public class CommandLineUtilsTest {
         String[] args = {"-c", "app.conf", "-e", "cluster", "-m", "local[*]"};
         CommandLineArgs commandLineArgs = 
CommandLineUtils.parseSparkArgs(args);
 
-        Assert.assertEquals("app.conf", commandLineArgs.getConfiFile());
+        Assert.assertEquals("app.conf", commandLineArgs.getConfigFile());
         Assert.assertEquals("cluster", commandLineArgs.getDeployMode());
     }
 
diff --git 
a/seatunnel-core/seatunnel-core-sql/src/main/java/org/apache/seatunnel/core/sql/SeatunnelSql.java
 
b/seatunnel-core/seatunnel-core-sql/src/main/java/org/apache/seatunnel/core/sql/SeatunnelSql.java
index 7606c5a..6f8576b 100644
--- 
a/seatunnel-core/seatunnel-core-sql/src/main/java/org/apache/seatunnel/core/sql/SeatunnelSql.java
+++ 
b/seatunnel-core/seatunnel-core-sql/src/main/java/org/apache/seatunnel/core/sql/SeatunnelSql.java
@@ -36,7 +36,7 @@ public class SeatunnelSql {
 
     private static JobInfo parseJob(String[] args) throws IOException {
         CommandLineArgs flinkArgs = CommandLineUtils.parseFlinkArgs(args);
-        String configFilePath = flinkArgs.getConfiFile();
+        String configFilePath = flinkArgs.getConfigFile();
         String jobContent = FileUtils.readFileToString(new 
File(configFilePath), StandardCharsets.UTF_8);
         return new JobInfo(jobContent);
     }

Reply via email to