Skip to content

Commit 0ba01b1

Browse files
committed
Remove ability to request a repair with no notifications from the v2 repair endpoint.
1 parent 05b8e79 commit 0ba01b1

File tree

4 files changed

+1
-11
lines changed

4 files changed

+1
-11
lines changed

management-api-server/doc/openapi.json

-3
Original file line numberDiff line numberDiff line change
@@ -2137,9 +2137,6 @@
21372137
"keyspace" : {
21382138
"type" : "string"
21392139
},
2140-
"notifications" : {
2141-
"type" : "boolean"
2142-
},
21432140
"repair_parallelism" : {
21442141
"type" : "string",
21452142
"enum" : [ "sequential", "parallel", "dc_parallel" ]

management-api-server/src/main/java/com/datastax/mgmtapi/resources/v2/RepairResourcesV2.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ public final Response repair(RepairRequest request) {
8383
request.keyspace,
8484
request.tables,
8585
request.fullRepair,
86-
request.notifications,
86+
true,
8787
getParallelismName(request.repairParallelism),
8888
request.datacenters,
8989
getRingRangeString(request.associatedTokens),

management-api-server/src/main/java/com/datastax/mgmtapi/resources/v2/models/RepairRequest.java

-5
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,6 @@ public class RepairRequest {
2323
@JsonProperty(value = "full_repair", defaultValue = "true")
2424
public final Boolean fullRepair;
2525

26-
@JsonProperty(value = "notifications", defaultValue = "true")
27-
public final Boolean notifications;
28-
2926
@Nullable
3027
@JsonProperty(value = "associated_tokens")
3128
public final List<RingRange> associatedTokens;
@@ -47,15 +44,13 @@ public RepairRequest(
4744
@JsonProperty(value = "keyspace", required = true) String keyspace,
4845
@JsonProperty(value = "tables") List<String> tables,
4946
@JsonProperty(value = "full_repair", defaultValue = "true") Boolean fullRepair,
50-
@JsonProperty(value = "notifications", defaultValue = "true") boolean notifications,
5147
@JsonProperty(value = "associated_tokens") List<RingRange> associatedTokens,
5248
@JsonProperty(value = "repair_parallelism") RepairParallelism repairParallelism,
5349
@JsonProperty(value = "datacenters") List<String> datacenters,
5450
@JsonProperty(value = "repair_thread_count") Integer repairThreadCount) {
5551
this.keyspace = keyspace;
5652
this.tables = tables;
5753
this.fullRepair = fullRepair;
58-
this.notifications = notifications;
5954
this.associatedTokens = associatedTokens;
6055
this.datacenters = datacenters;
6156
this.repairParallelism = repairParallelism;

management-api-server/src/test/java/com/datastax/mgmtapi/resources/v2/RepairResourcesV2Test.java

-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ public void testRepairResourcesSuccess() throws Exception {
5050
"keyspace",
5151
Collections.singletonList("table1"),
5252
false,
53-
true,
5453
Collections.singletonList(new RingRange("-100", "100")),
5554
RepairParallelism.DATACENTER_AWARE,
5655
Collections.EMPTY_LIST,
@@ -93,7 +92,6 @@ public void testRepairResourcesFail() throws Exception {
9392
"",
9493
tables,
9594
false,
96-
true,
9795
Collections.EMPTY_LIST,
9896
RepairParallelism.DATACENTER_AWARE,
9997
Collections.EMPTY_LIST,

0 commit comments

Comments
 (0)