You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@inlong.apache.org by he...@apache.org on 2021/12/13 05:08:25 UTC
[incubator-inlong] branch master updated: [INLONG-1953][Bug]It can not be submitted when I create a data access business using file datasource (#1960)
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/incubator-inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 7ca968a [INLONG-1953][Bug]It can not be submitted when I create a data access business using file datasource (#1960)
7ca968a is described below
commit 7ca968a85a76dfd8c0fd20fbc35e83c54317a83b
Author: healchow <he...@gmail.com>
AuthorDate: Mon Dec 13 13:08:21 2021 +0800
[INLONG-1953][Bug]It can not be submitted when I create a data access business using file datasource (#1960)
Co-authored-by: healchow <he...@gmail.com>
---
.../apache/inlong/manager/common/pojo/business/BusinessInfo.java | 2 ++
.../inlong/manager/common/pojo/business/BusinessPageRequest.java | 3 +++
.../manager-dao/src/main/resources/mappers/BusinessEntityMapper.xml | 3 +++
.../manager-dao/src/test/resources/sql/apache_inlong_manager.sql | 6 +++---
inlong-manager/manager-web/sql/apache_inlong_manager.sql | 6 +++---
.../manager-web/src/test/resources/sql/apache_inlong_manager.sql | 6 +++---
6 files changed, 17 insertions(+), 9 deletions(-)
diff --git a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/business/BusinessInfo.java b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/business/BusinessInfo.java
index 6011054..ce640e5 100644
--- a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/business/BusinessInfo.java
+++ b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/business/BusinessInfo.java
@@ -22,6 +22,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import java.util.List;
+import javax.validation.constraints.NotNull;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
@@ -52,6 +53,7 @@ public class BusinessInfo {
@ApiModelProperty(value = "Business description")
private String description;
+ @NotNull(message = "middlewareType cannot be null")
@ApiModelProperty(value = "Middleware type, high throughput: TUBE, high consistency: PULSAR")
private String middlewareType;
diff --git a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/business/BusinessPageRequest.java b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/business/BusinessPageRequest.java
index a61fab6..148951e 100644
--- a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/business/BusinessPageRequest.java
+++ b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/business/BusinessPageRequest.java
@@ -34,6 +34,9 @@ public class BusinessPageRequest extends PageRequest {
@ApiModelProperty(value = "Keywords")
private String keyWord;
+ @ApiModelProperty(value = "MQ resource object")
+ private String middlewareType;
+
@ApiModelProperty(value = "Status")
private Integer status;
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 3cd1541..2d7b41d 100644
--- a/inlong-manager/manager-dao/src/main/resources/mappers/BusinessEntityMapper.xml
+++ b/inlong-manager/manager-dao/src/main/resources/mappers/BusinessEntityMapper.xml
@@ -93,6 +93,9 @@
<if test="keyWord != null and keyWord != ''">
and (inlong_group_id like CONCAT('%',#{keyWord},'%') or id like CONCAT('%',#{keyWord},'%'))
</if>
+ <if test="middlewareType != null and middlewareType != ''">
+ and middleware_type = #{middlewareType, jdbcType=VARCHAR}
+ </if>
<if test="status != null and status != ''">
and status = #{status, jdbcType=INTEGER}
</if>
diff --git a/inlong-manager/manager-dao/src/test/resources/sql/apache_inlong_manager.sql b/inlong-manager/manager-dao/src/test/resources/sql/apache_inlong_manager.sql
index 99dbe3e..9622053 100644
--- a/inlong-manager/manager-dao/src/test/resources/sql/apache_inlong_manager.sql
+++ b/inlong-manager/manager-dao/src/test/resources/sql/apache_inlong_manager.sql
@@ -530,13 +530,13 @@ CREATE TABLE `source_file_detail`
`inlong_group_id` varchar(128) NOT NULL COMMENT 'Owning business group id',
`inlong_stream_id` varchar(128) NOT NULL COMMENT 'Owning data 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) NOT NULL COMMENT 'The name of the data source service. If it is empty, add configuration through the following fields',
+ `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) NOT NULL COMMENT 'User name of the data source IP host',
- `password` varchar(64) NOT NULL COMMENT 'The password corresponding to the above user name',
+ `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',
diff --git a/inlong-manager/manager-web/sql/apache_inlong_manager.sql b/inlong-manager/manager-web/sql/apache_inlong_manager.sql
index 6b3c543..93fa848 100644
--- a/inlong-manager/manager-web/sql/apache_inlong_manager.sql
+++ b/inlong-manager/manager-web/sql/apache_inlong_manager.sql
@@ -557,13 +557,13 @@ CREATE TABLE `source_file_detail`
`inlong_group_id` varchar(128) NOT NULL COMMENT 'Owning business group id',
`inlong_stream_id` varchar(128) NOT NULL COMMENT 'Owning data 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) NOT NULL COMMENT 'The name of the data source service. If it is empty, add configuration through the following fields',
+ `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) NOT NULL COMMENT 'User name of the data source IP host',
- `password` varchar(64) NOT NULL COMMENT 'The password corresponding to the above user name',
+ `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',
diff --git a/inlong-manager/manager-web/src/test/resources/sql/apache_inlong_manager.sql b/inlong-manager/manager-web/src/test/resources/sql/apache_inlong_manager.sql
index 99dbe3e..9622053 100644
--- a/inlong-manager/manager-web/src/test/resources/sql/apache_inlong_manager.sql
+++ b/inlong-manager/manager-web/src/test/resources/sql/apache_inlong_manager.sql
@@ -530,13 +530,13 @@ CREATE TABLE `source_file_detail`
`inlong_group_id` varchar(128) NOT NULL COMMENT 'Owning business group id',
`inlong_stream_id` varchar(128) NOT NULL COMMENT 'Owning data 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) NOT NULL COMMENT 'The name of the data source service. If it is empty, add configuration through the following fields',
+ `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) NOT NULL COMMENT 'User name of the data source IP host',
- `password` varchar(64) NOT NULL COMMENT 'The password corresponding to the above user name',
+ `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',