You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by GitBox <gi...@apache.org> on 2022/04/15 09:22:13 UTC

[GitHub] [incubator-inlong] luchunliang commented on a diff in pull request #3733: [INLONG-3674][Manager] DataFlowInfo initialization support plugin

luchunliang commented on code in PR #3733:
URL: https://github.com/apache/incubator-inlong/pull/3733#discussion_r851171219


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdparty/sort/util/SinkInfoUtils.java:
##########
@@ -56,12 +59,20 @@ public class SinkInfoUtils {
     private static final String DATA_FORMAT = "yyyyMMddHH";
     private static final String TIME_FORMAT = "HHmmss";
     private static final String DATA_TIME_FORMAT = "yyyyMMddHHmmss";
+    private static final String KEY_TYPE_CUSTOM_SINK_INFO_GENERATOR = "CustomSinkInfoGenerator.type";
 
     /**
      * Create sink info for DataFlowInfo.
      */
     public static SinkInfo createSinkInfo(SourceResponse sourceResponse, SinkResponse sinkResponse,
-            List<FieldInfo> sinkFields) {
+            List<FieldInfo> sinkFields, Map<String, Object> properties) {
+
+        String loadType = String.valueOf(properties.get(KEY_TYPE_CUSTOM_SINK_INFO_GENERATOR));
+        if (!("null".equalsIgnoreCase(loadType))) {

Review Comment:
   为什么不直接判断null,要String.valueOf转成"null"



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/thirdparty/sort/util/SourceInfoUtils.java:
##########
@@ -62,10 +69,19 @@ public static boolean isBinlogAllMigration(SourceResponse sourceResponse) {
      */
     public static SourceInfo createSourceInfo(PulsarClusterInfo pulsarCluster, String masterAddress,
             ClusterBean clusterBean, InlongGroupInfo groupInfo, InlongStreamInfo streamInfo,
-            SourceResponse sourceResponse, List<FieldInfo> sourceFields) {
+            SourceResponse sourceResponse, List<FieldInfo> sourceFields, Map<String, Object> properties) {
+
+        String loadType = String.valueOf(properties.get(KEY_TYPE_CUSTOM_SOURCE_INFO_GENERATOR));
+        if (!("null".equalsIgnoreCase(loadType))) {

Review Comment:
   ditto



-- 
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: commits-unsubscribe@inlong.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org