satishkotha commented on a change in pull request #2263: URL: https://github.com/apache/hudi/pull/2263#discussion_r539908859
########## File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieClusteringConfig.java ########## @@ -0,0 +1,155 @@ +/* + * 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.hudi.config; + +import org.apache.hudi.common.config.DefaultHoodieConfig; + +import java.io.File; +import java.io.FileReader; +import java.io.IOException; +import java.util.Properties; + +/** + * Clustering specific configs. + */ +public class HoodieClusteringConfig extends DefaultHoodieConfig { + + public static final String SCHEDULE_CLUSTERING_STRATEGY_CLASS = "hoodie.clustering.schedule.strategy.class"; + public static final String DEFAULT_SCHEDULE_CLUSTERING_STRATEGY_CLASS = + "org.apache.hudi.client.clustering.schedule.SparkBoundedDayBasedScheduleClusteringStrategy"; + + public static final String RUN_CLUSTERING_STRATEGY_CLASS = "hoodie.clustering.run.strategy.class"; + public static final String DEFAULT_RUN_CLUSTERING_STRATEGY_CLASS = + "org.apache.hudi.client.clustering.run.SparkBulkInsertBasedRunClusteringStrategy"; + + // Turn on inline clustering - after few commits a inline compaction will be run + public static final String INLINE_CLUSTERING_PROP = "hoodie.clustering.inline"; + private static final String DEFAULT_INLINE_CLUSTERING = "false"; + + public static final String INLINE_CLUSTERING_NUM_COMMIT_PROP = "hoodie.clustering.inline.num.commits"; + private static final String DEFAULT_INLINE_CLUSTERING_NUM_COMMITS = "4"; + + public static final String CLUSTERING_TARGET_PARTITIONS = "hoodie.clustering.target.partitions"; + public static final String DEFAULT_CLUSTERING_TARGET_PARTITIONS = String.valueOf(2); Review comment: Yes, that ticket can resolve issues to some extent. But, in some cases, there are large day based tables with 1000s of partitions. we probably dont want to scan all partitions in those cases. So i think its useful to have this config. ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: [email protected]
