AmatyaAvadhanula commented on code in PR #16810:
URL: https://github.com/apache/druid/pull/16810#discussion_r1696305636
##########
server/src/main/java/org/apache/druid/server/coordinator/ClusterCompactionConfig.java:
##########
@@ -17,38 +17,39 @@
* under the License.
*/
-package org.apache.druid.server.http;
+package org.apache.druid.server.coordinator;
import com.fasterxml.jackson.annotation.JsonCreator;
import com.fasterxml.jackson.annotation.JsonProperty;
import org.apache.druid.indexer.CompactionEngine;
import javax.annotation.Nullable;
+import java.util.Objects;
/**
- * Payload to update the cluster-level compaction config.
- * All fields of this class must be nullable. A non-value indicates that the
- * corresponding field is being updated.
+ * Cluster-level compaction configs.
+ * All fields of this class are nullable. A non-null value denotes that the
+ * corresponding field has been explicitly specified.
*/
-public class CompactionConfigUpdateRequest
+public class ClusterCompactionConfig
{
private final Double compactionTaskSlotRatio;
private final Integer maxCompactionTaskSlots;
private final Boolean useAutoScaleSlots;
- private final CompactionEngine compactionEngine;
+ private final CompactionEngine engine;
@JsonCreator
- public CompactionConfigUpdateRequest(
+ public ClusterCompactionConfig(
@JsonProperty("compactionTaskSlotRatio") @Nullable Double
compactionTaskSlotRatio,
@JsonProperty("maxCompactionTaskSlots") @Nullable Integer
maxCompactionTaskSlots,
@JsonProperty("useAutoScaleSlots") @Nullable Boolean useAutoScaleSlots,
- @JsonProperty("compactionEngine") @Nullable CompactionEngine
compactionEngine
+ @JsonProperty("engine") @Nullable CompactionEngine engine
)
{
Review Comment:
I think the constructor should take in null values but create a compaction
config with the non-null default fields.
Otherwise the comparison in the Audit history can be incorrect when there
are null values but the default values change
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]