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/01/14 07:19:50 UTC

[GitHub] [hudi] liujinhui1994 commented on a change in pull request #2445: [MINOR] Callback message add partitionPath Field

liujinhui1994 commented on a change in pull request #2445:
URL: https://github.com/apache/hudi/pull/2445#discussion_r557093998



##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/callback/common/HoodieWriteCommitCallbackMessage.java
##########
@@ -41,13 +41,19 @@
    */
   private String basePath;
 
+  /**
+   * partitionPath in hudi table
+   */
+  private String partitionPath;
+
   public HoodieWriteCommitCallbackMessage() {
   }
 
-  public HoodieWriteCommitCallbackMessage(String commitTime, String tableName, String basePath) {
+  public HoodieWriteCommitCallbackMessage(String commitTime, String tableName, String basePath, String partitionPath) {

Review comment:
       good, let me think about it

##########
File path: hudi-client/hudi-client-common/src/main/java/org/apache/hudi/client/AbstractHoodieWriteClient.java
##########
@@ -194,11 +196,14 @@ public boolean commitStats(String instantTime, List<HoodieWriteStat> stats, Opti
     }
 
     // callback if needed.
+    List<String> partitionPath = new ArrayList<>();
+    stats.forEach(stat -> partitionPath.add(stat.getPartitionPath()));
+
     if (config.writeCommitCallbackOn()) {
       if (null == commitCallback) {
         commitCallback = HoodieCommitCallbackFactory.create(config);
       }
-      commitCallback.call(new HoodieWriteCommitCallbackMessage(instantTime, config.getTableName(), config.getBasePath()));
+      commitCallback.call(new HoodieWriteCommitCallbackMessage(instantTime, config.getTableName(), config.getBasePath(), partitionPath.toString()));

Review comment:
       good, let me think about it




----------------------------------------------------------------
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:
users@infra.apache.org