From b2e4796901f663ed63511abcbd0f2ffcd450c3db Mon Sep 17 00:00:00 2001 From: Juliusz Stasiewicz Date: Thu, 21 May 2020 14:40:35 +0200 Subject: [PATCH] Added support for `checkAndRepairCdcStreams` command --- .../java/org/apache/cassandra/service/StorageService.java | 6 ++++++ .../org/apache/cassandra/service/StorageServiceMBean.java | 1 + 2 files changed, 7 insertions(+) diff --git a/src/main/java/org/apache/cassandra/service/StorageService.java b/src/main/java/org/apache/cassandra/service/StorageService.java index bea217f..8b790b9 100644 --- a/src/main/java/org/apache/cassandra/service/StorageService.java +++ b/src/main/java/org/apache/cassandra/service/StorageService.java @@ -476,6 +476,12 @@ public class StorageService extends MetricsMBean implements StorageServiceMBean, return client.getListInetAddressValue(""); } + @Override + public void checkAndRepairCdcStreams() throws IOException { + log(" checkAndRepairCdcStreams() throws IOException"); + client.post("/storage_service/cdc_streams_check_and_repair"); + } + /** * Takes the snapshot for the given keyspaces. A snapshot name must be * specified. diff --git a/src/main/java/org/apache/cassandra/service/StorageServiceMBean.java b/src/main/java/org/apache/cassandra/service/StorageServiceMBean.java index 7d48248..3eead26 100644 --- a/src/main/java/org/apache/cassandra/service/StorageServiceMBean.java +++ b/src/main/java/org/apache/cassandra/service/StorageServiceMBean.java @@ -213,6 +213,7 @@ public interface StorageServiceMBean extends NotificationEmitter { public List getNaturalEndpoints(String keyspaceName, ByteBuffer key); + public void checkAndRepairCdcStreams() throws IOException; /** * Takes the snapshot for the given keyspaces. A snapshot name must be * specified.