deepthi912 commented on code in PR #13296:
URL: https://github.com/apache/pinot/pull/13296#discussion_r1733937490
##########
pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotSchemaRestletResource.java:
##########
@@ -118,6 +121,26 @@ public List<String> listSchemaNames(@Context HttpHeaders
headers) {
return
_pinotHelixResourceManager.getSchemaNames(headers.getHeaderString(DATABASE));
}
+ @GET
+ @Produces(MediaType.APPLICATION_JSON)
+ @Path("/schemas/info")
+ @Authorize(targetType = TargetType.CLUSTER, action =
Actions.Cluster.GET_SCHEMA_INFO)
+ @ApiOperation(value = "List all schemas info with count of field specs",
notes = "Lists all schemas with field "
+ + "count details")
+ public String getSchemaInfo(@Context HttpHeaders headers)
+ throws JsonProcessingException {
+ List<SchemaInfo> schemasInfo = new ArrayList<>();
+ TableCache cache = _pinotHelixResourceManager.getTableCache();
+ List<String> schemas =
_pinotHelixResourceManager.getSchemaNames(headers.getHeaderString(DATABASE));
+ for (String schemaName : schemas) {
+ Schema schema = cache.getSchema(schemaName);
+ if (schema != null) {
+ schemasInfo.add(new SchemaInfo(schema));
Review Comment:
Done
--
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]