use of org.apache.inlong.manager.client.api.inner.InnerInlongManagerClient 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());
}
}
use of org.apache.inlong.manager.client.api.inner.InnerInlongManagerClient in project incubator-inlong by apache.
the class InlongClientImpl method getGroup.
@Override
public InlongGroup getGroup(String groupName) throws Exception {
InnerInlongManagerClient managerClient = new InnerInlongManagerClient(this);
final String groupId = "b_" + groupName;
InlongGroupResponse groupResponse = managerClient.getGroupInfo(groupId);
if (groupResponse == null) {
return new BlankInlongGroup();
}
InlongGroupConf groupConf = InlongGroupTransfer.parseGroupResponse(groupResponse);
return new InlongGroupImpl(groupConf, this);
}
Aggregations