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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]