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/08/14 14:29:12 UTC

[GitHub] [inlong] ciscozhou opened a new pull request, #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

ciscozhou opened a new pull request, #5542:
URL: https://github.com/apache/inlong/pull/5542

   ### Prepare a Pull Request
   
   - Fixes #5302 
   
   ### Motivation
   
   *Supports the extension of data consumption for different MQs*
   


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


[GitHub] [inlong] ciscozhou commented on a diff in pull request #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

Posted by GitBox <gi...@apache.org>.
ciscozhou commented on code in PR #5542:
URL: https://github.com/apache/inlong/pull/5542#discussion_r961198067


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/consume/InlongConsumeServiceImpl.java:
##########
@@ -0,0 +1,223 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.service.consume;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.inlong.manager.common.consts.InlongConstants;
+import org.apache.inlong.manager.common.enums.ConsumeStatus;
+import org.apache.inlong.manager.common.enums.ErrorCodeEnum;
+import org.apache.inlong.manager.common.exceptions.BusinessException;
+import org.apache.inlong.manager.common.util.CommonBeanUtils;
+import org.apache.inlong.manager.common.util.Preconditions;
+import org.apache.inlong.manager.dao.entity.InlongConsumeEntity;
+import org.apache.inlong.manager.dao.mapper.InlongConsumeEntityMapper;
+import org.apache.inlong.manager.pojo.common.OrderFieldEnum;
+import org.apache.inlong.manager.pojo.common.OrderTypeEnum;
+import org.apache.inlong.manager.pojo.common.PageResult;
+import org.apache.inlong.manager.pojo.consume.InlongConsumeBriefInfo;
+import org.apache.inlong.manager.pojo.consume.InlongConsumeCountInfo;
+import org.apache.inlong.manager.pojo.consume.InlongConsumeInfo;
+import org.apache.inlong.manager.pojo.consume.InlongConsumePageRequest;
+import org.apache.inlong.manager.pojo.consume.InlongConsumeRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import static org.apache.inlong.manager.pojo.common.PageRequest.MAX_PAGE_SIZE;
+
+/**
+ * Inlong consume service layer implementation
+ */
+@Service
+public class InlongConsumeServiceImpl implements InlongConsumeService {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(InlongConsumeServiceImpl.class);
+
+    @Autowired
+    private InlongConsumeEntityMapper consumeMapper;
+    @Autowired
+    private InlongConsumeOperatorFactory consumeOperatorFactory;
+
+    @Override
+    public Integer save(InlongConsumeRequest request, String operator) {
+        LOGGER.debug("begin to save inlong consume={} by user={}", request, operator);
+        Preconditions.checkNotNull(request, "inlong consume request cannot be null");
+        Preconditions.checkNotNull(request.getTopic(), "inlong consume topic cannot be null");
+        String consumerGroup = request.getConsumerGroup();
+        Preconditions.checkNotNull(consumerGroup, "inlong consume topic cannot be null");
+        if (consumerGroupExists(consumerGroup, request.getId())) {
+            throw new BusinessException(String.format("consumer group %s already exist", consumerGroup));
+        }
+
+        //if (GroupStatus.notAllowedUpdate(curStatus)) {

Review Comment:
   removed



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


[GitHub] [inlong] leosanqing commented on a diff in pull request #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

Posted by GitBox <gi...@apache.org>.
leosanqing commented on code in PR #5542:
URL: https://github.com/apache/inlong/pull/5542#discussion_r948945103


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/consume/InlongConsumeServiceImpl.java:
##########
@@ -0,0 +1,165 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.service.consume;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import com.github.pagehelper.PageInfo;
+import lombok.extern.slf4j.Slf4j;
+import org.apache.inlong.manager.common.enums.ConsumptionStatus;
+import org.apache.inlong.manager.common.enums.ErrorCodeEnum;
+import org.apache.inlong.manager.common.exceptions.BusinessException;
+import org.apache.inlong.manager.common.util.CommonBeanUtils;
+import org.apache.inlong.manager.common.util.Preconditions;
+import org.apache.inlong.manager.dao.entity.InlongConsumeEntity;
+import org.apache.inlong.manager.dao.mapper.InlongConsumeEntityMapper;
+import org.apache.inlong.manager.pojo.common.CountInfo;
+import org.apache.inlong.manager.pojo.consumption.ConsumptionListVo;
+import org.apache.inlong.manager.pojo.consumption.ConsumptionQuery;
+import org.apache.inlong.manager.pojo.consumption.ConsumptionSummary;
+import org.apache.inlong.manager.pojo.consumption.InlongConsumeInfo;
+import org.apache.inlong.manager.pojo.consumption.InlongConsumeRequest;
+import org.apache.inlong.manager.pojo.user.UserRoleCode;
+import org.apache.inlong.manager.service.user.LoginUserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Transactional;
+import org.springframework.util.CollectionUtils;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+
+/**
+ * Inlong consume service layer implementation
+ */
+@Slf4j
+@Service
+public class InlongConsumeServiceImpl implements InlongConsumeService {
+
+    @Autowired
+    private InlongConsumeEntityMapper consumeEntityMapper;
+
+    @Autowired
+    private InlongConsumeOperatorFactory consumeOperatorFactory;
+
+    @Override
+    public Integer save(InlongConsumeRequest consumeRequest, String operator) {
+        log.debug("begin to save consumption info={}", consumeRequest);
+        Preconditions.checkNotNull(consumeRequest, "consumption info cannot be null");
+        Preconditions.checkNotNull(consumeRequest.getTopic(), "consumption topic cannot be empty");
+        if (isConsumerGroupExists(consumeRequest.getConsumerGroup(), consumeRequest.getId())) {
+            throw new BusinessException(String.format("consumer group %s already exist",
+                    consumeRequest.getConsumerGroup()));
+        }
+
+        if (consumeRequest.getId() != null) {
+            InlongConsumeEntity consumeEntity = consumeEntityMapper.selectByPrimaryKey(consumeRequest.getId());
+            Preconditions.checkNotNull(consumeEntity, "consumption not exist with id: " + consumeRequest.getId());
+            ConsumptionStatus consumptionStatus = ConsumptionStatus.fromStatus(consumeEntity.getStatus());
+            Preconditions.checkTrue(ConsumptionStatus.ALLOW_SAVE_UPDATE_STATUS.contains(consumptionStatus),
+                    "consumption not allow update when status is " + consumptionStatus.name());
+        }
+
+        InlongConsumeOperator instance = consumeOperatorFactory.getInstance(consumeRequest.getMqType());
+        instance.setTopicInfo(consumeRequest);
+        instance.saveOpt(consumeRequest, operator);
+        return consumeRequest.getId();
+    }
+
+    @Override
+    public boolean isConsumerGroupExists(String consumerGroup, Integer excludeSelfId) {
+        ConsumptionQuery consumptionQuery = new ConsumptionQuery();
+        consumptionQuery.setConsumerGroup(consumerGroup);
+        consumptionQuery.setIsAdminRole(true);
+        List<InlongConsumeEntity> result = consumeEntityMapper.listByQuery(consumptionQuery);
+        if (excludeSelfId != null) {
+            result = result.stream().filter(consumer -> !excludeSelfId.equals(consumer.getId()))
+                    .collect(Collectors.toList());
+        }
+        return !CollectionUtils.isEmpty(result);

Review Comment:
   Could use apache.commons.collectionUtils.CollectionUtils.isNotEmpty()
   Easier to understand



##########
inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/consumption/pulsar/ConsumePulsarDTO.java:
##########
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.pojo.consumption.pulsar;
+
+import com.fasterxml.jackson.databind.DeserializationFeature;
+import com.fasterxml.jackson.databind.ObjectMapper;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.AllArgsConstructor;
+import lombok.Builder;
+import lombok.Data;
+import lombok.NoArgsConstructor;
+import org.apache.inlong.manager.common.enums.ErrorCodeEnum;
+import org.apache.inlong.manager.common.exceptions.BusinessException;
+
+import javax.validation.constraints.NotNull;
+
+/**
+ * Inlong group info for Pulsar
+ */
+@Data
+@Builder
+@NoArgsConstructor
+@AllArgsConstructor
+@ApiModel("Inlong group info for Pulsar")
+public class ConsumePulsarDTO {
+
+    private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper(); // thread safe
+
+    @ApiModelProperty(value = "Consumption ID")
+    private Integer consumptionId;
+
+//    @ApiModelProperty(value = "Consumer group")

Review Comment:
   Personal suggestion, new classes, it is best not to keep comments, delete them directly,
   
   Same as below



##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/consume/InlongConsumeOperatorFactory.java:
##########
@@ -0,0 +1,46 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.service.consume;
+
+import org.apache.inlong.manager.common.enums.ErrorCodeEnum;
+import org.apache.inlong.manager.common.exceptions.BusinessException;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.Optional;
+
+@Service
+public class InlongConsumeOperatorFactory {
+
+    @Autowired
+    private List<InlongConsumeOperator> consumeOperatorList;
+
+    /**
+     * Get a consumption operator instance via the given mqType
+     */
+    public InlongConsumeOperator getInstance(String mqType) {

Review Comment:
   ```suggestion
       public InlongConsumeOperator getInstance(String mqType) {
           return consumeOperatorList.stream()
                   .filter(inst -> inst.accept(mqType))
                   .findFirst()
                   .orElseThrow(() -> new BusinessException(String.format(ErrorCodeEnum.MQ_TYPE_NOT_SUPPORTED.getMessage(), mqType)));
       }
   ```



##########
inlong-manager/manager-web/src/main/java/org/apache/inlong/manager/web/controller/InlongConsumeController.java:
##########
@@ -0,0 +1,108 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.web.controller;
+
+import com.github.pagehelper.PageInfo;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiImplicitParam;
+import io.swagger.annotations.ApiOperation;
+import org.apache.inlong.manager.common.enums.OperationType;
+import org.apache.inlong.manager.pojo.common.Response;
+import org.apache.inlong.manager.pojo.consumption.ConsumptionListVo;
+import org.apache.inlong.manager.pojo.consumption.ConsumptionQuery;
+import org.apache.inlong.manager.pojo.consumption.ConsumptionSummary;
+import org.apache.inlong.manager.pojo.consumption.InlongConsumeInfo;
+import org.apache.inlong.manager.pojo.consumption.InlongConsumeRequest;
+import org.apache.inlong.manager.service.consume.InlongConsumeService;
+import org.apache.inlong.manager.service.group.InlongGroupProcessService;
+import org.apache.inlong.manager.service.group.InlongGroupService;
+import org.apache.inlong.manager.service.operationlog.OperationLog;
+import org.apache.inlong.manager.service.user.LoginUserUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.validation.annotation.Validated;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestMethod;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * Inlong consume control layer
+ */
+@RestController
+@RequestMapping("/api")
+@Api(tags = "Inlong-Consume-API")
+public class InlongConsumeController {
+
+    @Autowired
+    private InlongGroupService groupService;
+    @Autowired
+    private InlongGroupProcessService groupProcessOperation;
+    @Autowired
+    private InlongConsumeService consumeService;
+
+    @RequestMapping(value = "/consume/save", method = RequestMethod.POST)
+    @OperationLog(operation = OperationType.CREATE)
+    @ApiOperation(value = "Save inlong consume")
+    public Response<Integer> save(@Validated @RequestBody InlongConsumeRequest consumeRequest) {

Review Comment:
   Create and update different field checks, such as Id, you can refer to this class
   
   org.apache.inlong.manager.web.controller.StreamTransformController#update
   



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


[GitHub] [inlong] woofyzhao commented on a diff in pull request #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

Posted by GitBox <gi...@apache.org>.
woofyzhao commented on code in PR #5542:
URL: https://github.com/apache/inlong/pull/5542#discussion_r960325937


##########
inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/consume/InlongConsumeServiceImpl.java:
##########
@@ -0,0 +1,223 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.service.consume;
+
+import com.github.pagehelper.Page;
+import com.github.pagehelper.PageHelper;
+import org.apache.commons.collections.CollectionUtils;
+import org.apache.inlong.manager.common.consts.InlongConstants;
+import org.apache.inlong.manager.common.enums.ConsumeStatus;
+import org.apache.inlong.manager.common.enums.ErrorCodeEnum;
+import org.apache.inlong.manager.common.exceptions.BusinessException;
+import org.apache.inlong.manager.common.util.CommonBeanUtils;
+import org.apache.inlong.manager.common.util.Preconditions;
+import org.apache.inlong.manager.dao.entity.InlongConsumeEntity;
+import org.apache.inlong.manager.dao.mapper.InlongConsumeEntityMapper;
+import org.apache.inlong.manager.pojo.common.OrderFieldEnum;
+import org.apache.inlong.manager.pojo.common.OrderTypeEnum;
+import org.apache.inlong.manager.pojo.common.PageResult;
+import org.apache.inlong.manager.pojo.consume.InlongConsumeBriefInfo;
+import org.apache.inlong.manager.pojo.consume.InlongConsumeCountInfo;
+import org.apache.inlong.manager.pojo.consume.InlongConsumeInfo;
+import org.apache.inlong.manager.pojo.consume.InlongConsumePageRequest;
+import org.apache.inlong.manager.pojo.consume.InlongConsumeRequest;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Isolation;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
+
+import java.util.List;
+import java.util.Map;
+import java.util.Objects;
+import java.util.stream.Collectors;
+
+import static org.apache.inlong.manager.pojo.common.PageRequest.MAX_PAGE_SIZE;
+
+/**
+ * Inlong consume service layer implementation
+ */
+@Service
+public class InlongConsumeServiceImpl implements InlongConsumeService {
+
+    private static final Logger LOGGER = LoggerFactory.getLogger(InlongConsumeServiceImpl.class);
+
+    @Autowired
+    private InlongConsumeEntityMapper consumeMapper;
+    @Autowired
+    private InlongConsumeOperatorFactory consumeOperatorFactory;
+
+    @Override
+    public Integer save(InlongConsumeRequest request, String operator) {
+        LOGGER.debug("begin to save inlong consume={} by user={}", request, operator);
+        Preconditions.checkNotNull(request, "inlong consume request cannot be null");
+        Preconditions.checkNotNull(request.getTopic(), "inlong consume topic cannot be null");
+        String consumerGroup = request.getConsumerGroup();
+        Preconditions.checkNotNull(consumerGroup, "inlong consume topic cannot be null");
+        if (consumerGroupExists(consumerGroup, request.getId())) {
+            throw new BusinessException(String.format("consumer group %s already exist", consumerGroup));
+        }
+
+        //if (GroupStatus.notAllowedUpdate(curStatus)) {

Review Comment:
   Should the commented code be removed?



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


[GitHub] [inlong] healchow commented on a diff in pull request #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

Posted by GitBox <gi...@apache.org>.
healchow commented on code in PR #5542:
URL: https://github.com/apache/inlong/pull/5542#discussion_r956558080


##########
inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/InlongConsumeEntity.java:
##########
@@ -0,0 +1,64 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements. See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License. You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.inlong.manager.dao.entity;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * Inlong consume entity.
+ */
+@Data
+public class InlongConsumeEntity implements Serializable {
+
+    private static final long serialVersionUID = 1L;
+    private Integer id;
+    private String inlongGroupId;
+    private String consumerGroup;
+    private Integer filterEnabled;
+    private String inlongStreamId;
+//    private String name;
+    private String description;
+    private String mqType;
+    private String topic;
+//    private String mqResource;

Review Comment:
   Just remove those fields if they were not necessary.



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


[GitHub] [inlong] woofyzhao commented on a diff in pull request #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

Posted by GitBox <gi...@apache.org>.
woofyzhao commented on code in PR #5542:
URL: https://github.com/apache/inlong/pull/5542#discussion_r960320596


##########
inlong-manager/manager-dao/src/main/resources/mappers/InlongConsumeEntityMapper.xml:
##########
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.inlong.manager.dao.mapper.InlongConsumeEntityMapper">
+    <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.InlongConsumeEntity">
+        <id column="id" jdbcType="INTEGER" property="id"/>
+        <result column="consumer_group" jdbcType="VARCHAR" property="consumerGroup"/>
+        <result column="description" jdbcType="VARCHAR" property="description"/>
+        <result column="mq_type" jdbcType="VARCHAR" property="mqType"/>
+        <result column="topic" jdbcType="VARCHAR" property="topic"/>
+        <result column="inlong_group_id" jdbcType="VARCHAR" property="inlongGroupId"/>
+        <result column="filter_enabled" jdbcType="INTEGER" property="filterEnabled"/>
+        <result column="inlong_stream_id" jdbcType="VARCHAR" property="inlongStreamId"/>
+        <result column="ext_params" jdbcType="LONGVARCHAR" property="extParams"/>
+        <result column="in_charges" jdbcType="VARCHAR" property="inCharges"/>
+        <result column="status" jdbcType="INTEGER" property="status"/>
+        <result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/>
+        <result column="creator" jdbcType="VARCHAR" property="creator"/>
+        <result column="modifier" jdbcType="VARCHAR" property="modifier"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/>
+        <result column="version" jdbcType="INTEGER" property="version"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id

Review Comment:
   unnecessary line break



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


[GitHub] [inlong] woofyzhao commented on a diff in pull request #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

Posted by GitBox <gi...@apache.org>.
woofyzhao commented on code in PR #5542:
URL: https://github.com/apache/inlong/pull/5542#discussion_r960320596


##########
inlong-manager/manager-dao/src/main/resources/mappers/InlongConsumeEntityMapper.xml:
##########
@@ -0,0 +1,191 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+    Licensed to the Apache Software Foundation (ASF) under one
+    or more contributor license agreements. See the NOTICE file
+    distributed with this work for additional information
+    regarding copyright ownership. The ASF licenses this file
+    to you under the Apache License, Version 2.0 (the
+    "License"); you may not use this file except in compliance
+    with the License. You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+    Unless required by applicable law or agreed to in writing,
+    software distributed under the License is distributed on an
+    "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+    KIND, either express or implied.  See the License for the
+    specific language governing permissions and limitations
+    under the License.
+-->
+
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="org.apache.inlong.manager.dao.mapper.InlongConsumeEntityMapper">
+    <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.InlongConsumeEntity">
+        <id column="id" jdbcType="INTEGER" property="id"/>
+        <result column="consumer_group" jdbcType="VARCHAR" property="consumerGroup"/>
+        <result column="description" jdbcType="VARCHAR" property="description"/>
+        <result column="mq_type" jdbcType="VARCHAR" property="mqType"/>
+        <result column="topic" jdbcType="VARCHAR" property="topic"/>
+        <result column="inlong_group_id" jdbcType="VARCHAR" property="inlongGroupId"/>
+        <result column="filter_enabled" jdbcType="INTEGER" property="filterEnabled"/>
+        <result column="inlong_stream_id" jdbcType="VARCHAR" property="inlongStreamId"/>
+        <result column="ext_params" jdbcType="LONGVARCHAR" property="extParams"/>
+        <result column="in_charges" jdbcType="VARCHAR" property="inCharges"/>
+        <result column="status" jdbcType="INTEGER" property="status"/>
+        <result column="is_deleted" jdbcType="INTEGER" property="isDeleted"/>
+        <result column="creator" jdbcType="VARCHAR" property="creator"/>
+        <result column="modifier" jdbcType="VARCHAR" property="modifier"/>
+        <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
+        <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/>
+        <result column="version" jdbcType="INTEGER" property="version"/>
+    </resultMap>
+
+    <sql id="Base_Column_List">
+        id

Review Comment:
   strange line feed



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


[GitHub] [inlong] dockerzhang merged pull request #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

Posted by GitBox <gi...@apache.org>.
dockerzhang merged PR #5542:
URL: https://github.com/apache/inlong/pull/5542


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


[GitHub] [inlong] healchow commented on pull request #5542: [INLONG-5302][Manager] Supports the extension of data consumption for different MQs

Posted by GitBox <gi...@apache.org>.
healchow commented on PR #5542:
URL: https://github.com/apache/inlong/pull/5542#issuecomment-1214391085

   Thanks for your contribution🎉
   
   Please add more info for the PR.


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