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 2022/03/29 15:47:52 UTC

[GitHub] [hudi] codope commented on a change in pull request #5169: [HUDI-3743] Support DELETE_PARTITION for metadata table

codope commented on a change in pull request #5169:
URL: https://github.com/apache/hudi/pull/5169#discussion_r837636868



##########
File path: hudi-client/hudi-spark-client/src/main/java/org/apache/hudi/metadata/SparkHoodieBackedTableMetadataWriter.java
##########
@@ -177,4 +181,16 @@ protected void commit(String instantTime, Map<MetadataPartitionType, HoodieData<
     // Update total size of the metadata and count of base/log files
     metrics.ifPresent(m -> m.updateSizeMetrics(metadataMetaClient, metadata));
   }
+
+  @Override
+  public void dropIndex(String instantTime, List<MetadataPartitionType> indexesToDrop) {
+    List<String> partitionsToDrop = indexesToDrop.stream().map(MetadataPartitionType::getPartitionPath).collect(Collectors.toList());
+    LOG.warn("Deleting Metadata Table partitions: " + partitionsToDrop);
+
+    try (SparkRDDWriteClient writeClient = new SparkRDDWriteClient(engineContext, metadataWriteConfig, true)) {
+      String actionType = CommitUtils.getCommitActionType(WriteOperationType.DELETE_PARTITION, HoodieTableType.MERGE_ON_READ);

Review comment:
       the metadata table is MOR table and this commit will be on metadata table.




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