use of org.apache.inlong.manager.common.pojo.stream.StreamBriefResponse in project incubator-inlong by apache.
the class AbstractSourceOperateListener method listen.
@Override
public ListenerResult listen(WorkflowContext context) throws Exception {
log.info("Delete data source for context={}", context);
InlongGroupInfo groupInfo = getGroupInfo(context.getProcessForm());
final String groupId = groupInfo.getInlongGroupId();
List<StreamBriefResponse> streamBriefResponses = streamService.getBriefList(groupId);
streamBriefResponses.forEach(streamBriefResponse -> operateStreamSources(groupId, streamBriefResponse.getInlongStreamId(), context.getApplicant()));
return ListenerResult.success();
}
use of org.apache.inlong.manager.common.pojo.stream.StreamBriefResponse in project incubator-inlong by apache.
the class InlongGroupProcessOperation method genNewGroupProcessForm.
/**
* Generate the form of [New Group Workflow]
*/
public NewGroupProcessForm genNewGroupProcessForm(String groupId) {
NewGroupProcessForm form = new NewGroupProcessForm();
InlongGroupInfo groupInfo = groupService.get(groupId);
form.setGroupInfo(groupInfo);
List<StreamBriefResponse> infoList = streamService.getBriefList(groupInfo.getInlongGroupId());
form.setStreamInfoList(infoList);
return form;
}
use of org.apache.inlong.manager.common.pojo.stream.StreamBriefResponse 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;
}
Aggregations