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/inlong.git
The following commit(s) were added to refs/heads/master by this push:
new 78f48aad81 [INLONG-9109][Manager] Fix the issue of streamApi URL
errors (#9110)
78f48aad81 is described below
commit 78f48aad81d4605324d69c5aeaa6b5668609be15
Author: fuweng11 <[email protected]>
AuthorDate: Wed Oct 25 18:48:59 2023 +0800
[INLONG-9109][Manager] Fix the issue of streamApi URL errors (#9110)
---
.../client/api/inner/client/InlongGroupClient.java | 15 +++++----------
.../client/api/inner/client/InlongStreamClient.java | 6 ++----
.../manager/client/api/service/InlongStreamApi.java | 2 +-
.../service/resource/sink/StandaloneAutoAssignTest.java | 5 +++--
4 files changed, 11 insertions(+), 17 deletions(-)
diff --git
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongGroupClient.java
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongGroupClient.java
index 215fd5ae9a..890ed86a60 100644
---
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongGroupClient.java
+++
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongGroupClient.java
@@ -107,9 +107,8 @@ public class InlongGroupClient {
if (responseBody.getErrMsg().contains("not exist")) {
return null;
- } else {
- throw new RuntimeException(responseBody.getErrMsg());
}
+ throw new RuntimeException(responseBody.getErrMsg());
}
/**
@@ -130,9 +129,8 @@ public class InlongGroupClient {
}
if (pageInfoResponse.getErrMsg().contains("not exist")) {
return null;
- } else {
- throw new RuntimeException(pageInfoResponse.getErrMsg());
}
+ throw new RuntimeException(pageInfoResponse.getErrMsg());
}
/**
@@ -263,9 +261,8 @@ public class InlongGroupClient {
InlongGroupCountResponse.class);
} else if (response.getErrMsg().contains("not exist")) {
return null;
- } else {
- throw new RuntimeException(response.getErrMsg());
}
+ throw new RuntimeException(response.getErrMsg());
}
public InlongGroupTopicInfo getTopic(String id) {
@@ -275,9 +272,8 @@ public class InlongGroupClient {
InlongGroupTopicInfo.class);
} else if (response.getErrMsg().contains("not exist")) {
return null;
- } else {
- throw new RuntimeException(response.getErrMsg());
}
+ throw new RuntimeException(response.getErrMsg());
}
public List<InlongGroupTopicInfo> listTopics(InlongGroupTopicRequest
request) {
@@ -287,8 +283,7 @@ public class InlongGroupClient {
return response.getData();
} else if (response.getErrMsg().contains("not exist")) {
return null;
- } else {
- throw new RuntimeException(response.getErrMsg());
}
+ throw new RuntimeException(response.getErrMsg());
}
}
diff --git
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongStreamClient.java
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongStreamClient.java
index b8697048e8..a71d7ac2b3 100644
---
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongStreamClient.java
+++
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/inner/client/InlongStreamClient.java
@@ -102,9 +102,8 @@ public class InlongStreamClient {
}
if (response.getErrMsg().contains("not exist")) {
return null;
- } else {
- throw new RuntimeException(response.getErrMsg());
}
+ throw new RuntimeException(response.getErrMsg());
}
/**
@@ -119,9 +118,8 @@ public class InlongStreamClient {
}
if (response.getErrMsg().contains("not exist")) {
return null;
- } else {
- throw new RuntimeException(response.getErrMsg());
}
+ throw new RuntimeException(response.getErrMsg());
}
/**
diff --git
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongStreamApi.java
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongStreamApi.java
index e42e940d3e..3a50227acc 100644
---
a/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongStreamApi.java
+++
b/inlong-manager/manager-client/src/main/java/org/apache/inlong/manager/client/api/service/InlongStreamApi.java
@@ -51,7 +51,7 @@ public interface InlongStreamApi {
Call<Response<InlongStreamInfo>> getStream(@Query("groupId") String
groupId,
@Query("streamId") String streamId);
- @GET("/stream/getBrieft")
+ @GET("/stream/getBrief")
Call<Response<InlongStreamBriefInfo>> getStreamBriefInfo(@Query("groupId")
String groupId,
@Query("streamId") String streamId);
diff --git
a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/resource/sink/StandaloneAutoAssignTest.java
b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/resource/sink/StandaloneAutoAssignTest.java
index b7a246003e..48a1f00399 100644
---
a/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/resource/sink/StandaloneAutoAssignTest.java
+++
b/inlong-manager/manager-service/src/test/java/org/apache/inlong/manager/service/resource/sink/StandaloneAutoAssignTest.java
@@ -44,6 +44,7 @@ public class StandaloneAutoAssignTest extends ServiceBaseTest
{
private InlongClusterService clusterService;
@Autowired
private TestStandaloneSinkResourceOperator testResourceOperator;
+
@Test
public void testAutoAssign() {
@@ -76,8 +77,8 @@ public class StandaloneAutoAssignTest extends ServiceBaseTest
{
clsSinkEntity.setInlongGroupId(groupId);
clsSinkEntity.setInlongStreamId(streamId);
clsSinkEntity.setCreator(GLOBAL_OPERATOR);
-
- return sinkEntityMapper.insert(clsSinkEntity);
+ sinkEntityMapper.insert(clsSinkEntity);
+ return clsSinkEntity.getId();
}
public Integer saveStandaloneCluster(String clusterTag, String
clusterName, Set<String> supportedSinkTypes) {