Skip to content

Commit ff82158

Browse files
committed
Remove default getShardSnapshotsInProgress
1 parent e344693 commit ff82158

File tree

7 files changed

+37
-3
lines changed

7 files changed

+37
-3
lines changed

server/src/main/java/org/elasticsearch/repositories/FilterRepository.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
import org.elasticsearch.indices.recovery.RecoveryState;
2727
import org.elasticsearch.snapshots.SnapshotId;
2828
import org.elasticsearch.snapshots.SnapshotInfo;
29+
import org.elasticsearch.telemetry.metric.LongWithAttributes;
2930

3031
import java.io.IOException;
3132
import java.util.Collection;
@@ -175,6 +176,11 @@ public void awaitIdle() {
175176
in.awaitIdle();
176177
}
177178

179+
@Override
180+
public LongWithAttributes getShardSnapshotsInProgress() {
181+
return in.getShardSnapshotsInProgress();
182+
}
183+
178184
@Override
179185
public Lifecycle.State lifecycleState() {
180186
return in.lifecycleState();

server/src/main/java/org/elasticsearch/repositories/InvalidRepository.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.elasticsearch.indices.recovery.RecoveryState;
2626
import org.elasticsearch.snapshots.SnapshotId;
2727
import org.elasticsearch.snapshots.SnapshotInfo;
28+
import org.elasticsearch.telemetry.metric.LongWithAttributes;
2829

2930
import java.io.IOException;
3031
import java.util.Collection;
@@ -180,6 +181,11 @@ public void awaitIdle() {
180181

181182
}
182183

184+
@Override
185+
public LongWithAttributes getShardSnapshotsInProgress() {
186+
return null;
187+
}
188+
183189
@Override
184190
protected void doStart() {
185191

server/src/main/java/org/elasticsearch/repositories/Repository.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -361,9 +361,7 @@ static boolean assertSnapshotMetaThread() {
361361
* @return The current number of shard snapshots in progress metric value, or null if this repository doesn't track that
362362
*/
363363
@Nullable
364-
default LongWithAttributes getShardSnapshotsInProgress() {
365-
return null;
366-
}
364+
LongWithAttributes getShardSnapshotsInProgress();
367365

368366
default RepositoriesStats.SnapshotStats getSnapshotStats() {
369367
return new RepositoriesStats.SnapshotStats(getRestoreThrottleTimeInNanos(), getSnapshotThrottleTimeInNanos());

server/src/main/java/org/elasticsearch/repositories/UnknownTypeRepository.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import org.elasticsearch.indices.recovery.RecoveryState;
2626
import org.elasticsearch.snapshots.SnapshotId;
2727
import org.elasticsearch.snapshots.SnapshotInfo;
28+
import org.elasticsearch.telemetry.metric.LongWithAttributes;
2829

2930
import java.io.IOException;
3031
import java.util.Collection;
@@ -178,6 +179,11 @@ public void awaitIdle() {
178179

179180
}
180181

182+
@Override
183+
public LongWithAttributes getShardSnapshotsInProgress() {
184+
return null;
185+
}
186+
181187
@Override
182188
protected void doStart() {
183189

server/src/test/java/org/elasticsearch/repositories/RepositoriesServiceTests.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,7 @@
5353
import org.elasticsearch.repositories.blobstore.MeteredBlobStoreRepository;
5454
import org.elasticsearch.snapshots.SnapshotId;
5555
import org.elasticsearch.snapshots.SnapshotInfo;
56+
import org.elasticsearch.telemetry.metric.LongWithAttributes;
5657
import org.elasticsearch.test.ClusterServiceUtils;
5758
import org.elasticsearch.test.ESTestCase;
5859
import org.elasticsearch.threadpool.TestThreadPool;
@@ -772,6 +773,11 @@ public void cloneShardSnapshot(
772773
@Override
773774
public void awaitIdle() {}
774775

776+
@Override
777+
public LongWithAttributes getShardSnapshotsInProgress() {
778+
return null;
779+
}
780+
775781
@Override
776782
public Lifecycle.State lifecycleState() {
777783
return null;

test/framework/src/main/java/org/elasticsearch/index/shard/RestoreOnlyRepository.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@
3131
import org.elasticsearch.repositories.SnapshotShardContext;
3232
import org.elasticsearch.snapshots.SnapshotId;
3333
import org.elasticsearch.snapshots.SnapshotInfo;
34+
import org.elasticsearch.telemetry.metric.LongWithAttributes;
3435

3536
import java.util.Collection;
3637
import java.util.Collections;
@@ -175,4 +176,9 @@ public void cloneShardSnapshot(
175176

176177
throw new UnsupportedOperationException("Unsupported for restore-only repository");
177178
}
179+
180+
@Override
181+
public LongWithAttributes getShardSnapshotsInProgress() {
182+
return null;
183+
}
178184
}

x-pack/plugin/ccr/src/main/java/org/elasticsearch/xpack/ccr/repository/CcrRepository.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@
8686
import org.elasticsearch.snapshots.SnapshotId;
8787
import org.elasticsearch.snapshots.SnapshotInfo;
8888
import org.elasticsearch.snapshots.SnapshotState;
89+
import org.elasticsearch.telemetry.metric.LongWithAttributes;
8990
import org.elasticsearch.threadpool.Scheduler;
9091
import org.elasticsearch.threadpool.ThreadPool;
9192
import org.elasticsearch.transport.RemoteClusterService;
@@ -618,6 +619,11 @@ public void cloneShardSnapshot(
618619
@Override
619620
public void awaitIdle() {}
620621

622+
@Override
623+
public LongWithAttributes getShardSnapshotsInProgress() {
624+
return null;
625+
}
626+
621627
private void updateMappings(
622628
RemoteClusterClient leaderClient,
623629
Index leaderIndex,

0 commit comments

Comments
 (0)