Rename minimumNumberOfDriversPerTask to guaranteedNumberOfDriversPerTask
@@ -85,7 +85,7 @@ public class TaskExecutor
private final int runnerThreads;
private final int minimumNumberOfDrivers;
- private final int minimumNumberOfDriversPerTask;
+ private final int guaranteedNumberOfDriversPerTask;
private final int maximumNumberOfDriversPerTask;
private final Ticker ticker;
@@ -162,18 +162,18 @@ public class TaskExecutor
}
@VisibleForTesting
- public TaskExecutor(int runnerThreads, int minDrivers, int minimumNumberOfDriversPerTask, int maximumNumberOfDriversPerTask, Ticker ticker)
+ public TaskExecutor(int runnerThreads, int minDrivers, int guaranteedNumberOfDriversPerTask, int maximumNumberOfDriversPerTask, Ticker ticker)
{
- this(runnerThreads, minDrivers, minimumNumberOfDriversPerTask, maximumNumberOfDriversPerTask, new MultilevelSplitQueue(2), ticker);
+ this(runnerThreads, minDrivers, guaranteedNumberOfDriversPerTask, maximumNumberOfDriversPerTask, new MultilevelSplitQueue(2), ticker);
}
@VisibleForTesting
- public TaskExecutor(int runnerThreads, int minDrivers, int minimumNumberOfDriversPerTask, int maximumNumberOfDriversPerTask, MultilevelSplitQueue splitQueue, Ticker ticker)
+ public TaskExecutor(int runnerThreads, int minDrivers, int guaranteedNumberOfDriversPerTask, int maximumNumberOfDriversPerTask, MultilevelSplitQueue splitQueue, Ticker ticker)
{
checkArgument(runnerThreads > 0, "runnerThreads must be at least 1");
- checkArgument(minimumNumberOfDriversPerTask > 0, "minimumNumberOfDriversPerTask must be at least 1");
+ checkArgument(guaranteedNumberOfDriversPerTask > 0, "guaranteedNumberOfDriversPerTask must be at least 1");
checkArgument(maximumNumberOfDriversPerTask > 0, "maximumNumberOfDriversPerTask must be at least 1");
- checkArgument(minimumNumberOfDriversPerTask <= maximumNumberOfDriversPerTask, "minimumNumberOfDriversPerTask cannot be greater than maximumNumberOfDriversPerTask");
+ checkArgument(guaranteedNumberOfDriversPerTask <= maximumNumberOfDriversPerTask, "guaranteedNumberOfDriversPerTask cannot be greater than maximumNumberOfDriversPerTask");
// we manage thread pool size directly, so create an unlimited pool
this.executor = newCachedThreadPool(threadsNamed("task-processor-%s"));
@@ -183,7 +183,7 @@ public class TaskExecutor
this.ticker = requireNonNull(ticker, "ticker is null");
this.minimumNumberOfDrivers = minDrivers;
- this.minimumNumberOfDriversPerTask = minimumNumberOfDriversPerTask;
+ this.guaranteedNumberOfDriversPerTask = guaranteedNumberOfDriversPerTask;
this.maximumNumberOfDriversPerTask = maximumNumberOfDriversPerTask;
this.waitingSplits = requireNonNull(splitQueue, "splitQueue is null");
this.tasks = new LinkedList<>();
@@ -359,7 +359,7 @@ public class TaskExecutor
// immediately schedule a new split for this task. This assures
// that a task gets its fair amount of consideration (you have to
// have splits to be considered for running on a thread).
- if (taskHandle.getRunningLeafSplits() < minimumNumberOfDriversPerTask) {
+ if (taskHandle.getRunningLeafSplits() < guaranteedNumberOfDriversPerTask) {
PrioritizedSplitRunner split = taskHandle.pollNextSplit();
if (split != null) {
startSplit(split);
