capistrant commented on code in PR #18939: URL: https://github.com/apache/druid/pull/18939#discussion_r2813946507
########## indexing-service/src/main/java/org/apache/druid/indexing/compact/ReindexingConfigFinalizer.java: ########## @@ -0,0 +1,55 @@ +/* + * 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.indexing.compact; + +import org.apache.druid.server.compaction.CompactionCandidate; +import org.apache.druid.server.coordinator.DataSourceCompactionConfig; + +/** + * Functional interface for customizing a {@link DataSourceCompactionConfig} for a specific + * {@link CompactionCandidate} before creating a reindexing job. This allows template-specific + * logic to be injected without hardcoding behavior in {@link CompactionConfigBasedJobTemplate}. + * <p> + * For example, cascading reindexing templates can use this to optimize filter rules based on + * the candidate's indexing state, while simpler templates can use the identity finalizer. + */ +@FunctionalInterface +public interface ReindexingConfigFinalizer Review Comment: hmm. What about 'optimizer' I haven't really thought too much about this in the rule provider. But in general I think the rule provider should be as light weight as possible in that it is just a vessel to pass rules from some source location to a template, so it can create configs based on the rules (in this case the cascading template). They all supply the same rule types by contract, and like if we hypothetically had a catalog provider and a raw rdbms provider, I think all 3 would want the same optimization done for deletion rules. So overall at least as of now, I think the optimization implementation ties closest to the template type versus the rule provider -- 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]
