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 5fca31680 [INLONG-3603][Manager] The serialization type cannot be
empty for File source (#3604)
5fca31680 is described below
commit 5fca316805f74eb95e9e834f91e421d77fb43bc1
Author: healchow <[email protected]>
AuthorDate: Mon Apr 11 14:06:53 2022 +0800
[INLONG-3603][Manager] The serialization type cannot be empty for File
source (#3604)
---
.../inlong/manager/common/pojo/source/file/FileSourceRequest.java | 2 +-
.../inlong/manager/service/source/file/FileSourceOperation.java | 7 ++++++-
inlong-tubemq/pom.xml | 2 +-
3 files changed, 8 insertions(+), 3 deletions(-)
diff --git
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/source/file/FileSourceRequest.java
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/source/file/FileSourceRequest.java
index 11ec99bae..d0c8dfc42 100644
---
a/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/source/file/FileSourceRequest.java
+++
b/inlong-manager/manager-common/src/main/java/org/apache/inlong/manager/common/pojo/source/file/FileSourceRequest.java
@@ -32,8 +32,8 @@ import org.apache.inlong.manager.common.util.JsonTypeDefine;
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
-@ApiModel(value = "Request of the kafka source info")
@JsonTypeDefine(value = SourceType.SOURCE_FILE)
+@ApiModel(value = "Request of the kafka source info")
public class FileSourceRequest extends SourceRequest {
@ApiModelProperty("Agent IP address")
diff --git
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/file/FileSourceOperation.java
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/file/FileSourceOperation.java
index da5bc72b7..2d349368e 100644
---
a/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/file/FileSourceOperation.java
+++
b/inlong-manager/manager-service/src/main/java/org/apache/inlong/manager/service/source/file/FileSourceOperation.java
@@ -18,6 +18,7 @@
package org.apache.inlong.manager.service.source.file;
import com.fasterxml.jackson.databind.ObjectMapper;
+import org.apache.commons.lang3.StringUtils;
import org.apache.inlong.manager.common.enums.ErrorCodeEnum;
import org.apache.inlong.manager.common.enums.SourceType;
import org.apache.inlong.manager.common.exceptions.BusinessException;
@@ -44,8 +45,12 @@ public class FileSourceOperation extends
AbstractSourceOperation {
@Override
protected void setTargetEntity(SourceRequest request, StreamSourceEntity
targetEntity) {
FileSourceRequest sourceRequest = (FileSourceRequest) request;
- CommonBeanUtils.copyProperties(sourceRequest, targetEntity, true);
+ if (StringUtils.isBlank(sourceRequest.getSerializationType())) {
+ throw new BusinessException("The serialization type cannot be
empty for File source");
+ }
+
try {
+ CommonBeanUtils.copyProperties(sourceRequest, targetEntity, true);
FileSourceDTO dto = FileSourceDTO.getFromRequest(sourceRequest);
targetEntity.setExtParams(objectMapper.writeValueAsString(dto));
} catch (Exception e) {
diff --git a/inlong-tubemq/pom.xml b/inlong-tubemq/pom.xml
index c0eba3616..bc20cb6b0 100644
--- a/inlong-tubemq/pom.xml
+++ b/inlong-tubemq/pom.xml
@@ -94,7 +94,7 @@
<name>berkeleydb-je</name>
<url>https://download.oracle.com/maven/</url>
<releases>
- <enabled>false</enabled>
+ <enabled>true</enabled>
</releases>
<snapshots>
<enabled>false</enabled>