You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@seatunnel.apache.org by ki...@apache.org on 2022/02/14 02:30:16 UTC
[incubator-seatunnel] branch dev updated: [SeaTunnel#1232] [core] throw exception but hidden exception detail in top level of program entrypoint (#1234)
This is an automated email from the ASF dual-hosted git repository.
kirs 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 88906e0 [SeaTunnel#1232] [core] throw exception but hidden exception detail in top level of program entrypoint (#1234)
88906e0 is described below
commit 88906e055f60f23535a29c25929bd2ead7a1ccd4
Author: CenterCode <yx...@users.noreply.github.com>
AuthorDate: Mon Feb 14 10:30:08 2022 +0800
[SeaTunnel#1232] [core] throw exception but hidden exception detail in top level of program entrypoint (#1234)
---
.../src/main/java/org/apache/seatunnel/Seatunnel.java | 2 +-
.../src/main/java/org/apache/seatunnel/SeatunnelFlink.java | 8 ++------
.../src/main/java/org/apache/seatunnel/SeatunnelSpark.java | 8 ++------
.../org/apache/seatunnel/example/flink/LocalFlinkExample.java | 8 ++------
.../org/apache/seatunnel/example/spark/LocalSparkExample.java | 8 ++------
5 files changed, 9 insertions(+), 25 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 2d65577..0bb5347 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
@@ -49,7 +49,7 @@ import java.util.Optional;
public class Seatunnel {
private static final Logger LOGGER = LoggerFactory.getLogger(Seatunnel.class);
- public static void run(CommandLineArgs commandLineArgs, Engine engine) throws Exception{
+ public static void run(CommandLineArgs commandLineArgs, Engine engine) throws Exception {
Common.setDeployMode(commandLineArgs.getDeployMode());
String configFilePath = getConfigFilePath(commandLineArgs, engine);
boolean testConfig = commandLineArgs.isTestConfig();
diff --git a/seatunnel-core/seatunnel-core-flink/src/main/java/org/apache/seatunnel/SeatunnelFlink.java b/seatunnel-core/seatunnel-core-flink/src/main/java/org/apache/seatunnel/SeatunnelFlink.java
index d2c88f8..b3f9b5b 100644
--- a/seatunnel-core/seatunnel-core-flink/src/main/java/org/apache/seatunnel/SeatunnelFlink.java
+++ b/seatunnel-core/seatunnel-core-flink/src/main/java/org/apache/seatunnel/SeatunnelFlink.java
@@ -24,13 +24,9 @@ import org.apache.seatunnel.config.command.CommandLineUtils;
public class SeatunnelFlink {
- public static void main(String[] args) {
+ public static void main(String[] args) throws Exception {
CommandLineArgs flinkArgs = CommandLineUtils.parseFlinkArgs(args);
- try {
- Seatunnel.run(flinkArgs, FLINK);
- } catch (Exception e) {
- System.exit(-1);
- }
+ Seatunnel.run(flinkArgs, FLINK);
}
}
diff --git a/seatunnel-core/seatunnel-core-spark/src/main/java/org/apache/seatunnel/SeatunnelSpark.java b/seatunnel-core/seatunnel-core-spark/src/main/java/org/apache/seatunnel/SeatunnelSpark.java
index 28473c7..68c352f 100644
--- a/seatunnel-core/seatunnel-core-spark/src/main/java/org/apache/seatunnel/SeatunnelSpark.java
+++ b/seatunnel-core/seatunnel-core-spark/src/main/java/org/apache/seatunnel/SeatunnelSpark.java
@@ -24,12 +24,8 @@ import org.apache.seatunnel.config.command.CommandLineUtils;
public class SeatunnelSpark {
- public static void main(String[] args) {
+ public static void main(String[] args) throws Exception {
CommandLineArgs sparkArgs = CommandLineUtils.parseSparkArgs(args);
- try {
- Seatunnel.run(sparkArgs, SPARK);
- } catch (Exception e) {
- System.exit(-1);
- }
+ Seatunnel.run(sparkArgs, SPARK);
}
}
diff --git a/seatunnel-examples/seatunnel-flink-examples/src/main/java/org/apache/seatunnel/example/flink/LocalFlinkExample.java b/seatunnel-examples/seatunnel-flink-examples/src/main/java/org/apache/seatunnel/example/flink/LocalFlinkExample.java
index c79a01e..f0ac14a 100644
--- a/seatunnel-examples/seatunnel-flink-examples/src/main/java/org/apache/seatunnel/example/flink/LocalFlinkExample.java
+++ b/seatunnel-examples/seatunnel-flink-examples/src/main/java/org/apache/seatunnel/example/flink/LocalFlinkExample.java
@@ -26,14 +26,10 @@ public class LocalFlinkExample {
public static final String TEST_RESOURCE_DIR = "/seatunnel-examples/seatunnel-flink-examples/src/main/resources/examples/";
- public static void main(String[] args) {
+ public static void main(String[] args) throws Exception {
String configFile = getTestConfigFile("fake_to_console.conf");
CommandLineArgs flinkArgs = new CommandLineArgs(configFile, false);
- try {
- Seatunnel.run(flinkArgs, FLINK);
- } catch (Exception e) {
- System.exit(-1);
- }
+ Seatunnel.run(flinkArgs, FLINK);
}
public static String getTestConfigFile(String configFile) {
diff --git a/seatunnel-examples/seatunnel-spark-examples/src/main/java/org/apache/seatunnel/example/spark/LocalSparkExample.java b/seatunnel-examples/seatunnel-spark-examples/src/main/java/org/apache/seatunnel/example/spark/LocalSparkExample.java
index 49886ae..6610c99 100644
--- a/seatunnel-examples/seatunnel-spark-examples/src/main/java/org/apache/seatunnel/example/spark/LocalSparkExample.java
+++ b/seatunnel-examples/seatunnel-spark-examples/src/main/java/org/apache/seatunnel/example/spark/LocalSparkExample.java
@@ -26,14 +26,10 @@ public class LocalSparkExample {
public static final String TEST_RESOURCE_DIR = "/seatunnel-examples/seatunnel-spark-examples/src/main/resources/examples/";
- public static void main(String[] args) {
+ public static void main(String[] args) throws Exception {
String configFile = getTestConfigFile("spark.batch.conf.template");
CommandLineArgs sparkArgs = new CommandLineArgs(configFile, false);
- try {
- Seatunnel.run(sparkArgs, SPARK);
- } catch (Exception e) {
- System.exit(-1);
- }
+ Seatunnel.run(sparkArgs, SPARK);
}
public static String getTestConfigFile(String configFile) {