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/09/04 01:16:26 UTC

[GitHub] [hudi] leesf commented on a change in pull request #3173: [HUDI-1951] Add bucket hash index, compatible with the hive bucket

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



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/index/HoodieIndex.java
##########
@@ -97,13 +100,32 @@ public abstract O updateLocation(O writeStatuses, HoodieEngineContext context,
   @PublicAPIMethod(maturity = ApiMaturityLevel.STABLE)
   public abstract boolean isImplicitWithStorage();
 
+  /**
+   * An index might need customized partitioner other than general upsert and insert partitioner.
+   */
+  @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
+  public Option<Partitioner> getCustomizedPartitioner(WorkloadProfile profile,
+      HoodieEngineContext context,
+      HoodieTable table,
+      HoodieWriteConfig writeConfig) {
+    return Option.empty();
+  }
+
+  /**
+   * If the `getCustomizedPartitioner` returns a partitioner, it has to be true.
+   */
+  @PublicAPIMethod(maturity = ApiMaturityLevel.EVOLVING)
+  public boolean needCustomizedPartitioner() {

Review comment:
       can we remove this method and replace the callers of `needCustomzedPartitioner` to `getCustomzedPartitioner`, and determine whether it returns Option.empty?




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