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 a4637c2c9 [INLONG-3662][Manager] Disable ZooKeeper by default and 
deserialize file source from stream info (#3663)
a4637c2c9 is described below

commit a4637c2c9dc87684e222240207caef3be22f99f2
Author: healchow <[email protected]>
AuthorDate: Wed Apr 13 12:53:41 2022 +0800

    [INLONG-3662][Manager] Disable ZooKeeper by default and deserialize file 
source from stream info (#3663)
---
 .../inlong/manager/common/pojo/group/InlongGroupRequest.java |  4 ++--
 .../manager/common/pojo/group/InlongGroupResponse.java       |  2 +-
 .../service/thirdparty/sort/util/SerializationUtils.java     | 12 ++++++------
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupRequest.java
 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupRequest.java
index 3bc97f9a5..494678913 100644
--- 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupRequest.java
+++ 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupRequest.java
@@ -73,8 +73,8 @@ public class InlongGroupRequest {
     @ApiModelProperty(value = "Pulsar service URL")
     private String pulsarServiceUrl;
 
-    @ApiModelProperty(value = "Need zookeeper support, 0 false 1 true")
-    private Integer zookeeperEnabled = 1;
+    @ApiModelProperty(value = "Whether zookeeper enabled? 0: disabled, 1: 
enabled")
+    private Integer zookeeperEnabled = 0;
 
     @ApiModelProperty(value = "Data type name")
     private String schemaName;
diff --git 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupResponse.java
 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupResponse.java
index e4f431384..aaf83fa26 100644
--- 
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupResponse.java
+++ 
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/group/InlongGroupResponse.java
@@ -75,7 +75,7 @@ public class InlongGroupResponse {
     @ApiModelProperty(value = "Pulsar service URL")
     private String pulsarServiceUrl;
 
-    @ApiModelProperty(value = "Need zookeeper support, 0 false 1 true")
+    @ApiModelProperty(value = "Whether zookeeper enabled? 0: disabled, 1: 
enabled")
     private Integer zookeeperEnabled;
 
     @ApiModelProperty(value = "Data type name")
diff --git 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdparty/sort/util/SerializationUtils.java
 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdparty/sort/util/SerializationUtils.java
index cea3110fb..1c48e479b 100644
--- 
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdparty/sort/util/SerializationUtils.java
+++ 
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdparty/sort/util/SerializationUtils.java
@@ -56,7 +56,7 @@ public class SerializationUtils {
             case KAFKA:
                 return deserializeForKafka((KafkaSourceResponse) 
sourceResponse, streamInfo);
             case FILE:
-                return deserializeForFile(sourceResponse, streamInfo);
+                return deserializeForFile(streamInfo);
             default:
                 throw new IllegalArgumentException(String.format("Unsupported 
sourceType: %s", sourceType));
         }
@@ -135,10 +135,10 @@ public class SerializationUtils {
     /**
      * Get deserialization info for File
      */
-    private static DeserializationInfo deserializeForFile(SourceResponse 
sourceResponse, InlongStreamInfo streamInfo) {
-        String serializationType = sourceResponse.getSerializationType();
-        DataTypeEnum dataType = DataTypeEnum.forName(serializationType);
-        switch (dataType) {
+    private static DeserializationInfo deserializeForFile(InlongStreamInfo 
streamInfo) {
+        String dataType = streamInfo.getDataType();
+        DataTypeEnum typeEnum = DataTypeEnum.forName(dataType);
+        switch (typeEnum) {
             case CSV:
                 char separator = 
streamInfo.getDataSeparator().toCharArray()[0];
                 return new CsvDeserializationInfo(separator);
@@ -148,7 +148,7 @@ public class SerializationUtils {
                 return new JsonDeserializationInfo();
             default:
                 throw new IllegalArgumentException(
-                        String.format("Unsupported type for File source:%s", 
serializationType));
+                        String.format("Unsupported data type for File source: 
%s", dataType));
         }
     }
 }

Reply via email to