This is an automated email from the ASF dual-hosted git repository. healchow pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/inlong.git
The following commit(s) were added to refs/heads/master by this push: new 486627a98 [INLONG-5726][Manager] Remove unused DB and File source classes (#5727) 486627a98 is described below commit 486627a98e9ecf27ca2c4c8369ea5bd62df1ebee Author: healchow <healc...@gmail.com> AuthorDate: Mon Aug 29 14:28:38 2022 +0800 [INLONG-5726][Manager] Remove unused DB and File source classes (#5727) --- .../manager/dao/entity/SourceDbDetailEntity.java | 51 -------------------- .../manager/dao/entity/SourceFileBasicEntity.java | 48 ------------------- .../manager/dao/entity/SourceFileDetailEntity.java | 53 --------------------- .../mappers/DataSourceCmdConfigEntityMapper.xml | 6 +-- .../main/resources/h2/apache_inlong_manager.sql | 52 --------------------- .../manager-web/sql/apache_inlong_manager.sql | 54 ---------------------- 6 files changed, 3 insertions(+), 261 deletions(-) diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceDbDetailEntity.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceDbDetailEntity.java deleted file mode 100644 index 3da22d57b..000000000 --- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceDbDetailEntity.java +++ /dev/null @@ -1,51 +0,0 @@ -/* - * 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.dao.entity; - -import java.io.Serializable; -import java.util.Date; -import lombok.Data; - -/** - * Source database Detail entity, including table name, connection name, etc. - */ -@Data -public class SourceDbDetailEntity implements Serializable { - - private static final long serialVersionUID = 1L; - private Integer id; - private String inlongGroupId; - private String inlongStreamId; - private String accessType; - private String dbName; - private String transferIp; - private String connectionName; - private String tableName; - private String tableFields; - private String dataSql; - private String crontab; - private Integer status; - private Integer previousStatus; - private Integer isDeleted; - private String creator; - private String modifier; - private Date createTime; - private Date modifyTime; - private String tempView; - -} \ No newline at end of file diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceFileBasicEntity.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceFileBasicEntity.java deleted file mode 100644 index 3188a78e9..000000000 --- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceFileBasicEntity.java +++ /dev/null @@ -1,48 +0,0 @@ -/* - * 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.dao.entity; - -import java.io.Serializable; -import java.util.Date; -import lombok.Data; - -/** - * Source file basic entity, including file rolling type, upload max siez, etc. - */ -@Data -public class SourceFileBasicEntity implements Serializable { - - private static final long serialVersionUID = 1L; - private Integer id; - private String inlongGroupId; - private String inlongStreamId; - private Integer isHybridSource; - private Integer isTableMapping; - private Integer dateOffset; - private String dateOffsetUnit; - private String fileRollingType; - private Integer uploadMaxSize; - private Integer needCompress; - private Integer isDeleted; - private String creator; - private String modifier; - private Date createTime; - private Date modifyTime; - private String tempView; - -} \ No newline at end of file diff --git a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceFileDetailEntity.java b/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceFileDetailEntity.java deleted file mode 100644 index c70dbd80a..000000000 --- a/inlong-manager/manager-dao/src/main/java/org/apache/inlong/manager/dao/entity/SourceFileDetailEntity.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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.dao.entity; - -import java.io.Serializable; -import java.util.Date; -import lombok.Data; - -/** - * Source file detail entity, including servername, username, password, etc. - */ -@Data -public class SourceFileDetailEntity implements Serializable { - - private static final long serialVersionUID = 1L; - private Integer id; - private String inlongGroupId; - private String inlongStreamId; - private String accessType; - private String serverName; - private String ip; - private Integer port; - private Integer isInnerIp; - private String issueType; - private String username; - private String password; - private String filePath; - private Integer status; - private Integer previousStatus; - private Integer isDeleted; - private String creator; - private String modifier; - private Date createTime; - private Date modifyTime; - private String tempView; - private String netTag; - -} \ No newline at end of file diff --git a/inlong-manager/manager-dao/src/main/resources/mappers/DataSourceCmdConfigEntityMapper.xml b/inlong-manager/manager-dao/src/main/resources/mappers/DataSourceCmdConfigEntityMapper.xml index fa9a65c05..0a8c2c60b 100644 --- a/inlong-manager/manager-dao/src/main/resources/mappers/DataSourceCmdConfigEntityMapper.xml +++ b/inlong-manager/manager-dao/src/main/resources/mappers/DataSourceCmdConfigEntityMapper.xml @@ -42,11 +42,11 @@ <select id="queryCmdByAgentIp" resultMap="BaseResultMap"> select cmd.* from stream_source_cmd_config cmd, - source_file_detail fd - where cmd.task_id = fd.id + stream_source src + where cmd.task_id = src.id and cmd.cmd_type in (2, 6, 7, 8) and cmd.bSend = 0 - and fd.ip = #{ip,jdbcType=VARCHAR} + and src.agent_ip = #{ip, jdbcType=VARCHAR} </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Integer"> diff --git a/inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql b/inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql index 99a22413c..21875058e 100644 --- a/inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql +++ b/inlong-manager/manager-test/src/main/resources/h2/apache_inlong_manager.sql @@ -319,58 +319,6 @@ CREATE TABLE IF NOT EXISTS `operation_log` PRIMARY KEY (`id`) ); --- ---------------------------- --- Table structure for source_file_basic --- ---------------------------- -CREATE TABLE IF NOT EXISTS `source_file_basic` -( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `inlong_group_id` varchar(256) NOT NULL COMMENT 'Inlong group id', - `inlong_stream_id` varchar(256) NOT NULL COMMENT 'Inlong stream id', - `is_hybrid_source` tinyint(1) DEFAULT '0' COMMENT 'Whether to mix data sources', - `is_table_mapping` tinyint(1) DEFAULT '0' COMMENT 'Is there a table name mapping', - `date_offset` int(4) DEFAULT '0' COMMENT 'Time offset\n', - `date_offset_unit` varchar(2) DEFAULT 'H' COMMENT 'Time offset unit', - `file_rolling_type` varchar(2) DEFAULT 'H' COMMENT 'File rolling type', - `upload_max_size` int(4) DEFAULT '120' COMMENT 'Upload maximum size', - `need_compress` tinyint(1) DEFAULT '0' COMMENT 'Whether need compress', - `is_deleted` int(11) DEFAULT '0' COMMENT 'Whether to delete, 0: not deleted, > 0: deleted', - `creator` varchar(64) NOT NULL COMMENT 'Creator', - `modifier` varchar(64) DEFAULT NULL COMMENT 'Modifier', - `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Create time', - `modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time', - `temp_view` text DEFAULT NULL COMMENT 'temp view', - PRIMARY KEY (`id`) -); - --- ---------------------------- --- Table structure for source_file_detail --- ---------------------------- -CREATE TABLE IF NOT EXISTS `source_file_detail` -( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Incremental primary key', - `inlong_group_id` varchar(256) NOT NULL COMMENT 'Owning inlong group id', - `inlong_stream_id` varchar(256) NOT NULL COMMENT 'Owning inlong stream id', - `access_type` varchar(20) DEFAULT 'Agent' COMMENT 'Collection type, there are Agent, DataProxy client, LoadProxy, the file can only be Agent temporarily', - `server_name` varchar(64) DEFAULT NULL COMMENT 'The name of the data source service. If it is empty, add configuration through the following fields', - `ip` varchar(128) NOT NULL COMMENT 'Data source IP address', - `port` int(11) NOT NULL COMMENT 'Data source port number', - `is_inner_ip` tinyint(1) DEFAULT '0' COMMENT 'Whether it is intranet, 0: no, 1: yes', - `issue_type` varchar(10) DEFAULT 'SSH' COMMENT 'Issuing method, there are SSH, TCS', - `username` varchar(32) DEFAULT NULL COMMENT 'User name of the data source IP host', - `password` varchar(64) DEFAULT NULL COMMENT 'The password corresponding to the above user name', - `file_path` varchar(256) NOT NULL COMMENT 'File path, supports regular matching', - `status` int(4) DEFAULT '0' COMMENT 'Data source status', - `previous_status` int(4) DEFAULT '0' COMMENT 'Previous status', - `is_deleted` int(11) DEFAULT '0' COMMENT 'Whether to delete, 0: not deleted, > 0: deleted', - `creator` varchar(64) NOT NULL COMMENT 'Creator name', - `modifier` varchar(64) DEFAULT NULL COMMENT 'Modifier name', - `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Create time', - `modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time', - `temp_view` text DEFAULT NULL COMMENT 'Temporary view, used to save un-submitted and unapproved intermediate data after modification', - PRIMARY KEY (`id`) -); - -- ---------------------------- -- Table structure for stream_source -- ---------------------------- diff --git a/inlong-manager/manager-web/sql/apache_inlong_manager.sql b/inlong-manager/manager-web/sql/apache_inlong_manager.sql index e7bbf585b..af1d4db4e 100644 --- a/inlong-manager/manager-web/sql/apache_inlong_manager.sql +++ b/inlong-manager/manager-web/sql/apache_inlong_manager.sql @@ -338,60 +338,6 @@ CREATE TABLE IF NOT EXISTS `operation_log` ) ENGINE = InnoDB DEFAULT CHARSET = utf8mb4; --- ---------------------------- --- Table structure for source_file_basic --- ---------------------------- -CREATE TABLE IF NOT EXISTS `source_file_basic` -( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'ID', - `inlong_group_id` varchar(256) NOT NULL COMMENT 'Inlong group id', - `inlong_stream_id` varchar(256) NOT NULL COMMENT 'Inlong stream id', - `is_hybrid_source` tinyint(1) DEFAULT '0' COMMENT 'Whether to mix data sources', - `is_table_mapping` tinyint(1) DEFAULT '0' COMMENT 'Is there a table name mapping', - `date_offset` int(4) DEFAULT '0' COMMENT 'Time offset\n', - `date_offset_unit` varchar(2) DEFAULT 'H' COMMENT 'Time offset unit', - `file_rolling_type` varchar(2) DEFAULT 'H' COMMENT 'File rolling type', - `upload_max_size` int(4) DEFAULT '120' COMMENT 'Upload maximum size', - `need_compress` tinyint(1) DEFAULT '0' COMMENT 'Whether need compress', - `is_deleted` int(11) DEFAULT '0' COMMENT 'Whether to delete, 0: not deleted, > 0: deleted', - `creator` varchar(64) NOT NULL COMMENT 'Creator', - `modifier` varchar(64) DEFAULT NULL COMMENT 'Modifier', - `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Create time', - `modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time', - `temp_view` text DEFAULT NULL COMMENT 'temp view', - PRIMARY KEY (`id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='basic configuration of file data source'; - --- ---------------------------- --- Table structure for source_file_detail --- ---------------------------- -CREATE TABLE IF NOT EXISTS `source_file_detail` -( - `id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Incremental primary key', - `inlong_group_id` varchar(256) NOT NULL COMMENT 'Owning inlong group id', - `inlong_stream_id` varchar(256) NOT NULL COMMENT 'Owning inlong stream id', - `access_type` varchar(20) DEFAULT 'Agent' COMMENT 'Collection type, there are Agent, DataProxy client, LoadProxy, the file can only be Agent temporarily', - `server_name` varchar(64) DEFAULT NULL COMMENT 'The name of the data source service. If it is empty, add configuration through the following fields', - `ip` varchar(128) NOT NULL COMMENT 'Data source IP address', - `port` int(11) NOT NULL COMMENT 'Data source port number', - `is_inner_ip` tinyint(1) DEFAULT '0' COMMENT 'Whether it is intranet, 0: no, 1: yes', - `issue_type` varchar(10) DEFAULT 'SSH' COMMENT 'Issuing method, there are SSH, TCS', - `username` varchar(32) DEFAULT NULL COMMENT 'User name of the data source IP host', - `password` varchar(64) DEFAULT NULL COMMENT 'The password corresponding to the above user name', - `file_path` varchar(256) NOT NULL COMMENT 'File path, supports regular matching', - `status` int(4) DEFAULT '0' COMMENT 'Data source status', - `previous_status` int(4) DEFAULT '0' COMMENT 'Previous status', - `is_deleted` int(11) DEFAULT '0' COMMENT 'Whether to delete, 0: not deleted, > 0: deleted', - `creator` varchar(64) NOT NULL COMMENT 'Creator name', - `modifier` varchar(64) DEFAULT NULL COMMENT 'Modifier name', - `create_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'Create time', - `modify_time` timestamp NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT 'Modify time', - `temp_view` text DEFAULT NULL COMMENT 'Temporary view, used to save un-submitted and unapproved intermediate data after modification', - PRIMARY KEY (`id`) -) ENGINE = InnoDB - DEFAULT CHARSET = utf8mb4 COMMENT ='Detailed table of file data source'; - -- ---------------------------- -- Table structure for stream_source -- ----------------------------