Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-4551][TubeMQ] Batch delete consumer groups and authorized consumer groups from the blacklist #4600

Merged
merged 1 commit into from
Jun 14, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import lombok.extern.slf4j.Slf4j;
import org.apache.inlong.tubemq.manager.controller.TubeMQResult;
import org.apache.inlong.tubemq.manager.controller.group.request.AddBlackGroupReq;
import org.apache.inlong.tubemq.manager.controller.group.request.BatchDeleteGroupReq;
import org.apache.inlong.tubemq.manager.controller.group.request.DeleteBlackGroupReq;
import org.apache.inlong.tubemq.manager.controller.group.request.DeleteOffsetReq;
import org.apache.inlong.tubemq.manager.controller.group.request.FilterCondGroupReq;
Expand Down Expand Up @@ -75,6 +76,8 @@ public TubeMQResult groupMethodProxy(@RequestParam String method, @RequestBody S
return batchAddGroup(gson.fromJson(req, BatchAddGroupAuthReq.class));
case TubeConst.DELETE:
return masterService.baseRequestMaster(gson.fromJson(req, DeleteGroupReq.class));
case TubeConst.BATCH_DELETE:
return masterService.baseRequestMaster(gson.fromJson(req, BatchDeleteGroupReq.class));
case TubeConst.REBALANCE_CONSUMER_GROUP:
return topicService.rebalanceGroup(gson.fromJson(req, RebalanceGroupReq.class));
case TubeConst.REBALANCE_CONSUMER:
Expand Down Expand Up @@ -142,6 +145,8 @@ TubeMQResult blackGroupProxy(
return masterService.baseRequestMaster(gson.fromJson(req, AddBlackGroupReq.class));
case TubeConst.DELETE:
return masterService.baseRequestMaster(gson.fromJson(req, DeleteBlackGroupReq.class));
case TubeConst.BATCH_DELETE:
return masterService.baseRequestMaster(gson.fromJson(req, BatchDeleteGroupReq.class));
default:
return TubeMQResult.errorResult(TubeMQErrorConst.NO_SUCH_METHOD);
}
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
/*
* 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.tubemq.manager.controller.group.request;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.apache.inlong.tubemq.manager.controller.node.request.BaseReq;
import org.apache.inlong.tubemq.manager.controller.topic.request.GroupAuthItem;

import java.util.List;

/**
* Batch delete group info
*/
@Data
@EqualsAndHashCode(callSuper = true)
@ToString(callSuper = true)
public class BatchDeleteGroupReq extends BaseReq {
private List<GroupAuthItem> groupNameJsonSet;
healchow marked this conversation as resolved.
Show resolved Hide resolved
private String confModAuthToken;
private String modifyUser;
}
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ public TubeMQResult queryOffset(QueryOffsetReq req) {
generateOffsetInfo(offsetPerBroker, topicInfo, res);
}

result.setData(gson.toJson(allBrokersOffsetRes));
result.setData(allBrokersOffsetRes);
return result;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ public class TubeConst {
public static final String QUERY_CAN_WRITE = "queryCanWrite";
public static final String FILTER_CONDITION = "filterCondition";
public static final String FLOW_CONTROL = "flowControl";
public static final String BATCH_DELETE = "batchDelete";


/**
Expand Down