Skip to content

Commit

Permalink
Remove unused coordinator dynamic configs mergeSegmentsLimit, mergeBy…
Browse files Browse the repository at this point in the history
…tesLimit (#17384)

* Remove unused coordinator dynamic configs

* Update docs and web-console
  • Loading branch information
kfaraz authored Oct 22, 2024
1 parent 6cf372a commit 9dfb378
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 149 deletions.
8 changes: 1 addition & 7 deletions docs/api-reference/dynamic-configuration-api.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,8 +91,6 @@ Host: http://ROUTER_IP:ROUTER_PORT
```json
{
"millisToWaitBeforeDeleting": 900000,
"mergeBytesLimit": 524288000,
"mergeSegmentsLimit": 100,
"maxSegmentsToMove": 100,
"replicantLifetime": 15,
"replicationThrottleLimit": 500,
Expand Down Expand Up @@ -159,8 +157,6 @@ curl "http://ROUTER_IP:ROUTER_PORT/druid/coordinator/v1/config" \
--header 'Content-Type: application/json' \
--data '{
"millisToWaitBeforeDeleting": 900000,
"mergeBytesLimit": 524288000,
"mergeSegmentsLimit": 100,
"maxSegmentsToMove": 5,
"percentOfSegmentsToConsiderPerMove": 100,
"useBatchedSegmentSampler": true,
Expand Down Expand Up @@ -192,8 +188,6 @@ Content-Length: 683
{
"millisToWaitBeforeDeleting": 900000,
"mergeBytesLimit": 524288000,
"mergeSegmentsLimit": 100,
"maxSegmentsToMove": 5,
"percentOfSegmentsToConsiderPerMove": 100,
"useBatchedSegmentSampler": true,
Expand Down Expand Up @@ -295,7 +289,7 @@ Host: http://ROUTER_IP:ROUTER_PORT
"comment": "",
"ip": "127.0.0.1"
},
"payload": "{\"millisToWaitBeforeDeleting\":900000,\"mergeBytesLimit\":524288000,\"mergeSegmentsLimit\":100,\"maxSegmentsToMove\":5,\"replicantLifetime\":15,\"replicationThrottleLimit\":10,\"balancerComputeThreads\":1,\"killDataSourceWhitelist\":[],\"killPendingSegmentsSkipList\":[],\"maxSegmentsInNodeLoadingQueue\":100,\"decommissioningNodes\":[],\"decommissioningMaxPercentOfMaxSegmentsToMove\":70,\"pauseCoordination\":false,\"replicateAfterLoadTimeout\":false,\"maxNonPrimaryReplicantsToLoad\":2147483647,\"useRoundRobinSegmentAssignment\":true,\"smartSegmentLoading\":true,\"debugDimensions\":null}",
"payload": "{\"millisToWaitBeforeDeleting\":900000,\"maxSegmentsToMove\":5,\"replicantLifetime\":15,\"replicationThrottleLimit\":10,\"balancerComputeThreads\":1,\"killDataSourceWhitelist\":[],\"killPendingSegmentsSkipList\":[],\"maxSegmentsInNodeLoadingQueue\":100,\"decommissioningNodes\":[],\"decommissioningMaxPercentOfMaxSegmentsToMove\":70,\"pauseCoordination\":false,\"replicateAfterLoadTimeout\":false,\"maxNonPrimaryReplicantsToLoad\":2147483647,\"useRoundRobinSegmentAssignment\":true,\"smartSegmentLoading\":true,\"debugDimensions\":null}",
"auditTime": "2023-10-03T20:59:51.622Z"
}
]
Expand Down
2 changes: 0 additions & 2 deletions docs/configuration/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -951,8 +951,6 @@ The following table shows the dynamic configuration properties for the Coordinat
|Property|Description|Default|
|--------|-----------|-------|
|`millisToWaitBeforeDeleting`|How long does the Coordinator need to be a leader before it can start marking overshadowed segments as unused in metadata storage.| 900000 (15 mins)|
|`mergeBytesLimit`|The maximum total uncompressed size in bytes of segments to merge.|524288000L|
|`mergeSegmentsLimit`|The maximum number of segments that can be in a single [append task](../ingestion/tasks.md).|100|
|`smartSegmentLoading`|Enables ["smart" segment loading mode](#smart-segment-loading) which dynamically computes the optimal values of several properties that maximize Coordinator performance.|true|
|`maxSegmentsToMove`|The maximum number of segments that can be moved in a Historical tier at any given time.|100|
|`replicantLifetime`|The maximum number of Coordinator runs for which a segment can wait in the load queue of a Historical before Druid raises an alert.|15|
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,6 @@ public class CoordinatorDynamicConfig
public static final String CONFIG_KEY = "coordinator.config";

private final long markSegmentAsUnusedDelayMillis;
private final long mergeBytesLimit;
private final int mergeSegmentsLimit;
private final int maxSegmentsToMove;
private final int replicantLifetime;
private final int replicationThrottleLimit;
Expand Down Expand Up @@ -98,8 +96,6 @@ public CoordinatorDynamicConfig(
// updated to Jackson 2.9 it could be changed, see https://github.com/apache/druid/issues/7152
@JsonProperty("millisToWaitBeforeDeleting")
long markSegmentAsUnusedDelayMillis,
@JsonProperty("mergeBytesLimit") long mergeBytesLimit,
@JsonProperty("mergeSegmentsLimit") int mergeSegmentsLimit,
@JsonProperty("maxSegmentsToMove") int maxSegmentsToMove,
@JsonProperty("replicantLifetime") int replicantLifetime,
@JsonProperty("replicationThrottleLimit") int replicationThrottleLimit,
Expand Down Expand Up @@ -127,8 +123,6 @@ public CoordinatorDynamicConfig(
{
this.markSegmentAsUnusedDelayMillis =
markSegmentAsUnusedDelayMillis;
this.mergeBytesLimit = mergeBytesLimit;
this.mergeSegmentsLimit = mergeSegmentsLimit;
this.maxSegmentsToMove = maxSegmentsToMove;
this.smartSegmentLoading = Builder.valueOrDefault(smartSegmentLoading, Defaults.SMART_SEGMENT_LOADING);

Expand Down Expand Up @@ -212,18 +206,6 @@ public long getMarkSegmentAsUnusedDelayMillis()
return markSegmentAsUnusedDelayMillis;
}

@JsonProperty
public long getMergeBytesLimit()
{
return mergeBytesLimit;
}

@JsonProperty
public int getMergeSegmentsLimit()
{
return mergeSegmentsLimit;
}

@JsonProperty
public int getMaxSegmentsToMove()
{
Expand Down Expand Up @@ -294,7 +276,7 @@ public boolean isSmartSegmentLoading()
* List of historical servers to 'decommission'. Coordinator will not assign new segments to 'decommissioning'
* servers, and segments will be moved away from them to be placed on non-decommissioning servers.
*
* @return list of host:port entries
* @return Set of host:port entries
*/
@JsonProperty
public Set<String> getDecommissioningNodes()
Expand Down Expand Up @@ -332,8 +314,6 @@ public String toString()
return "CoordinatorDynamicConfig{" +
"leadingTimeMillisBeforeCanMarkAsUnusedOvershadowedSegments="
+ markSegmentAsUnusedDelayMillis +
", mergeBytesLimit=" + mergeBytesLimit +
", mergeSegmentsLimit=" + mergeSegmentsLimit +
", maxSegmentsToMove=" + maxSegmentsToMove +
", replicantLifetime=" + replicantLifetime +
", replicationThrottleLimit=" + replicationThrottleLimit +
Expand Down Expand Up @@ -362,8 +342,6 @@ public boolean equals(Object o)
CoordinatorDynamicConfig that = (CoordinatorDynamicConfig) o;

return markSegmentAsUnusedDelayMillis == that.markSegmentAsUnusedDelayMillis
&& mergeBytesLimit == that.mergeBytesLimit
&& mergeSegmentsLimit == that.mergeSegmentsLimit
&& maxSegmentsToMove == that.maxSegmentsToMove
&& balancerComputeThreads == that.balancerComputeThreads
&& replicantLifetime == that.replicantLifetime
Expand All @@ -389,8 +367,6 @@ public int hashCode()
{
return Objects.hash(
markSegmentAsUnusedDelayMillis,
mergeBytesLimit,
mergeSegmentsLimit,
maxSegmentsToMove,
replicantLifetime,
replicationThrottleLimit,
Expand Down Expand Up @@ -423,8 +399,6 @@ public static int getDefaultBalancerComputeThreads()
private static class Defaults
{
static final long LEADING_MILLIS_BEFORE_MARK_UNUSED = TimeUnit.MINUTES.toMillis(15);
static final long MERGE_BYTES_LIMIT = 524_288_000L;
static final int MERGE_SEGMENTS_LIMIT = 100;
static final int MAX_SEGMENTS_TO_MOVE = 100;
static final int REPLICANT_LIFETIME = 15;
static final int REPLICATION_THROTTLE_LIMIT = 500;
Expand All @@ -441,8 +415,6 @@ private static class Defaults
public static class Builder
{
private Long markSegmentAsUnusedDelayMillis;
private Long mergeBytesLimit;
private Integer mergeSegmentsLimit;
private Integer maxSegmentsToMove;
private Integer replicantLifetime;
private Integer replicationThrottleLimit;
Expand All @@ -466,8 +438,6 @@ public Builder()
@JsonCreator
public Builder(
@JsonProperty("millisToWaitBeforeDeleting") @Nullable Long markSegmentAsUnusedDelayMillis,
@JsonProperty("mergeBytesLimit") @Nullable Long mergeBytesLimit,
@JsonProperty("mergeSegmentsLimit") @Nullable Integer mergeSegmentsLimit,
@JsonProperty("maxSegmentsToMove") @Nullable Integer maxSegmentsToMove,
@JsonProperty("replicantLifetime") @Nullable Integer replicantLifetime,
@JsonProperty("replicationThrottleLimit") @Nullable Integer replicationThrottleLimit,
Expand All @@ -486,8 +456,6 @@ public Builder(
)
{
this.markSegmentAsUnusedDelayMillis = markSegmentAsUnusedDelayMillis;
this.mergeBytesLimit = mergeBytesLimit;
this.mergeSegmentsLimit = mergeSegmentsLimit;
this.maxSegmentsToMove = maxSegmentsToMove;
this.replicantLifetime = replicantLifetime;
this.replicationThrottleLimit = replicationThrottleLimit;
Expand Down Expand Up @@ -600,8 +568,6 @@ public CoordinatorDynamicConfig build()
markSegmentAsUnusedDelayMillis,
Defaults.LEADING_MILLIS_BEFORE_MARK_UNUSED
),
valueOrDefault(mergeBytesLimit, Defaults.MERGE_BYTES_LIMIT),
valueOrDefault(mergeSegmentsLimit, Defaults.MERGE_SEGMENTS_LIMIT),
valueOrDefault(maxSegmentsToMove, Defaults.MAX_SEGMENTS_TO_MOVE),
valueOrDefault(replicantLifetime, Defaults.REPLICANT_LIFETIME),
valueOrDefault(replicationThrottleLimit, Defaults.REPLICATION_THROTTLE_LIMIT),
Expand Down Expand Up @@ -632,8 +598,6 @@ public CoordinatorDynamicConfig build(CoordinatorDynamicConfig defaults)
markSegmentAsUnusedDelayMillis,
defaults.getMarkSegmentAsUnusedDelayMillis()
),
valueOrDefault(mergeBytesLimit, defaults.getMergeBytesLimit()),
valueOrDefault(mergeSegmentsLimit, defaults.getMergeSegmentsLimit()),
valueOrDefault(maxSegmentsToMove, defaults.getMaxSegmentsToMove()),
valueOrDefault(replicantLifetime, defaults.getReplicantLifetime()),
valueOrDefault(replicationThrottleLimit, defaults.getReplicationThrottleLimit()),
Expand Down
Loading

0 comments on commit 9dfb378

Please sign in to comment.