mirror of
https://github.com/didi/KnowStreaming.git
synced 2026-01-03 11:28:12 +08:00
配额调整
This commit is contained in:
@@ -1,30 +0,0 @@
|
||||
package com.xiaojukeji.kafka.manager.common.entity.dto;
|
||||
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
@ApiModel(description = "权限调整")
|
||||
public class TopicAuthorityDTO extends ClusterTopicDTO{
|
||||
|
||||
@ApiModelProperty(value = "appId")
|
||||
private String appId;
|
||||
|
||||
@ApiModelProperty(value = "0:无权限, 1:读, 2:写, 3:读写")
|
||||
private Integer access;
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Integer getAccess() {
|
||||
return access;
|
||||
}
|
||||
|
||||
public void setAccess(Integer access) {
|
||||
this.access = access;
|
||||
}
|
||||
}
|
||||
@@ -1,101 +0,0 @@
|
||||
package com.xiaojukeji.kafka.manager.common.entity.dto.normal;
|
||||
|
||||
import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.Properties;
|
||||
|
||||
@ApiModel(description = "创建topic")
|
||||
public class TopicAddDTO extends ClusterTopicDTO {
|
||||
|
||||
@ApiModelProperty(value = "AppID")
|
||||
private String appId;
|
||||
|
||||
@ApiModelProperty(value = "分区数")
|
||||
private Integer partitionNum;
|
||||
|
||||
@ApiModelProperty(value = "副本数")
|
||||
private Integer replicaNum;
|
||||
|
||||
@ApiModelProperty(value = "消息保存时间(ms)")
|
||||
private Long retentionTime;
|
||||
|
||||
@ApiModelProperty(value = "brokerId列表")
|
||||
private List<Integer> brokerIdList;
|
||||
|
||||
@ApiModelProperty(value = "RegionId")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty(value = "备注")
|
||||
private String description;
|
||||
|
||||
@ApiModelProperty(value = "Topic属性列表")
|
||||
private Properties properties;
|
||||
|
||||
public String getAppId() {
|
||||
return appId;
|
||||
}
|
||||
|
||||
public void setAppId(String appId) {
|
||||
this.appId = appId;
|
||||
}
|
||||
|
||||
public Integer getPartitionNum() {
|
||||
return partitionNum;
|
||||
}
|
||||
|
||||
public void setPartitionNum(Integer partitionNum) {
|
||||
this.partitionNum = partitionNum;
|
||||
}
|
||||
|
||||
public Integer getReplicaNum() {
|
||||
return replicaNum;
|
||||
}
|
||||
|
||||
public void setReplicaNum(Integer replicaNum) {
|
||||
this.replicaNum = replicaNum;
|
||||
}
|
||||
|
||||
public Long getRetentionTime() {
|
||||
return retentionTime;
|
||||
}
|
||||
|
||||
public void setRetentionTime(Long retentionTime) {
|
||||
this.retentionTime = retentionTime;
|
||||
}
|
||||
|
||||
public List<Integer> getBrokerIdList() {
|
||||
return brokerIdList;
|
||||
}
|
||||
|
||||
public void setBrokerIdList(List<Integer> brokerIdList) {
|
||||
this.brokerIdList = brokerIdList;
|
||||
}
|
||||
|
||||
public Long getRegionId() {
|
||||
return regionId;
|
||||
}
|
||||
|
||||
public void setRegionId(Long regionId) {
|
||||
this.regionId = regionId;
|
||||
}
|
||||
|
||||
public String getDescription() {
|
||||
return description;
|
||||
}
|
||||
|
||||
public void setDescription(String description) {
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
public Properties getProperties() {
|
||||
return properties;
|
||||
}
|
||||
|
||||
public void setProperties(Properties properties) {
|
||||
this.properties = properties;
|
||||
}
|
||||
|
||||
}
|
||||
@@ -1,57 +0,0 @@
|
||||
package com.xiaojukeji.kafka.manager.common.entity.dto.normal;
|
||||
|
||||
import com.xiaojukeji.kafka.manager.common.entity.dto.ClusterTopicDTO;
|
||||
import com.xiaojukeji.kafka.manager.common.utils.ValidateUtils;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@ApiModel(description = "扩分区")
|
||||
public class TopicExpandDTO extends ClusterTopicDTO {
|
||||
|
||||
@ApiModelProperty(value = "regionId")
|
||||
private Long regionId;
|
||||
|
||||
@ApiModelProperty(value = "brokerId列表")
|
||||
private List<Integer> brokerIds;
|
||||
|
||||
@ApiModelProperty(value = "新增分区数")
|
||||
private Integer partitionNum;
|
||||
|
||||
public Long getRegionId() {
|
||||
return regionId;
|
||||
}
|
||||
|
||||
public void setRegionId(Long regionId) {
|
||||
this.regionId = regionId;
|
||||
}
|
||||
|
||||
public List<Integer> getBrokerIds() {
|
||||
return brokerIds;
|
||||
}
|
||||
|
||||
public void setBrokerIds(List<Integer> brokerIds) {
|
||||
this.brokerIds = brokerIds;
|
||||
}
|
||||
|
||||
public Integer getPartitionNum() {
|
||||
return partitionNum;
|
||||
}
|
||||
|
||||
public void setPartitionNum(Integer partitionNum) {
|
||||
this.partitionNum = partitionNum;
|
||||
}
|
||||
|
||||
public boolean paramLegal() {
|
||||
if (ValidateUtils.isNull(clusterId)
|
||||
|| ValidateUtils.isNull(topicName)
|
||||
|| ValidateUtils.isNull(partitionNum) || partitionNum <= 0) {
|
||||
return false;
|
||||
}
|
||||
if (ValidateUtils.isEmptyList(brokerIds) && ValidateUtils.isNull(regionId)) {
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user