Search in sources :

Example 1 with SinkBriefResponse

use of org.apache.inlong.manager.common.pojo.sink.SinkBriefResponse in project incubator-inlong by apache.

the class InlongStreamServiceImpl method getBriefList.

@Override
public List<StreamBriefResponse> getBriefList(String groupId) {
    LOGGER.debug("begin to get inlong stream brief list by groupId={}", groupId);
    Preconditions.checkNotNull(groupId, Constant.GROUP_ID_IS_EMPTY);
    List<InlongStreamEntity> entityList = streamMapper.selectByGroupId(groupId);
    List<StreamBriefResponse> briefInfoList = CommonBeanUtils.copyListProperties(entityList, StreamBriefResponse::new);
    // Query stream sinks based on groupId and streamId
    for (StreamBriefResponse briefInfo : briefInfoList) {
        String streamId = briefInfo.getInlongStreamId();
        List<SinkBriefResponse> sinkList = sinkService.listBrief(groupId, streamId);
        briefInfo.setSinkList(sinkList);
    }
    LOGGER.info("success to get inlong stream brief list for groupId={}", groupId);
    return briefInfoList;
}
Also used : StreamBriefResponse(org.apache.inlong.manager.common.pojo.stream.StreamBriefResponse) InlongStreamEntity(org.apache.inlong.manager.dao.entity.InlongStreamEntity) SinkBriefResponse(org.apache.inlong.manager.common.pojo.sink.SinkBriefResponse)

Aggregations

SinkBriefResponse (org.apache.inlong.manager.common.pojo.sink.SinkBriefResponse)1 StreamBriefResponse (org.apache.inlong.manager.common.pojo.stream.StreamBriefResponse)1 InlongStreamEntity (org.apache.inlong.manager.dao.entity.InlongStreamEntity)1