You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@hudi.apache.org by "nsivabalan (via GitHub)" <gi...@apache.org> on 2023/03/24 17:49:09 UTC

[GitHub] [hudi] nsivabalan commented on pull request #8275: [HUDI-5289] Avoiding repeated trigger of clustering dag

nsivabalan commented on PR #8275:
URL: https://github.com/apache/hudi/pull/8275#issuecomment-1483190292

   hey @KnightChess : 
   not sure whats your suggestion.
   We do already check isEmpty in SparkRddWriteClient.
   
   ```
     private void validateClusteringCommit(HoodieWriteMetadata<JavaRDD<WriteStatus>> clusteringMetadata, String clusteringCommitTime, HoodieTable table) {
       if (clusteringMetadata.getWriteStatuses().isEmpty()) {
         HoodieClusteringPlan clusteringPlan = ClusteringUtils.getClusteringPlan(
                 table.getMetaClient(), HoodieTimeline.getReplaceCommitRequestedInstant(clusteringCommitTime))
             .map(Pair::getRight).orElseThrow(() -> new HoodieClusteringException(
                 "Unable to read clustering plan for instant: " + clusteringCommitTime));
         throw new HoodieClusteringException("Clustering plan produced 0 WriteStatus for " + clusteringCommitTime
             + " #groups: " + clusteringPlan.getInputGroups().size() + " expected at least "
             + clusteringPlan.getInputGroups().stream().mapToInt(HoodieClusteringGroup::getNumOutputFileGroups).sum()
             + " write statuses");
       }
     }
   ```
   


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