Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[INLONG-9073][Manager] Add getStreamBriefInfo method for InlongStreamClient #9074

Merged
merged 1 commit into from
Oct 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,23 @@ public InlongStreamInfo getStreamInfo(String groupId, String streamId) {
}
}

/**
* Get inlong stream brief info by the given groupId and streamId.
*/
public InlongStreamBriefInfo getStreamBriefInfo(String groupId, String streamId) {
Response<InlongStreamBriefInfo> response =
ClientUtils.executeHttpCall(inlongStreamApi.getStreamBriefInfo(groupId, streamId));

if (response.isSuccess()) {
return response.getData();
}
if (response.getErrMsg().contains("not exist")) {
return null;
} else {
EMsnap marked this conversation as resolved.
Show resolved Hide resolved
throw new RuntimeException(response.getErrMsg());
}
}

/**
* Get inlong stream by the given inlong group id and stream id.
*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,10 @@ public interface InlongStreamApi {
Call<Response<InlongStreamInfo>> getStream(@Query("groupId") String groupId,
@Query("streamId") String streamId);

@GET("/stream/getBrieft")
Call<Response<InlongStreamBriefInfo>> getStreamBriefInfo(@Query("groupId") String groupId,
@Query("streamId") String streamId);

@POST("stream/list")
Call<Response<PageResult<InlongStreamBriefInfo>>> listByCondition(@Body InlongStreamPageRequest request);

Expand Down