gerlowskija commented on code in PR #1119:
URL: https://github.com/apache/solr/pull/1119#discussion_r1006099737


##########
solr/core/src/java/org/apache/solr/handler/replication/BackupAPI.java:
##########
@@ -0,0 +1,100 @@
+package org.apache.solr.handler.replication;
+
+import static org.apache.solr.handler.ClusterAPI.wrapParams;
+import static 
org.apache.solr.security.PermissionNameProvider.Name.CORE_EDIT_PERM;
+
+import io.swagger.v3.oas.annotations.Operation;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.parameters.RequestBody;
+import java.util.HashMap;
+import java.util.Map;
+import javax.inject.Inject;
+import javax.ws.rs.POST;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import org.apache.solr.api.JerseyResource;
+import org.apache.solr.common.annotation.JsonProperty;
+import org.apache.solr.core.CoreContainer;
+import org.apache.solr.handler.ReplicationHandler;
+import org.apache.solr.jersey.JacksonReflectMapWriter;
+import org.apache.solr.jersey.PermissionName;
+import org.apache.solr.jersey.SolrJerseyResponse;
+import org.apache.solr.request.SolrQueryRequest;
+import org.apache.solr.response.SolrQueryResponse;
+
+/** V2 endpoint for Backup API used for User-Managed clusters and Single-Node 
Installation. */
+@Path("/cores/{cores}/replication/backups")
+public class BackupAPI extends JerseyResource {
+  private final SolrQueryRequest solrQueryRequest;
+  private final SolrQueryResponse solrQueryResponse;
+  private final ReplicationHandler replicationHandler;
+
+  @PathParam("cores")
+  private String coreName;
+
+  @Inject
+  public BackupAPI(
+      CoreContainer cc, SolrQueryRequest solrQueryRequest, SolrQueryResponse 
solrQueryResponse) {
+    this.replicationHandler =
+        (ReplicationHandler) 
cc.getCore(coreName).getRequestHandler(ReplicationHandler.PATH);

Review Comment:
   Short answer: you're right that this doesn't work currently.
   
   See my slightly longer explanation 
[here](https://github.com/apache/solr/pull/1119#discussion_r1006098487).



-- 
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: issues-unsubscr...@solr.apache.org

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


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@solr.apache.org
For additional commands, e-mail: issues-h...@solr.apache.org

Reply via email to