sohami commented on a change in pull request #1677: DRILL-7068: Support memory 
adjustment framework for resource manageme…
URL: https://github.com/apache/drill/pull/1677#discussion_r263052271
 
 

 ##########
 File path: 
exec/java-exec/src/main/java/org/apache/drill/exec/planner/fragment/contrib/SplittingParallelizer.java
 ##########
 @@ -81,12 +83,23 @@ public SplittingParallelizer(QueryContext context) {
       Collection<DrillbitEndpoint> activeEndpoints, PhysicalPlanReader reader, 
Fragment rootFragment,
       UserSession session, QueryContextInformation queryContextInfo) throws 
ExecutionSetupException {
 
-    final PlanningSet planningSet = getFragmentsHelper(activeEndpoints, 
rootFragment);
+    final PlanningSet planningSet = this.prepareFragmentTree(rootFragment);
+
+    Set<Wrapper> rootFragments = getRootFragments(planningSet);
+
+    collectStatsAndParallelizeFragments(planningSet, rootFragments, 
activeEndpoints);
+
+    adjustMemory(planningSet, rootFragments, activeEndpoints);
 
     return generateWorkUnits(
         options, foremanNode, queryId, reader, rootFragment, planningSet, 
session, queryContextInfo);
   }
 
+  @Override
+  protected BiFunction<DrillbitEndpoint, PhysicalOperator, Long> getMemory() {
+    return (endpoint, operator) -> operator.getMaxAllocation();
+  }
 
 Review comment:
   Can be removed as parent `(DefaultQueryParallelizer)` has same implementation

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


With regards,
Apache Git Services

Reply via email to