Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
178ccca
cl tidy
jaykay12 Oct 13, 2026
ea62061
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 13, 2026
ff0bee4
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 15, 2026
09f0b8e
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 17, 2026
16742b1
initial changes
jaykay12 Oct 17, 2026
74d4cc8
tidying
jaykay12 Oct 17, 2026
c75c776
license file
jaykay12 Oct 17, 2026
9d0e65b
fixed
jaykay12 Oct 17, 2026
582831d
added tests
jaykay12 Oct 17, 2026
6faf413
converting into boolean
jaykay12 Oct 17, 2026
6a6eddc
cursor suggestion on review
jaykay12 Oct 17, 2026
6a6da12
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 17, 2026
b591ee3
using details
jaykay12 Oct 18, 2026
784e219
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 18, 2026
02e1ed4
v1 api consistency
jaykay12 Oct 19, 2026
09cb168
adoc
jaykay12 Oct 19, 2026
c0bc433
v2 sheet api
jaykay12 Oct 19, 2026
4bb86cc
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 20, 2026
c585254
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 20, 2026
e0e4ceb
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 20, 2026
4cc79d2
Add real-HTTP test for GET /api/cores/{coreName}/replication
epugh Oct 20, 2026
4bbac40
Document why fetchReplicationDetails uses boxed Boolean
epugh Oct 20, 2026
5279d55
cl
jaykay12 Oct 20, 2026
511df4a
Expose real Booleans in v2 replication details, keep v1 strings
epugh Oct 20, 2026
e8f3f0d
Merge remote-tracking branch 'upstream/main' into pr/5179
epugh Oct 21, 2026
9fe1406
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 21, 2026
0466d40
Merge branch 'SOLR-16398-replication-phase1' of github.com:jaykay12/s…
jaykay12 Oct 21, 2026
8f159bf
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 21, 2026
1e3b494
tests fixed
jaykay12 Oct 21, 2026
9028f95
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 21, 2026
46e14bc
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 21, 2026
e25c967
Merge branch 'main' into SOLR-16398-replication-phase1
jaykay12 Oct 22, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions changelog/unreleased/SOLR-16398-replication-details.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
title:
Add V2 JAX-RS API for replication details (GET /api/cores/{coreName}/replication)
type: added
authors:
- name: Jalaz Kumar
nick: jaykay12
- name: Eric Pugh
nick: epugh
links:
- name: SOLR-16398
url: https://issues.apache.org/jira/browse/SOLR-16398
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,25 @@
import java.io.IOException;
import org.apache.solr.client.api.model.FileListResponse;
import org.apache.solr.client.api.model.IndexVersionResponse;
import org.apache.solr.client.api.model.ReplicationDetailsResponse;
import org.apache.solr.client.api.util.CoreApiParameters;

