Skip to content

Commit

Permalink
Address comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jasperjiaguo committed Aug 28, 2022
1 parent f7173c3 commit 1a04903
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@
@SuppressWarnings("rawtypes")
public class GroupByOrderByCombineOperator extends BaseCombineOperator {
public static final int MAX_TRIM_THRESHOLD = 1_000_000_000;
public static final int MAX_GROUP_BY_KEYS_PER_MERGE_CALL = 10_000;
public static final int MAX_GROUP_BY_KEYS_MERGED_PER_INTERRUPTION_CHECK = 10_000;

private static final Logger LOGGER = LoggerFactory.getLogger(GroupByOrderByCombineOperator.class);

Expand Down Expand Up @@ -208,7 +208,7 @@ protected void processSegments(int taskIndex) {

// Check for thread interruption, every time after merging 10_000 keys
private void checkMergePhaseInterruption(int mergedKeys) {
if (mergedKeys % MAX_GROUP_BY_KEYS_PER_MERGE_CALL == 0 && Thread.interrupted()) {
if (mergedKeys % MAX_GROUP_BY_KEYS_MERGED_PER_INTERRUPTION_CHECK == 0 && Thread.interrupted()) {
throw new EarlyTerminationException();
}
}
Expand Down

0 comments on commit 1a04903

Please sign in to comment.