You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by GitBox <gi...@apache.org> on 2021/08/01 09:37:13 UTC

[GitHub] [hudi] leesf commented on a change in pull request #3330: [HUDI-2101][RFC-28]support z-order for hudi

leesf commented on a change in pull request #3330:
URL: https://github.com/apache/hudi/pull/3330#discussion_r680482852



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/config/HoodieOptimizeConfig.java
##########
@@ -0,0 +1,133 @@
+/*
+ * 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.ConfigProperty;
+import org.apache.hudi.common.config.HoodieConfig;
+
+import java.io.File;
+import java.io.FileReader;
+import java.io.IOException;
+import java.util.Properties;
+
+/**
+ * Hoodie Configs for Data layout optimize.
+ */
+public class HoodieOptimizeConfig extends HoodieConfig {
+  // Any Data layout optimize params can be saved with this prefix
+  public static final String DATA_LAYOUT_OPTIMIZE_PARAM_PREFIX = "hoodie.data.layout.optimize.";
+  public static final ConfigProperty DATA_LAYOUT_STRATEGY = ConfigProperty
+      .key(DATA_LAYOUT_OPTIMIZE_PARAM_PREFIX + "strategy")
+      .defaultValue("z-order")
+      .sinceVersion("0.10.0")
+      .withDocumentation("config to provide a way to optimize data layout for table, current only support z-order and hilbert");
+
+  public static final ConfigProperty DATA_LAYOUT_BUILD_CURVE_METHOD = ConfigProperty
+      .key(DATA_LAYOUT_OPTIMIZE_PARAM_PREFIX + "build.curve.optimize.method")
+      .defaultValue("directly")
+      .sinceVersion("0.10.0")
+      .withDocumentation("Config to provide whether use directly/sample method to build curve optimize for data layout,"
+          + " build curve_optimize by directly method is faster than by sample method, however sample method produce a better data layout");
+
+  public static final ConfigProperty DATA_LAYOUT_CURVE_OPTIMIZE_SAMPLE_NUMBER = ConfigProperty
+      .key(DATA_LAYOUT_OPTIMIZE_PARAM_PREFIX + "curve.optimize.sample.number")
+      .defaultValue("200000")
+      .sinceVersion("0.10.0")
+      .withDocumentation("when set" + DATA_LAYOUT_BUILD_CURVE_METHOD.key() + " to sample method, sample number need to be set for it."
+          + " larger number means better layout result, but more memory consumer");
+
+  public static final ConfigProperty DATA_LAYOUT_CURVE_OPTIMIZE_SORT_COLUMNS = ConfigProperty
+      .key(DATA_LAYOUT_OPTIMIZE_PARAM_PREFIX + "curve.optimize.sort.columns")
+      .defaultValue("")
+      .sinceVersion("0.10.0")
+      .withDocumentation("sort columns for build curve optimize. default value is empty string which means no sort."
+          + " more sort columns you specify, the worse data layout result. No more than 4 are recommended");
+
+  public static final ConfigProperty DATA_LAYOUT_DATA_SKIPPING_ENABLE = ConfigProperty

Review comment:
       > sorry, i cannot get the point. may be i miss somethings
   
   ConfigProperty<Boolean>




-- 
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: commits-unsubscribe@hudi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org