@Path("/cores/{coreName}/replication")
public interface ReplicationApis {

@GET
@CoreApiParameters
@Operation(
summary = "Return replication configuration and current status.",
tags = {"replication"})
ReplicationDetailsResponse fetchReplicationDetails(
@Parameter(
description = "When true on a follower, include nested details fetched from leader",
required = false)
@QueryParam("follower")
@DefaultValue("true")
Boolean follower);

@GET
@CoreApiParameters
@Path("/indexversion")
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,207 @@
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.solr.client.api.model;

import com.fasterxml.jackson.annotation.JsonProperty;
import io.swagger.v3.oas.annotations.media.Schema;
import java.util.List;
import org.apache.solr.client.api.util.ReflectWritable;

public class ReplicationDetailsResponse extends SolrJerseyResponse {

@JsonProperty("status")
@Schema(description = "Request status, typically OK")
public String status;

@JsonProperty("details")
@Schema(description = "Replication configuration and status details")
public ReplicationDetails details;

public ReplicationDetailsResponse() {}

public ReplicationDetailsResponse(ReplicationDetails details, String status) {
this.details = details;
this.status = status;
}

/** Top-level replication details payload (nested under {@code details} in the response). */
public static class ReplicationDetails implements ReflectWritable {
@JsonProperty("indexSize")
public String indexSize;

@JsonProperty("indexPath")
public String indexPath;

@JsonProperty("commits")
public List<CommitDetails> commits;

@JsonProperty("isLeader")
public Boolean isLeader;

@JsonProperty("isFollower")
public Boolean isFollower;

@JsonProperty("indexVersion")
public Long indexVersion;

@JsonProperty("generation")
public Long generation;

@JsonProperty("leader")
public LeaderDetails leader;

@JsonProperty("follower")
public FollowerDetails follower;

/** Optional snapshot/backup stats (heterogeneous NamedList from the handler). */
@JsonProperty("backup")
public Object backup;
}

public static class CommitDetails implements ReflectWritable {
@JsonProperty("indexVersion")
public Long indexVersion;

@JsonProperty("generation")
public Long generation;

@JsonProperty("filelist")
public List<String> filelist;
}

public static class LeaderDetails implements ReflectWritable {
@JsonProperty("confFiles")
public String confFiles;

@JsonProperty("replicateAfter")
public List<String> replicateAfter;

@JsonProperty("replicationEnabled")
public Boolean replicationEnabled;

@JsonProperty("replicableVersion")
public Long replicableVersion;

@JsonProperty("replicableGeneration")
public Long replicableGeneration;
}

public static class FollowerDetails implements ReflectWritable {
/** Nested leader details (remote NamedList or map), present when follower=true. */
@JsonProperty("leaderDetails")
public Object leaderDetails;

@JsonProperty("ERROR")
public String error;

@JsonProperty("leaderUrl")
public String leaderUrl;

@JsonProperty("pollInterval")
public String pollInterval;

@JsonProperty("nextExecutionAt")
public String nextExecutionAt;

@JsonProperty("indexReplicatedAt")
public String indexReplicatedAt;

@JsonProperty("indexReplicatedAtList")
public List<String> indexReplicatedAtList;

@JsonProperty("replicationFailedAtList")
public List<String> replicationFailedAtList;

@JsonProperty("timesIndexReplicated")
public Integer timesIndexReplicated;

@JsonProperty("confFilesReplicated")
public String confFilesReplicated;

@JsonProperty("timesConfigReplicated")
public Integer timesConfigReplicated;

@JsonProperty("confFilesReplicatedAt")
public String confFilesReplicatedAt;

@JsonProperty("lastCycleBytesDownloaded")
public Long lastCycleBytesDownloaded;

@JsonProperty("timesFailed")
public Integer timesFailed;

@JsonProperty("replicationFailedAt")
public String replicationFailedAt;

@JsonProperty("previousCycleTimeInSeconds")
public Long previousCycleTimeInSeconds;

@JsonProperty("currentDate")
public String currentDate;

@JsonProperty("isPollingDisabled")
public Boolean isPollingDisabled;

@JsonProperty("isReplicating")
public Boolean isReplicating;

@JsonProperty("filesToDownload")
public List<String> filesToDownload;

@JsonProperty("numFilesToDownload")
public String numFilesToDownload;

@JsonProperty("bytesToDownload")
public String bytesToDownload;

@JsonProperty("filesDownloaded")
public List<String> filesDownloaded;

@JsonProperty("numFilesDownloaded")
public String numFilesDownloaded;

@JsonProperty("replicationStartTime")
public String replicationStartTime;

@JsonProperty("timeElapsed")
public String timeElapsed;

@JsonProperty("currentFile")
public String currentFile;

@JsonProperty("currentFileSize")
public String currentFileSize;

@JsonProperty("currentFileSizeDownloaded")
public String currentFileSizeDownloaded;

@JsonProperty("currentFileSizePercent")
public String currentFileSizePercent;

@JsonProperty("bytesDownloaded")
public String bytesDownloaded;

@JsonProperty("totalPercent")
public String totalPercent;

@JsonProperty("timeRemaining")
public String timeRemaining;

@JsonProperty("downloadSpeed")
public String downloadSpeed;
}
}
Loading
Loading