[
https://issues.apache.org/jira/browse/DRILL-5601?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16093826#comment-16093826
]
ASF GitHub Bot commented on DRILL-5601:
---------------------------------------
Github user paul-rogers commented on a diff in the pull request:
https://github.com/apache/drill/pull/860#discussion_r128367935
--- Diff:
exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/xsort/managed/SortConfig.java
---
@@ -114,15 +127,25 @@ public SortConfig(DrillConfig config) {
} else {
mSortBatchSize = Character.MAX_VALUE;
}
+
+ // Disable the single-batch shortcut; primarily for testing
+
+ if (config.hasPath(ExecConstants.EXTERNAL_SORT_OPTIMIZE_SINGLE_BATCH))
{
+ enableSingleBatchShortcut =
config.getBoolean(ExecConstants.EXTERNAL_SORT_OPTIMIZE_SINGLE_BATCH);
+ } else {
--- End diff --
Yes. But the "final" provides useful information: the value can't change
once set. Once we accept "final" then we're stuck with the awkward code to
initialize the value only once.
> Rollup of External Sort memory management fixes
> -----------------------------------------------
>
> Key: DRILL-5601
> URL: https://issues.apache.org/jira/browse/DRILL-5601
> Project: Apache Drill
> Issue Type: Task
> Affects Versions: 1.11.0
> Reporter: Paul Rogers
> Assignee: Paul Rogers
> Fix For: 1.12.0
>
>
> Rollup of a set of specific JIRA entries that all relate to the very
> difficult problem of managing memory within Drill in order for the external
> sort to stay within a memory budget. In general, the fixes relate to better
> estimating memory used by the three ways that Drill allocates vector memory
> (see DRILL-5522) and to predicting the size of vectors that the sort will
> create, to avoid repeated realloc-copy cycles (see DRILL-5594).
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)