jerryshao commented on code in PR #7944:
URL: https://github.com/apache/gravitino/pull/7944#discussion_r2262046804
##########
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:
Actually, that is an incompatible change, we should avoid it. Anyway, I will
remove it.
--
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]