use of org.apache.inlong.manager.client.api.InlongGroup in project incubator-inlong by apache.
the class InlongClientImpl method listGroup.
@Override
public List<InlongGroup> listGroup(String expr, int status, int pageNum, int pageSize) throws Exception {
InnerInlongManagerClient managerClient = new InnerInlongManagerClient(this);
PageInfo<InlongGroupListResponse> responsePageInfo = managerClient.listGroups(expr, status, pageNum, pageSize);
if (CollectionUtils.isEmpty(responsePageInfo.getList())) {
return Lists.newArrayList();
} else {
return responsePageInfo.getList().stream().map(response -> {
String groupId = response.getInlongGroupId();
InlongGroupResponse groupResponse = managerClient.getGroupInfo(groupId);
InlongGroupConf groupConf = InlongGroupTransfer.parseGroupResponse(groupResponse);
return new InlongGroupImpl(groupConf, this);
}).collect(Collectors.toList());
}
}
Aggregations