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 6be2d08 [INLONG-3097] Fix json parser error for TDMQ-PULSAR (#3098)
6be2d08 is described below
commit 6be2d0831805e7b5d160bd2d81f559733bbd0375
Author: kipshi <[email protected]>
AuthorDate: Sun Mar 13 16:18:11 2022 +0800
[INLONG-3097] Fix json parser error for TDMQ-PULSAR (#3098)
---
.../org/apache/inlong/manager/client/api/util/InlongParser.java | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java
index 21e288b..09377b9 100644
---
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java
+++
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/util/InlongParser.java
@@ -85,7 +85,9 @@ public class InlongParser {
InlongGroupResponse inlongGroupResponse =
GsonUtil.fromJson(GsonUtil.toJson(data), InlongGroupResponse.class);
JsonObject mqExtInfo = groupJson.getAsJsonObject(MQ_EXT_INFO);
if (mqExtInfo != null && mqExtInfo.get(MIDDLEWARE_TYPE) != null) {
- if
(Constant.MIDDLEWARE_PULSAR.equals(mqExtInfo.get(MIDDLEWARE_TYPE).getAsString()))
{
+ String middlewareType =
mqExtInfo.get(MIDDLEWARE_TYPE).getAsString();
+ if (Constant.MIDDLEWARE_PULSAR.equals(middlewareType) ||
Constant.MIDDLEWARE_TDMQ_PULSAR.equals(
+ middlewareType)) {
InlongGroupPulsarInfo pulsarInfo =
GsonUtil.fromJson(mqExtInfo.toString(), InlongGroupPulsarInfo.class);
inlongGroupResponse.setMqExtInfo(pulsarInfo);
}
@@ -218,7 +220,9 @@ public class InlongParser {
InlongGroupApproveRequest.class);
JsonObject mqExtInfo = groupJson.getAsJsonObject(MQ_EXT_INFO);
if (mqExtInfo != null && mqExtInfo.get(MIDDLEWARE_TYPE) != null) {
- if
(Constant.MIDDLEWARE_PULSAR.equals(mqExtInfo.get(MIDDLEWARE_TYPE).getAsString()))
{
+ String middlewareType =
mqExtInfo.get(MIDDLEWARE_TYPE).getAsString();
+ if (Constant.MIDDLEWARE_PULSAR.equals(middlewareType) ||
Constant.MIDDLEWARE_TDMQ_PULSAR.equals(
+ middlewareType)) {
InlongGroupPulsarInfo pulsarInfo =
GsonUtil.fromJson(mqExtInfo.toString(), InlongGroupPulsarInfo.class);
groupApproveInfo.setAckQuorum(pulsarInfo.getAckQuorum());
groupApproveInfo.setEnsemble(pulsarInfo.getEnsemble());