You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/03/01 23:27:20 UTC

[GitHub] [incubator-pinot] icefury71 commented on a change in pull request #6620: Adding a new API for validating specified TableConfig and Schema

icefury71 commented on a change in pull request #6620:
URL: https://github.com/apache/incubator-pinot/pull/6620#discussion_r585126880



##########
File path: pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTableRestletResource.java
##########
@@ -420,9 +422,32 @@ public String checkTableConfig(String tableConfigStr) {
       String msg = String.format("Invalid table config json string: %s", tableConfigStr);
       throw new ControllerApplicationException(LOGGER, msg, Response.Status.BAD_REQUEST, e);
     }
+    return validateConfig(tableConfig, _pinotHelixResourceManager.getSchemaForTableConfig(tableConfig));
+  }
+
+  @POST
+  @Path("/tables/validateTableAndSchema")
+  @Consumes(MediaType.APPLICATION_JSON)
+  @Produces(MediaType.APPLICATION_JSON)
+  @ApiOperation(value = "Validate table config for a table along with specified schema", notes =
+      "Validate given table config and schema. If specified schema is null, attempt to retrieve schema using the "
+          + "table name. This API returns the table config that matches the one you get from 'GET /tables/{tableName}'."

Review comment:
       It does add an extra layer (set TableType - REALTIME/OFFLINE). So in effect, it does return a structure compatible with the GET api. 




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

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org