mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 03:42:07 +08:00
[Feature]增加Truncate数据功能(#1062)
增加Truncate数据功能(#1043) 目前已经完成后端部分,前端待补充。 --------- Co-authored-by: duanxiaoqiu <duanxiaoqiu@qiyi.com>
This commit is contained in:
@@ -0,0 +1,29 @@
|
||||
package com.xiaojukeji.know.streaming.km.common.bean.entity.param.topic;
|
||||
|
||||
import com.xiaojukeji.know.streaming.km.common.bean.entity.param.cluster.ClusterPhyParam;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class TopicTruncateParam extends ClusterPhyParam {
|
||||
protected String topicName;
|
||||
protected long offset;
|
||||
|
||||
public TopicTruncateParam(Long clusterPhyId, String topicName, long offset) {
|
||||
super(clusterPhyId);
|
||||
this.topicName = topicName;
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
return "TopicParam{" +
|
||||
"clusterPhyId=" + clusterPhyId +
|
||||
", topicName='" + topicName + '\'' +
|
||||
", offset='" + offset + '\'' +
|
||||
'}';
|
||||
}
|
||||
}
|
||||
@@ -49,6 +49,8 @@ public class KafkaConstant {
|
||||
|
||||
public static final Map<String, ConfigDef.ConfigKey> KAFKA_ALL_CONFIG_DEF_MAP = new ConcurrentHashMap<>();
|
||||
|
||||
public static final Integer TOPICK_TRUNCATE_DEFAULT_OFFSET = -1;
|
||||
|
||||
static {
|
||||
try {
|
||||
KAFKA_ALL_CONFIG_DEF_MAP.putAll(CollectionConverters.asJava(LogConfig$.MODULE$.configKeys()));
|
||||
|
||||
@@ -32,6 +32,8 @@ public enum OperationEnum {
|
||||
|
||||
RESTART(11, "重启"),
|
||||
|
||||
TRUNCATE(12, "清空"),
|
||||
|
||||
;
|
||||
|
||||
OperationEnum(int code, String desc) {
|
||||
|
||||
Reference in New Issue
Block a user