capistrant commented on code in PR #18939:
URL: https://github.com/apache/druid/pull/18939#discussion_r2825609859


##########
server/src/main/java/org/apache/druid/server/compaction/ReindexingRule.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.server.compaction;
+
+import org.joda.time.DateTime;
+import org.joda.time.Interval;
+import org.joda.time.Period;
+
+import javax.annotation.Nullable;
+
+/**
+ * Defines a reindexing configuration that applies to data based on age 
thresholds.
+ * <p>
+ * Rules encapsulate specific aspects of reindexing (granularity, filters, 
tuning, etc.)
+ * and specify when they should apply via a {@link Period} which defines the 
age threshold for applicability.
+ * <p>
+ * Rules conditionally apply to data "older than" the rules threshold relative 
to the time of rule evaluation.
+ */
+public interface ReindexingRule
+{
+  /**
+   * Indicates how a rule applies to a given time interval based on the rule's 
period threshold.
+   * <ul>
+   * <li>PARTIAL: The rule applies to part of the interval.</li>
+   * <li>FULL: The rule applies to the entire interval.</li>
+   * <li>NONE: The rule does not apply to the interval at all.</li>
+   * </ul>
+   */
+  enum AppliesToMode
+  {
+    PARTIAL,

Review Comment:
   good question. I was under the impression when I initially was writing this 
that it may be useful, but from where I am now after dealing with trying to 
make all of this possible to reason about as an operator, I think a rule 
provider trying to manage partial overlaps somehow instead of forcing full 
coverage, would be a nightmare.



##########
server/src/main/java/org/apache/druid/server/compaction/ReindexingRule.java:
##########
@@ -0,0 +1,87 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+package org.apache.druid.server.compaction;
+
+import org.joda.time.DateTime;
+import org.joda.time.Interval;
+import org.joda.time.Period;
+
+import javax.annotation.Nullable;
+
+/**
+ * Defines a reindexing configuration that applies to data based on age 
thresholds.
+ * <p>
+ * Rules encapsulate specific aspects of reindexing (granularity, filters, 
tuning, etc.)
+ * and specify when they should apply via a {@link Period} which defines the 
age threshold for applicability.
+ * <p>
+ * Rules conditionally apply to data "older than" the rules threshold relative 
to the time of rule evaluation.
+ */
+public interface ReindexingRule
+{
+  /**
+   * Indicates how a rule applies to a given time interval based on the rule's 
period threshold.
+   * <ul>
+   * <li>PARTIAL: The rule applies to part of the interval.</li>
+   * <li>FULL: The rule applies to the entire interval.</li>
+   * <li>NONE: The rule does not apply to the interval at all.</li>
+   * </ul>
+   */
+  enum AppliesToMode
+  {
+    PARTIAL,

Review Comment:
   good question. I was under the impression when I initially was writing this 
that it may be useful, but from where I am now after dealing with trying to 
make all of this possible to reason about as an operator, I think a rule 
provider trying to manage partial overlaps somehow instead of forcing full 
coverage, would be a nightmare. so maybe I should delete?



-- 
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]

Reply via email to