You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by do...@apache.org on 2021/10/11 12:04:57 UTC

[incubator-inlong] branch master updated: [INLONG-1604] Fix some resultType wrong in mapper (#1605)

This is an automated email from the ASF dual-hosted git repository.

dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-inlong.git


The following commit(s) were added to refs/heads/master by this push:
     new b6a7304  [INLONG-1604] Fix some resultType wrong in mapper (#1605)
b6a7304 is described below

commit b6a7304f2aa4b5f79a869c6465817e8951c65538
Author: Wenjun Ruan <we...@apache.org>
AuthorDate: Mon Oct 11 20:04:10 2021 +0800

    [INLONG-1604] Fix some resultType wrong in mapper (#1605)
---
 .../resources/mappers/BusinessEntityMapper.xml     |  2 +-
 .../main/resources/mappers/ClusterSetMapper.xml    | 26 +++++++++++-----------
 .../repository/DataProxyConfigRepository.java      |  4 ++--
 3 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/BusinessEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/BusinessEntityMapper.xml
index 7b1153b..1c2c7e3 100644
--- a/inlong-manager/manager-dao/src/main/resources/mappers/BusinessEntityMapper.xml
+++ b/inlong-manager/manager-dao/src/main/resources/mappers/BusinessEntityMapper.xml
@@ -97,7 +97,7 @@
         </where>
         order by modify_time desc
     </select>
-    <select id="selectDataProxyConfig" resultType="org.apache.inlong.manager.common.pojo.dataproxy.DataProxyConfig">
+    <select id="selectDataProxyConfig" resultType="org.apache.inlong.manager.dao.entity.DataProxyConfig">
         select biz.business_identifier as bid, biz.mq_resource_obj as topic, d.sort_type as m
         from business biz,
              data_schema d
diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/ClusterSetMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/ClusterSetMapper.xml
index 2bb2f23..e5ca8fe 100644
--- a/inlong-manager/manager-dao/src/main/resources/mappers/ClusterSetMapper.xml
+++ b/inlong-manager/manager-dao/src/main/resources/mappers/ClusterSetMapper.xml
@@ -20,12 +20,12 @@
 
 <!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.ClusterSetMapper">
-    <select id="selectClusterSet" resultType="org.apache.inlong.manager.common.pojo.dataproxy.ClusterSet">
+    <select id="selectClusterSet" resultType="org.apache.inlong.manager.dao.entity.ClusterSet">
         select set_name,cn_name,description,middleware_type,in_charges,followers,status,is_deleted,creator,modifier
         from cluster_set
         where is_deleted = 0
     </select>
-    <select id="selectInlongId" resultType="org.apache.inlong.manager.common.pojo.dataproxy.InLongId">
+    <select id="selectInlongId" resultType="org.apache.inlong.manager.dao.entity.InLongId">
         select biz.business_identifier as inlong_id, biz.mq_resource_obj as topic, d.sort_type as params, c.set_name as set_name
         from business biz,
              data_schema d,
@@ -35,51 +35,51 @@
           and biz.schema_name = d.name
           and biz.business_identifier = c.business_identifier
     </select>
-    <select id="selectCacheCluster" resultType="org.apache.inlong.manager.common.pojo.dataproxy.CacheCluster">
+    <select id="selectCacheCluster" resultType="org.apache.inlong.manager.dao.entity.CacheCluster">
         select cluster_name,set_name,zone
         from cache_cluster
     </select>
-    <select id="selectCacheClusterExt" resultType="org.apache.inlong.manager.common.pojo.dataproxy.CacheClusterExt">
+    <select id="selectCacheClusterExt" resultType="org.apache.inlong.manager.dao.entity.CacheClusterExt">
         select cluster_name,key_name,key_value,is_deleted
         from cache_cluster_ext
         where is_deleted = 0
     </select>
     
-    <select id="selectCacheTopic" resultType="org.apache.inlong.manager.common.pojo.dataproxy.CacheTopic">
+    <select id="selectCacheTopic" resultType="org.apache.inlong.manager.dao.entity.CacheTopic">
         select topic_name,set_name,partition_num
         from cache_topic
     </select>
-    <select id="selectProxyCluster" resultType="org.apache.inlong.manager.common.pojo.dataproxy.ProxyCluster">
+    <select id="selectProxyCluster" resultType="org.apache.inlong.manager.dao.entity.ProxyCluster">
         select cluster_name,set_name,zone
         from proxy_cluster
     </select>
-    <select id="selectProxyClusterToCacheCluster" resultType="org.apache.inlong.manager.common.pojo.dataproxy.ProxyClusterToCacheCluster">
+    <select id="selectProxyClusterToCacheCluster" resultType="org.apache.inlong.manager.dao.entity.ProxyClusterToCacheCluster">
         select proxy_cluster_name,cache_cluster_name
         from proxy_cluster_to_cache_cluster
     </select>
-    <select id="selectFlumeSource" resultType="org.apache.inlong.manager.common.pojo.dataproxy.FlumeSource">
+    <select id="selectFlumeSource" resultType="org.apache.inlong.manager.dao.entity.FlumeSource">
         select source_name,set_name,type,channels,selector_type
         from flume_source
     </select>
-    <select id="selectFlumeSourceExt" resultType="org.apache.inlong.manager.common.pojo.dataproxy.FlumeSourceExt">
+    <select id="selectFlumeSourceExt" resultType="org.apache.inlong.manager.dao.entity.FlumeSourceExt">
         select parent_name,set_name,key_name,key_value,is_deleted
         from flume_source_ext
         where is_deleted = 0
     </select>
-    <select id="selectFlumeChannel" resultType="org.apache.inlong.manager.common.pojo.dataproxy.FlumeChannel">
+    <select id="selectFlumeChannel" resultType="org.apache.inlong.manager.dao.entity.FlumeChannel">
         select channel_name,set_name,type
         from flume_channel
     </select>
-    <select id="selectFlumeChannelExt" resultType="org.apache.inlong.manager.common.pojo.dataproxy.FlumeChannelExt">
+    <select id="selectFlumeChannelExt" resultType="org.apache.inlong.manager.dao.entity.FlumeChannelExt">
         select parent_name,set_name,key_name,key_value,is_deleted
         from flume_channel_ext
         where is_deleted = 0
     </select>
-    <select id="selectFlumeSink" resultType="org.apache.inlong.manager.common.pojo.dataproxy.FlumeSink">
+    <select id="selectFlumeSink" resultType="org.apache.inlong.manager.dao.entity.FlumeSink">
         select channel_name,set_name,type,channel
         from flume_sink
     </select>
-    <select id="selectFlumeSinkExt" resultType="org.apache.inlong.manager.common.pojo.dataproxy.FlumeSinkExt">
+    <select id="selectFlumeSinkExt" resultType="org.apache.inlong.manager.dao.entity.FlumeSinkExt">
         select parent_name,set_name,key_name,key_value,is_deleted
         from flume_sink_ext
         where is_deleted = 0
diff --git a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/repository/DataProxyConfigRepository.java b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/repository/DataProxyConfigRepository.java
index 8150d25..8e77e4d 100644
--- a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/repository/DataProxyConfigRepository.java
+++ b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/repository/DataProxyConfigRepository.java
@@ -18,7 +18,6 @@
 package org.apache.inlong.manager.service.repository;
 
 import java.util.Arrays;
-import java.util.Date;
 import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
@@ -66,6 +65,7 @@ import com.google.gson.Gson;
 /**
  * DataProxyConfigRepository
  */
+@SuppressWarnings("UnstableApiUsage")
 @Repository(value = "dataProxyConfigRepository")
 public class DataProxyConfigRepository implements IRepository {
     private static final Logger LOGGER = LoggerFactory.getLogger(DataProxyConfigRepository.class);
@@ -158,7 +158,7 @@ public class DataProxyConfigRepository implements IRepository {
     private void setReloadTimer() {
         reloadTimer = new Timer(true);
         TimerTask task = new RepositoryTimerTask<DataProxyConfigRepository>(this);
-        reloadTimer.schedule(task, new Date(System.currentTimeMillis() + reloadInterval), reloadInterval);
+        reloadTimer.scheduleAtFixedRate(task, reloadInterval, reloadInterval);
     }
 
     /**