You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2022/05/23 14:46:12 UTC
[incubator-inlong] branch master updated: [INLONG-4306][Sort] Parameter error in FileSystemLoadNode (#4308)
This is an automated email from the ASF dual-hosted git repository.
healchow pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 230663429 [INLONG-4306][Sort] Parameter error in FileSystemLoadNode (#4308)
230663429 is described below
commit 230663429dcaa4029feb45a7e21de1dd62e6d66f
Author: ganfengtan <Ga...@users.noreply.github.com>
AuthorDate: Mon May 23 22:46:06 2022 +0800
[INLONG-4306][Sort] Parameter error in FileSystemLoadNode (#4308)
---
.../sort/protocol/node/load/FileSystemLoadNode.java | 19 ++++++++++---------
1 file changed, 10 insertions(+), 9 deletions(-)
diff --git a/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/FileSystemLoadNode.java b/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/FileSystemLoadNode.java
index da8c41b93..172b80215 100644
--- a/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/FileSystemLoadNode.java
+++ b/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/node/load/FileSystemLoadNode.java
@@ -28,7 +28,6 @@ import org.apache.inlong.sort.protocol.FieldInfo;
import org.apache.inlong.sort.protocol.node.LoadNode;
import org.apache.inlong.sort.protocol.transformation.FieldRelationShip;
import org.apache.inlong.sort.protocol.transformation.FilterFunction;
-import org.apache.inlong.sort.protocol.transformation.WatermarkField;
import javax.annotation.Nonnull;
import javax.annotation.Nullable;
@@ -62,11 +61,10 @@ public class FileSystemLoadNode extends LoadNode implements Serializable {
@JsonProperty("partitionFields")
private List<FieldInfo> partitionFields;
- @JsonProperty("watermarkField")
- private WatermarkField watermarkField;
+ private String tempTableName;
- @JsonProperty("name")
- private String name;
+ @JsonProperty("serverTimeZone")
+ private String serverTimeZone;
@JsonCreator
public FileSystemLoadNode(@JsonProperty("id") String id,
@@ -79,13 +77,13 @@ public class FileSystemLoadNode extends LoadNode implements Serializable {
@Nullable @JsonProperty("sinkParallelism") Integer sinkParallelism,
@JsonProperty("properties") Map<String, String> properties,
@JsonProperty("parFields") List<FieldInfo> partitionFields,
- @JsonProperty("watermarkField") WatermarkField watermarkField) {
+ @JsonProperty("serverTimeZone") String serverTimeZone) {
super(id, name, fields, fieldRelationShips, filters, null, sinkParallelism, properties);
this.format = Preconditions.checkNotNull(format, "format type is null");
this.path = Preconditions.checkNotNull(path, "path is null");
this.partitionFields = partitionFields;
- this.watermarkField = watermarkField;
- this.name = name;
+ this.tempTableName = name;
+ this.serverTimeZone = serverTimeZone;
}
@Override
@@ -112,12 +110,15 @@ public class FileSystemLoadNode extends LoadNode implements Serializable {
if (!map.containsKey(rollingPolicyFileSize)) {
map.put(rollingPolicyFileSize, "128MB");
}
+ if (null != serverTimeZone && !map.containsKey(waterMarkZone)) {
+ map.put(waterMarkZone, serverTimeZone);
+ }
return map;
}
@Override
public String genTableName() {
- return "node_" + super.getId() + "_" + name;
+ return "node_" + super.getId() + "_" + tempTableName;
}
}