xiangfu0 commented on code in PR #17167:
URL: https://github.com/apache/pinot/pull/17167#discussion_r3041201894
##########
pinot-integration-test-base/src/test/java/org/apache/pinot/integration/tests/BaseClusterIntegrationTest.java:
##########
@@ -1166,26 +1169,25 @@ protected long getLongCellValue(JsonNode jsonNode, int
colIndex, int rowIndex) {
protected JsonNode getColumnIndexSize(String column)
throws Exception {
- return JsonUtils.stringToJsonNode(
-
sendGetRequest(_controllerRequestURLBuilder.forTableAggregateMetadata(getTableName(),
List.of(column))))
- .get("columnIndexSizeMap").get(column);
+ TableMetadataInfo metadata = getOrCreateAdminClient().getTableClient()
+ .getAggregateMetadata(getTableName(), String.join(",",
List.of(column)));
+ return
JsonUtils.objectToJsonNode(metadata).get("columnIndexSizeMap").get(column);
}
/**
* Get all segment names for a given tableName and tableType.
*/
protected List<String> getSegmentNames(String tableName, @Nullable String
tableType)
throws Exception {
- return getControllerRequestClient().listSegments(tableName, tableType,
true);
+ return getOrCreateAdminClient().getSegmentClient().listSegments(tableName,
tableType, true);
}
protected List<ValidDocIdsMetadataInfo> getValidDocIdsMetadata(String
tableNameWithType,
ValidDocIdsType validDocIdsType)
throws Exception {
- StringBuilder urlBuilder = new StringBuilder(
- _controllerRequestURLBuilder.forValidDocIdsMetadata(tableNameWithType,
validDocIdsType.toString()));
- String responseString = sendGetRequest(urlBuilder.toString());
+ String responseString = getOrCreateAdminClient().getTableClient()
+ .getValidDocIdsMetadata(tableNameWithType, validDocIdsType.toString());
Review Comment:
Acknowledged - these response classes (RebalanceResult, PauseStatusDetails,
TableViews.TableView, ConsumingSegmentsInfoMap,
ServerRebalanceJobStatusResponse, etc.) are currently in pinot-controller,
which pinot-java-client cannot depend on. Moving them to pinot-common requires
also moving their transitive dependencies (RebalanceSummaryResult,
RebalancePreCheckerResult, TableRebalanceProgressStats, etc.) - will address in
a follow-up PR dedicated to response class relocation.
##########
pinot-controller/src/test/java/org/apache/pinot/controller/api/TableViewsTest.java:
##########
@@ -166,15 +188,22 @@ public void testHybridTableState(String state)
private TableViews.TableView getTableView(String tableName, String view,
String tableType)
throws Exception {
- return JsonUtils.stringToObject(
-
sendGetRequest(DEFAULT_INSTANCE.getControllerRequestURLBuilder().forTableView(tableName,
view, tableType)),
- TableViews.TableView.class);
+ PinotAdminClient adminClient = getOrCreateAdminClient();
+ return adminClient.getTableClient().getTableView(tableName, view,
tableType, TableViews.TableView.class);
Review Comment:
Acknowledged - these response classes (RebalanceResult, PauseStatusDetails,
TableViews.TableView, ConsumingSegmentsInfoMap,
ServerRebalanceJobStatusResponse, etc.) are currently in pinot-controller,
which pinot-java-client cannot depend on. Moving them to pinot-common requires
also moving their transitive dependencies (RebalanceSummaryResult,
RebalancePreCheckerResult, TableRebalanceProgressStats, etc.) - will address in
a follow-up PR dedicated to response class relocation.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]