Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/868#discussion_r130187872
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/util/MemoryAllocationUtilities.java
 ---
    @@ -58,7 +58,10 @@ public static void 
setupBufferedOpsMemoryAllocations(final PhysicalPlan plan, fi
         // if there are any sorts, compute the maximum allocation, and set it 
on them
         if (bufferedOpList.size() > 0) {
           final OptionManager optionManager = queryContext.getOptions();
    -      final long maxWidthPerNode = 
optionManager.getOption(ExecConstants.MAX_WIDTH_PER_NODE_KEY).num_val;
    +      final long maxWidthPerNode;
    +      double cpu_load_average = 
optionManager.getOption(ExecConstants.CPU_LOAD_AVERAGE);
    +      final long maxWidth = 
optionManager.getOption(ExecConstants.MAX_WIDTH_PER_NODE);
    +      maxWidthPerNode = 
ExecConstants.MAX_WIDTH_PER_NODE.computeMaxWidth(cpu_load_average,maxWidth);
    --- End diff --
    
    Move declaration here: `final long maxWidthPerNode = ...`


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to