xiangfu0 commented on code in PR #17167:
URL: https://github.com/apache/pinot/pull/17167#discussion_r3041154979


##########
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:
   getValidDocIdsMetadata should return List<ValidDocIdsMetadataInfo> class 
directly



-- 
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]

Reply via email to