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


##########
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:
   I think the caller for this  method can directly use:   
`getOrCreateAdminClient().getTableClient()
             .updateTableConfig(tableConfig.getTableName(), 
tableConfig.toJsonString(), validationTypesToSkip);`
   
   Apply same for other callers like addTableConfig.



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