kevinrr888 commented on code in PR #5946:
URL: https://github.com/apache/accumulo/pull/5946#discussion_r2414743507


##########
core/src/main/java/org/apache/accumulo/core/summary/SummarySerializer.java:
##########
@@ -88,26 +71,30 @@ public void print(String prefix, String indent, PrintStream 
out) {
 
   public Map<String,Long> getSummary(List<RowRange> ranges, SummarizerFactory 
sf) {
 
-    Summarizer kvs = sf.getSummarizer(sconf);
+    Preconditions.checkState(allSummaries != null,
+        "Summaries were not stored because they exceeded the maximum size");
+
+    Summarizer kvs = sf.getSummarizer(summarizerConfiguration);
 
     Map<String,Long> summary = new HashMap<>();
     for (LgSummaries lgs : allSummaries) {
-      lgs.getSummary(ranges, kvs.combiner(sconf), summary);
+      lgs.getSummary(ranges, kvs.combiner(summarizerConfiguration), summary);
     }
     return summary;
   }
 
   public boolean exceedsRange(List<RowRange> ranges) {
     ranges.forEach(SummarySerializer::validateSummaryRange);
+    Preconditions.checkState(allSummaries != null,
+        "Summaries were not stored because they exceeded the maximum size");
     return Arrays.stream(allSummaries).anyMatch(lgs -> 
ranges.stream().anyMatch(lgs::exceedsRange));
   }

Review Comment:
   Is there a reason the precondition check is not done first?



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

Reply via email to