mirror of
https://github.com/didi/KnowStreaming.git
synced 2025-12-24 03:42:07 +08:00
[Optimize]Connector增改接口的configs字段名调整为config (#1080)
1、保持和原生一致; 2、当前是兼容状态,可同时支持configs和config;
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
package com.xiaojukeji.know.streaming.km.common.bean.dto.connect.connector;
|
||||
|
||||
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
|
||||
import com.xiaojukeji.know.streaming.km.common.bean.dto.connect.ClusterConnectorDTO;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import javax.validation.constraints.NotNull;
|
||||
import java.util.Properties;
|
||||
|
||||
/**
|
||||
@@ -14,15 +14,23 @@ import java.util.Properties;
|
||||
* @date 2022-10-17
|
||||
*/
|
||||
@Data
|
||||
@JsonIgnoreProperties(ignoreUnknown = true)
|
||||
@NoArgsConstructor
|
||||
@ApiModel(description = "创建Connector")
|
||||
public class ConnectorCreateDTO extends ClusterConnectorDTO {
|
||||
@NotNull(message = "configs不允许为空")
|
||||
@ApiModelProperty(value = "配置", example = "")
|
||||
@Deprecated
|
||||
@ApiModelProperty(value = "配置, 优先使用config字段,3.5.0版本将删除该字段", example = "")
|
||||
protected Properties configs;
|
||||
|
||||
public ConnectorCreateDTO(Long connectClusterId, String connectorName, Properties configs) {
|
||||
@ApiModelProperty(value = "配置", example = "")
|
||||
protected Properties config;
|
||||
|
||||
public ConnectorCreateDTO(Long connectClusterId, String connectorName, Properties config) {
|
||||
super(connectClusterId, connectorName);
|
||||
this.configs = configs;
|
||||
this.config = config;
|
||||
}
|
||||
|
||||
public Properties getSuitableConfig() {
|
||||
return config != null? config: configs;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -40,7 +40,7 @@ public class MirrorMakerCreateDTO extends ConnectorCreateDTO {
|
||||
targetKafkaProps = new Properties();
|
||||
}
|
||||
|
||||
this.unifyData(this.configs, sourceKafkaClusterId, sourceBootstrapServers, sourceKafkaProps, targetKafkaClusterId, targetBootstrapServers, targetKafkaProps);
|
||||
this.unifyData(this.getSuitableConfig(), sourceKafkaClusterId, sourceBootstrapServers, sourceKafkaProps, targetKafkaClusterId, targetBootstrapServers, targetKafkaProps);
|
||||
|
||||
if (heartbeatConnectorConfigs != null) {
|
||||
this.unifyData(this.heartbeatConnectorConfigs, sourceKafkaClusterId, sourceBootstrapServers, sourceKafkaProps, targetKafkaClusterId, targetBootstrapServers, targetKafkaProps);
|
||||
|
||||
@@ -13,7 +13,6 @@ import lombok.Data;
|
||||
@Data
|
||||
@ApiModel(description = "集群MM2状态信息")
|
||||
public class MirrorMakerBaseStateVO extends BaseVO {
|
||||
|
||||
@ApiModelProperty(value = "worker数", example = "1")
|
||||
private Integer workerCount;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user