You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2022/02/25 09:53:38 UTC

[incubator-inlong] branch master updated: [INLONG-2721][Sort] Fix bugs in HiveSinkInfo (#2722)

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

dockerzhang 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 21a93d7  [INLONG-2721][Sort] Fix bugs in HiveSinkInfo (#2722)
21a93d7 is described below

commit 21a93d70766ebc86fc723d2e5c20714f6f68a120
Author: Kevin Wen <ke...@gmail.com>
AuthorDate: Fri Feb 25 17:53:34 2022 +0800

    [INLONG-2721][Sort] Fix bugs in HiveSinkInfo (#2722)
---
 .../inlong/sort/protocol/sink/HiveSinkInfo.java    | 24 +++++++++++++---------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/sink/HiveSinkInfo.java b/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/sink/HiveSinkInfo.java
index 70f6fd5..83d74d0 100644
--- a/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/sink/HiveSinkInfo.java
+++ b/inlong-sort/sort-common/src/main/java/org/apache/inlong/sort/protocol/sink/HiveSinkInfo.java
@@ -55,7 +55,7 @@ public class HiveSinkInfo extends SinkInfo {
 
     @JsonInclude(Include.NON_NULL)
     @JsonProperty("hadoop_proxy_user")
-    private String hadoopProxyUser;
+    private final String hadoopProxyUser;
 
     @JsonProperty("data_path")
     private final String dataPath;
@@ -76,17 +76,21 @@ public class HiveSinkInfo extends SinkInfo {
             @JsonProperty("data_path") String dataPath,
             @JsonProperty("partitions") HivePartitionInfo[] partitions,
             @JsonProperty("file_format") HiveFileFormat hiveFileFormat) {
-        super(fields);
-        this.hiveServerJdbcUrl = checkNotNull(hiveServerJdbcUrl);
-        this.databaseName = checkNotNull(databaseName);
-        this.tableName = checkNotNull(tableName);
-        this.username = username;
-        this.password = password;
-        this.dataPath = checkNotNull(dataPath);
-        this.partitions = checkNotNull(partitions);
-        this.hiveFileFormat = checkNotNull(hiveFileFormat);
+        this(
+                fields,
+                hiveServerJdbcUrl,
+                databaseName,
+                tableName,
+                username,
+                password,
+                null,
+                dataPath,
+                partitions,
+                hiveFileFormat
+        );
     }
 
+    @JsonCreator
     public HiveSinkInfo(
             @JsonProperty("fields") FieldInfo[] fields,
             @JsonProperty("hive_server_jdbc_url") String hiveServerJdbcUrl,