fuweng11 commented on code in PR #8424: URL: https://github.com/apache/inlong/pull/8424#discussion_r1255744823
########## inlong-manager/manager-dao/src/main/resources/mappers/AuditQuerySourceConfigEntityMapper.xml: ########## @@ -0,0 +1,74 @@ +<?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.AuditQuerySourceConfigEntityMapper"> + <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity"> + <result column="id" jdbcType="INTEGER" property="id"/> + <result column="source_type" jdbcType="VARCHAR" property="sourceType"/> + <result column="source_url" jdbcType="VARCHAR" property="sourceUrl"/> + <result column="auth_enable" jdbcType="TINYINT" property="authEnable"/> + <result column="username" jdbcType="VARCHAR" property="username"/> + <result column="password" jdbcType="VARCHAR" property="password"/> + <result column="status" jdbcType="SMALLINT" property="status"/> + <result column="creator" jdbcType="VARCHAR" property="creator"/> + <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> + <result column="modifier" jdbcType="VARCHAR" property="modifier"/> + <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/> + <result column="is_deleted" jdbcType="TINYINT" property="isDeleted"/> + <result column="version" jdbcType="INTEGER" property="version"/> + </resultMap> + <sql id="Base_Column_List"> + id, source_type, source_url, auth_enable, username, password, status, creator, create_time, modifier, modify_time, version + </sql> + <select id="findByStatus" resultType="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity" + resultMap="BaseResultMap"> + select + <include refid="Base_Column_List"></include> Review Comment: ```suggestion <include refid="Base_Column_List"></include> ``` ########## inlong-manager/manager-dao/src/main/resources/mappers/AuditQuerySourceConfigEntityMapper.xml: ########## @@ -0,0 +1,74 @@ +<?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.AuditQuerySourceConfigEntityMapper"> + <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity"> + <result column="id" jdbcType="INTEGER" property="id"/> + <result column="source_type" jdbcType="VARCHAR" property="sourceType"/> + <result column="source_url" jdbcType="VARCHAR" property="sourceUrl"/> + <result column="auth_enable" jdbcType="TINYINT" property="authEnable"/> + <result column="username" jdbcType="VARCHAR" property="username"/> + <result column="password" jdbcType="VARCHAR" property="password"/> + <result column="status" jdbcType="SMALLINT" property="status"/> + <result column="creator" jdbcType="VARCHAR" property="creator"/> + <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> + <result column="modifier" jdbcType="VARCHAR" property="modifier"/> + <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/> + <result column="is_deleted" jdbcType="TINYINT" property="isDeleted"/> + <result column="version" jdbcType="INTEGER" property="version"/> + </resultMap> + <sql id="Base_Column_List"> + id, source_type, source_url, auth_enable, username, password, status, creator, create_time, modifier, modify_time, version + </sql> + <select id="findByStatus" resultType="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity" + resultMap="BaseResultMap"> + select + <include refid="Base_Column_List"></include> + from audit_source + where status = 1 + and is_deleted = 0 + limit 1 + </select> + <update id="offlineAuditQuerySourceByUrl"> + update audit_source + set status = 0 + where source_url = #{sourceUrl} Review Comment: ```suggestion where source_url = #{sourceUrl, jdbcType=VARCHAR} ``` ########## inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/audit/AuditSourceResponse.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.pojo.audit; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +@ApiModel("Audit source response") +public class AuditSourceResponse { + + @ApiModelProperty(value = "Id") + Integer id; Review Comment: ```suggestion private Integer id; ``` ########## inlong-manager/manager-dao/src/main/resources/mappers/AuditQuerySourceConfigEntityMapper.xml: ########## @@ -0,0 +1,74 @@ +<?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.AuditQuerySourceConfigEntityMapper"> + <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity"> + <result column="id" jdbcType="INTEGER" property="id"/> + <result column="source_type" jdbcType="VARCHAR" property="sourceType"/> + <result column="source_url" jdbcType="VARCHAR" property="sourceUrl"/> + <result column="auth_enable" jdbcType="TINYINT" property="authEnable"/> + <result column="username" jdbcType="VARCHAR" property="username"/> + <result column="password" jdbcType="VARCHAR" property="password"/> + <result column="status" jdbcType="SMALLINT" property="status"/> + <result column="creator" jdbcType="VARCHAR" property="creator"/> + <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> + <result column="modifier" jdbcType="VARCHAR" property="modifier"/> + <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/> + <result column="is_deleted" jdbcType="TINYINT" property="isDeleted"/> + <result column="version" jdbcType="INTEGER" property="version"/> + </resultMap> + <sql id="Base_Column_List"> + id, source_type, source_url, auth_enable, username, password, status, creator, create_time, modifier, modify_time, version + </sql> + <select id="findByStatus" resultType="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity" + resultMap="BaseResultMap"> + select + <include refid="Base_Column_List"></include> + from audit_source + where status = 1 + and is_deleted = 0 + limit 1 + </select> + <update id="offlineAuditQuerySourceByUrl"> + update audit_source + set status = 0 + where source_url = #{sourceUrl} + and is_deleted = 0; + </update> + <update id="onlineAuditQuerySourceByUrl"> + update audit_source + set status = 1 + where source_url = #{sourceUrl} Review Comment: ```suggestion where source_url = #{sourceUrl, jdbcType=VARCHAR} ``` ########## inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/audit/AuditSourceResponse.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.pojo.audit; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +@ApiModel("Audit source response") +public class AuditSourceResponse { + + @ApiModelProperty(value = "Id") + Integer id; + + @ApiModelProperty(value = "MYSQL, CLICKHOUSE or ELASTICSEARCH") + private String sourceType; + + @ApiModelProperty(value = "Source url") + private String sourceUrl; + + @ApiModelProperty(value = "Auth enable") + Integer authEnable; Review Comment: ditto ########## inlong-manager/manager-dao/src/main/resources/mappers/AuditQuerySourceConfigEntityMapper.xml: ########## @@ -0,0 +1,74 @@ +<?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.AuditQuerySourceConfigEntityMapper"> + <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity"> + <result column="id" jdbcType="INTEGER" property="id"/> + <result column="source_type" jdbcType="VARCHAR" property="sourceType"/> + <result column="source_url" jdbcType="VARCHAR" property="sourceUrl"/> + <result column="auth_enable" jdbcType="TINYINT" property="authEnable"/> + <result column="username" jdbcType="VARCHAR" property="username"/> + <result column="password" jdbcType="VARCHAR" property="password"/> + <result column="status" jdbcType="SMALLINT" property="status"/> + <result column="creator" jdbcType="VARCHAR" property="creator"/> + <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> + <result column="modifier" jdbcType="VARCHAR" property="modifier"/> + <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/> + <result column="is_deleted" jdbcType="TINYINT" property="isDeleted"/> + <result column="version" jdbcType="INTEGER" property="version"/> + </resultMap> + <sql id="Base_Column_List"> + id, source_type, source_url, auth_enable, username, password, status, creator, create_time, modifier, modify_time, version + </sql> + <select id="findByStatus" resultType="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity" + resultMap="BaseResultMap"> + select + <include refid="Base_Column_List"></include> + from audit_source + where status = 1 + and is_deleted = 0 + limit 1 + </select> + <update id="offlineAuditQuerySourceByUrl"> + update audit_source + set status = 0 + where source_url = #{sourceUrl} + and is_deleted = 0; + </update> + <update id="onlineAuditQuerySourceByUrl"> + update audit_source + set status = 1 + where source_url = #{sourceUrl} + and is_deleted = 0; + </update> + <insert id="insert" keyProperty="source_url"> + insert into audit_source (source_type, source_url, auth_enable, username, password, status, creator, create_time, modifier, modify_time, is_deleted, version) + values (#{sourceType}, #{sourceUrl}, #{authEnable}, #{username}, #{password}, #{status}, #{creator}, #{createTime}, #{modifier}, #{modifyTime}, #{isDeleted}, #{version}) Review Comment: ditto. ########## inlong-manager/manager-dao/src/main/resources/mappers/AuditQuerySourceConfigEntityMapper.xml: ########## @@ -0,0 +1,74 @@ +<?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.AuditQuerySourceConfigEntityMapper"> + <resultMap id="BaseResultMap" type="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity"> + <result column="id" jdbcType="INTEGER" property="id"/> + <result column="source_type" jdbcType="VARCHAR" property="sourceType"/> + <result column="source_url" jdbcType="VARCHAR" property="sourceUrl"/> + <result column="auth_enable" jdbcType="TINYINT" property="authEnable"/> + <result column="username" jdbcType="VARCHAR" property="username"/> + <result column="password" jdbcType="VARCHAR" property="password"/> + <result column="status" jdbcType="SMALLINT" property="status"/> + <result column="creator" jdbcType="VARCHAR" property="creator"/> + <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/> + <result column="modifier" jdbcType="VARCHAR" property="modifier"/> + <result column="modify_time" jdbcType="TIMESTAMP" property="modifyTime"/> + <result column="is_deleted" jdbcType="TINYINT" property="isDeleted"/> + <result column="version" jdbcType="INTEGER" property="version"/> + </resultMap> + <sql id="Base_Column_List"> + id, source_type, source_url, auth_enable, username, password, status, creator, create_time, modifier, modify_time, version + </sql> + <select id="findByStatus" resultType="org.apache.inlong.manager.dao.entity.AuditQuerySourceConfigEntity" + resultMap="BaseResultMap"> + select + <include refid="Base_Column_List"></include> + from audit_source + where status = 1 + and is_deleted = 0 + limit 1 + </select> + <update id="offlineAuditQuerySourceByUrl"> + update audit_source + set status = 0 + where source_url = #{sourceUrl} + and is_deleted = 0; + </update> + <update id="onlineAuditQuerySourceByUrl"> + update audit_source + set status = 1 + where source_url = #{sourceUrl} + and is_deleted = 0; + </update> + <insert id="insert" keyProperty="source_url"> Review Comment: ```suggestion <insert id="insertOrUpdate" keyProperty="id"> ``` ########## inlong-manager/manager-pojo/src/main/java/org/apache/inlong/manager/pojo/audit/AuditSourceResponse.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.pojo.audit; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +@Data +@ApiModel("Audit source response") +public class AuditSourceResponse { + + @ApiModelProperty(value = "Id") + Integer id; + + @ApiModelProperty(value = "MYSQL, CLICKHOUSE or ELASTICSEARCH") + private String sourceType; + + @ApiModelProperty(value = "Source url") + private String sourceUrl; + + @ApiModelProperty(value = "Auth enable") + Integer authEnable; + + @ApiModelProperty(value = "Username") + private String username; + + @ApiModelProperty(value = "Password") + String password; Review Comment: ditto ########## inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/ck/ClickHouseConfig.java: ########## @@ -29,46 +34,66 @@ /** * Clickhouse config information, including url, user, etc. */ -@Component +@Service +@Slf4j public class ClickHouseConfig { + @Autowired + private AuditQuerySourceConfigEntityMapper querySourceConfigEntityMapper; private static volatile DataSource source; + private static volatile String currentJdbcUrl = null; + private static volatile String currentUserName = null; + private static volatile String currentPassword = null; - private static String jdbcUrl; - - private static String username; - - private static String password; - - @Value("${audit.ck.jdbcUrl}") - public void setUrl(String jdbcUrl) { - ClickHouseConfig.jdbcUrl = jdbcUrl; - } - - @Value("${audit.ck.username}") - public void setUsername(String username) { - ClickHouseConfig.username = username; - } - - @Value("${audit.ck.password}") - public void setPassword(String password) { - ClickHouseConfig.password = password; - } + public void updateCkSource() { + try { + if (querySourceConfigEntityMapper == null) { + log.warn("querySourceConfigEntityMapper is null"); + return; + } + AuditQuerySourceConfigEntity querySourceConfigEntity = querySourceConfigEntityMapper.findByStatus(); + String jdbcUrl = querySourceConfigEntity.getSourceUrl(); + String username = querySourceConfigEntity.getUsername(); + String password = StringUtils.isBlank(querySourceConfigEntity.getPassword()) ? "" + : querySourceConfigEntity.getPassword(); + if (StringUtils.isBlank(currentJdbcUrl) || StringUtils.isBlank(currentUserName) + || StringUtils.isBlank(currentPassword) + || !(currentJdbcUrl.equals(jdbcUrl) && currentUserName.equals(username) + && currentPassword.equals(password))) { + synchronized (ClickHouseConfig.class) { + currentJdbcUrl = jdbcUrl; + currentUserName = username; + currentPassword = password; - /** - * Get ClickHouse connection from data source - */ - public static Connection getCkConnection() throws Exception { - if (source == null) { - synchronized (ClickHouseConfig.class) { - if (source == null) { Properties pros = new Properties(); pros.put("url", jdbcUrl); pros.put("username", username); pros.put("password", password); - source = DruidDataSourceFactory.createDataSource(pros); + try { Review Comment: There is no need to catch exceptions here. ########## inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AuditServiceImpl.java: ########## @@ -113,7 +118,7 @@ public class AuditServiceImpl implements AuditService { private List<String> auditIdListForUser; @Value("${audit.query.source}") Review Comment: ```suggestion @Value("${audit.query.source:MYSQL}") ``` ########## inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/core/impl/AuditServiceImpl.java: ########## @@ -159,6 +168,53 @@ public Boolean refreshBaseItemCache() { return true; } + private AuditQuerySourceConfigEntity createAuditQuerySource(String sourceType, String sourceUrl, + Integer auth_Enable, String username, + String password) { + AuditQuerySourceConfigEntity auditQuerySourceConfig = new AuditQuerySourceConfigEntity(); + auditQuerySourceConfig.setSourceType(sourceType); + auditQuerySourceConfig.setSourceUrl(sourceUrl); + auditQuerySourceConfig.setAuthEnable(auth_Enable); + auditQuerySourceConfig.setUsername(username); + auditQuerySourceConfig.setPassword(password); + auditQuerySourceConfig.setStatus(1); + auditQuerySourceConfig.setCreator(LoginUserUtils.getLoginUser().getName()); + auditQuerySourceConfig.setCreateTime(new Date()); + auditQuerySourceConfig.setModifier(LoginUserUtils.getLoginUser().getName()); + auditQuerySourceConfig.setModifyTime(new Date()); + auditQuerySourceConfig.setIsDeleted(0); + auditQuerySourceConfig.setVersion(1); + return auditQuerySourceConfig; + } + @Override + public Boolean updateAuditQuerySource(AuditSourceRequest request) { + String oldUrl = request.getOldUrl(); + String sourceType = request.getSourceType(); + String sourceUrl = request.getSourceUrl(); + String username = request.getUsername(); + String password = request.getPassword(); + Integer authEnable = (request.getAuthEnable() == null) ? 1 : request.getAuthEnable(); + try { + if (!StringUtils.isBlank(oldUrl)) { + querySourceConfigEntityMapper.offlineAuditQuerySourceByUrl(oldUrl); + } + AuditQuerySourceConfigEntity entity = Review Comment: ```suggestion AuditQuerySourceConfigEntity entity =CommonBeanUtils.copyProperties(request, AuditQuerySourceConfigEntity::new); ``` ########## inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/resource/sink/ck/ClickHouseConfig.java: ########## @@ -30,45 +35,61 @@ * Clickhouse config information, including url, user, etc. */ @Component +@Service +@Slf4j public class ClickHouseConfig { + @Autowired + private AuditQuerySourceConfigEntityMapper querySourceConfigEntityMapper; private static volatile DataSource source; + private static volatile String currentJdbcUrl = null; + private static volatile String currentUserName = null; + private static volatile String currentPassword = null; - private static String jdbcUrl; - - private static String username; - - private static String password; - - @Value("${audit.ck.jdbcUrl}") - public void setUrl(String jdbcUrl) { - ClickHouseConfig.jdbcUrl = jdbcUrl; - } - - @Value("${audit.ck.username}") - public void setUsername(String username) { - ClickHouseConfig.username = username; - } - - @Value("${audit.ck.password}") - public void setPassword(String password) { - ClickHouseConfig.password = password; - } + public void updateCkSource() { + try { + if (querySourceConfigEntityMapper == null) { Review Comment: This is never null. Remove it. -- 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: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
