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/03/05 07:35:14 UTC

[GitHub] [incubator-inlong] kipshi commented on a change in pull request #2932: [INLONG-2931][Manager] Improve parse response in manager client

kipshi commented on a change in pull request #2932:
URL: https://github.com/apache/incubator-inlong/pull/2932#discussion_r820061900



##########
File path: inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java
##########
@@ -109,6 +114,30 @@ public static InlongStreamInfo parseStreamInfo(Response response) {
             FullStreamResponse fullStreamResponse = GsonUtil.fromJson(fullStreamJson.toString(),
                     FullStreamResponse.class);
             list.add(fullStreamResponse);
+            //Parse sourceResponse in each stream
+            JsonArray sourceJsonArr = fullStreamJson.getAsJsonArray(SOURCE_INFO);
+            List<SourceResponse> sourceResponses = Lists.newArrayList();
+            fullStreamResponse.setSourceInfo(sourceResponses);
+            for (int j = 0; j < sourceJsonArr.size(); j++) {
+                JsonObject sourceJson = (JsonObject) sourceJsonArr.get(i);
+                String type = sourceJson.get(SOURCE_TYPE).getAsString();
+                SourceType sourceType = SourceType.forType(type);
+                switch (sourceType) {
+                    case BINLOG:
+                        BinlogSourceResponse hiveSinkResponse = GsonUtil.fromJson(sourceJson.toString(),

Review comment:
       yes




-- 
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