Skip to content

Commit

Permalink
[INLONG-5705][Manager] Fix the deprecated dependency of PageInfo (#5704)
Browse files Browse the repository at this point in the history
  • Loading branch information
Yizhou-Yang committed Aug 25, 2022
1 parent 9efb112 commit defa542
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import org.apache.inlong.manager.common.enums.SimpleGroupStatus;
import org.apache.inlong.manager.client.api.inner.client.InlongGroupClient;
import org.apache.inlong.manager.client.api.inner.client.InlongStreamClient;
import org.apache.inlong.manager.client.api.inner.client.StreamSinkClient;
Expand All @@ -30,6 +29,7 @@
import org.apache.inlong.manager.client.cli.pojo.StreamInfo;
import org.apache.inlong.manager.client.cli.util.ClientUtils;
import org.apache.inlong.manager.client.cli.util.PrintUtils;
import org.apache.inlong.manager.common.enums.SimpleGroupStatus;
import org.apache.inlong.manager.pojo.common.PageResult;
import org.apache.inlong.manager.pojo.group.InlongGroupBriefInfo;
import org.apache.inlong.manager.pojo.group.InlongGroupPageRequest;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,12 @@

import com.beust.jcommander.Parameter;
import com.beust.jcommander.Parameters;
import com.github.pagehelper.PageInfo;
import org.apache.commons.lang3.StringUtils;
import org.apache.inlong.manager.client.api.inner.client.InlongGroupClient;
import org.apache.inlong.manager.client.cli.pojo.GroupInfo;
import org.apache.inlong.manager.client.cli.util.ClientUtils;
import org.apache.inlong.manager.client.cli.util.PrintUtils;
import org.apache.inlong.manager.pojo.common.PageResult;
import org.apache.inlong.manager.pojo.group.InlongGroupBriefInfo;
import org.apache.inlong.manager.pojo.group.InlongGroupPageRequest;

Expand Down Expand Up @@ -73,12 +73,12 @@ void run() {
InlongGroupClient groupClient = ClientUtils.clientFactory.getGroupClient();
InlongGroupPageRequest pageRequest = new InlongGroupPageRequest();
pageRequest.setKeyword(inputs[1]);
PageInfo<InlongGroupBriefInfo> pageInfo = groupClient.listGroups(pageRequest);
if (pageInfo.getSize() > MAX_LOG_SIZE) {
PageResult<InlongGroupBriefInfo> pageResult = groupClient.listGroups(pageRequest);
if (pageResult.getPageSize() > MAX_LOG_SIZE) {
System.err.println("the log is too large to print, please change the filter condition");
return;
}
PrintUtils.print(pageInfo.getList(), GroupInfo.class);
PrintUtils.print(pageResult.getList(), GroupInfo.class);
} catch (Exception e) {
e.printStackTrace();
}
Expand Down

0 comments on commit defa542

Please sign in to comment.