rickchengx commented on code in PR #15852:
URL:
https://github.com/apache/dolphinscheduler/pull/15852#discussion_r1566730765
##########
dolphinscheduler-task-plugin/dolphinscheduler-task-seatunnel/src/main/java/org/apache/dolphinscheduler/plugin/task/seatunnel/SeatunnelTask.java:
##########
@@ -184,8 +188,17 @@ private String buildCustomConfigContent() {
}
private String buildConfigFilePath() {
- return String.format("%s/seatunnel_%s.conf",
taskExecutionContext.getExecutePath(),
- taskExecutionContext.getTaskAppId());
+ return String.format("%s/seatunnel_%s.%s",
taskExecutionContext.getExecutePath(),
+ taskExecutionContext.getTaskAppId(), formatDetector());
+ }
+
+ private String formatDetector() {
+ try {
+ new Gson().fromJson(seatunnelParameters.getRawScript(),
JsonElement.class);
+ return "json";
+ } catch (JsonSyntaxException e) {
Review Comment:
If it is not `json`, are there any other format besides `conf`?
--
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]