Log a message when a task is scheduled to run or removed
@@ -227,6 +227,9 @@ public class TaskExecutor
{
requireNonNull(taskId, "taskId is null");
requireNonNull(utilizationSupplier, "utilizationSupplier is null");
+
+ log.info("Task scheduled " + taskId);
+
TaskHandle taskHandle = new TaskHandle(taskId, utilizationSupplier, initialSplitConcurrency, splitConcurrencyAdjustFrequency);
tasks.add(taskHandle);
return taskHandle;
@@ -256,6 +259,8 @@ public class TaskExecutor
int priorityLevel = calculatePriorityLevel(threadUsageNanos);
completedTasksPerLevel.incrementAndGet(priorityLevel);
+ log.info("Task finished or failed " + taskHandle.getTaskId());
+
// replace blocked splits that were terminated
addNewEntrants();
}
