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


##########
pinot-controller/src/test/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManagerStatelessTest.java:
##########
@@ -571,28 +568,19 @@ private void validateJob(String taskType, String 
cronExpression, boolean skipLat
 
   private void addTableConfig(TableConfig tableConfig, String 
validationTypesToSkip)
       throws IOException {
-    String createTableUriStr =
-        String.format(_controllerRequestURLBuilder.forTableCreate() + 
"?validationTypesToSkip=%s",
-            validationTypesToSkip);
     try {
-      HttpClient.wrapAndThrowHttpException(
-          _httpClient.sendJsonPostRequest(new URI(createTableUriStr), 
tableConfig.toJsonString(),
-              Collections.emptyMap()));
-    } catch (HttpErrorStatusException | URISyntaxException e) {
+      
getOrCreateAdminClient().getTableClient().createTable(tableConfig.toJsonString(),
 validationTypesToSkip);
+    } catch (PinotAdminException e) {
       throw new IOException(e);
     }
   }
 
   private void updateTableConfig(TableConfig tableConfig, String 
validationTypesToSkip)

Review Comment:
   Done - callers now use admin client directly.



##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/UrlAuthRealtimeIntegrationTest.java:
##########
@@ -150,7 +149,7 @@ protected Map<String, String> 
getPinotClientTransportHeaders() {
   public void testUnauthenticatedFailure()
       throws IOException {
     sendDeleteRequest(

Review Comment:
   Done - sendDeleteRequest calls migrated to admin client delete methods.



##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/TableRebalancePauselessIntegrationTest.java:
##########
@@ -186,9 +186,9 @@ public void testForceCommit(TableConfig tableConfig)
       // notice that this could get an HTTP 409 CONFLICT, when the test failed 
due to the timeout waiting on the table
       // to converge, and try to rebalance again here. So we need to cancel 
the original job first.
       sendDeleteRequest(

Review Comment:
   Done - PinotRebalanceAdminClient has rebalanceTable and cancelRebalance APIs.



##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/PartialUpsertTableRebalanceIntegrationTest.java:
##########
@@ -447,16 +435,10 @@ protected void waitForReloadToComplete(String 
reloadJobId, long timeoutMs)
       throws Exception {
     TestUtils.waitForCondition(aVoid -> {
       try {
-        String requestUrl = 
getControllerRequestURLBuilder().forSegmentReloadStatus(reloadJobId);
-        try {
-          SimpleHttpResponse httpResponse =
-              
HttpClient.wrapAndThrowHttpException(_httpClient.sendGetRequest(new 
URL(requestUrl).toURI(), null));
-          PinotTableReloadStatusResponse segmentReloadStatusValue =
-              JsonUtils.stringToObject(httpResponse.getResponse(), 
PinotTableReloadStatusResponse.class);
-          return segmentReloadStatusValue.getSuccessCount() == 
segmentReloadStatusValue.getTotalSegmentCount();
-        } catch (HttpErrorStatusException | URISyntaxException e) {
-          throw new IOException(e);
-        }
+        String response = 
getOrCreateAdminClient().getSegmentClient().getSegmentReloadStatus(reloadJobId);

Review Comment:
   Done - getSegmentReloadStatus has typed overload returning 
PinotTableReloadStatusResponse.



##########
pinot-integration-tests/src/test/java/org/apache/pinot/integration/tests/KafkaConsumingSegmentToBeMovedSummaryIntegrationTest.java:
##########
@@ -143,8 +143,8 @@ public void testConsumingSegmentSummary()
         .reduce(0L, (a, b) -> a + 
b.getTotalOffsetsToCatchUpAcrossAllConsumingSegments(), Long::sum), 57801);
 
     // set includeConsuming to false
-    response = sendPostRequest(
-        getControllerRequestURLBuilder().forTableRebalance(getTableName(), 
"REALTIME", true, false, false, false, -1));
+    response = getOrCreateAdminClient().getTableClient()

Review Comment:
   Done - rebalanceTable has typed overload returning RebalanceResult.



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