mchades commented on code in PR #7944:
URL: https://github.com/apache/gravitino/pull/7944#discussion_r2261953876
##########
clients/client-java/src/main/java/org/apache/gravitino/client/GravitinoMetalake.java:
##########
@@ -1189,6 +1204,162 @@ public String[] listBindingRoleNames() {
return metadataObjectRoleOperations.listBindingRoleNames();
}
+ @Override
+ public List<JobTemplate> listJobTemplates() {
+ JobTemplateListResponse resp =
+ restClient.get(
+ String.format(API_METALAKES_JOB_TEMPLATES_PATH,
RESTUtils.encodeString(this.name())),
+ ImmutableMap.of("details", "true"),
+ JobTemplateListResponse.class,
+ Collections.emptyMap(),
+ ErrorHandlers.jobErrorHandler());
+ resp.validate();
+
+ return resp.getJobTemplates().stream()
+ .map(org.apache.gravitino.dto.util.DTOConverters::fromDTO)
+ .collect(Collectors.toList());
+ }
+
+ @Override
+ public void registerJobTemplate(JobTemplate jobTemplate)
+ throws JobTemplateAlreadyExistsException {
+ JobTemplateRegisterRequest req =
+ new
JobTemplateRegisterRequest(DTOConverters.toJobTemplateDTO(jobTemplate));
+ req.validate();
Review Comment:
There is a case: after users upgrade the server to change certain request
limitations, if we validate the request on the client side, they will also need
to upgrade the client.
--
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]