You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2024/12/26 04:05:25 UTC
(pinot) branch master updated: Increase visibility of PinotTaskManager class for better pluggability (#14717)
This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 2e6e3d6119 Increase visibility of PinotTaskManager class for better pluggability (#14717)
2e6e3d6119 is described below
commit 2e6e3d6119c67d41675f0c967668e46dbc166be6
Author: Kartik Khare <kh...@gmail.com>
AuthorDate: Thu Dec 26 09:35:19 2024 +0530
Increase visibility of PinotTaskManager class for better pluggability (#14717)
---
.../pinot/controller/helix/core/minion/PinotTaskManager.java | 10 +++++-----
1 file changed, 5 insertions(+), 5 deletions(-)
diff --git a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
index 94facbc377..37208d7fd0 100644
--- a/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
+++ b/pinot-controller/src/main/java/org/apache/pinot/controller/helix/core/minion/PinotTaskManager.java
@@ -548,7 +548,7 @@ public class PinotTaskManager extends ControllerPeriodicTask<Void> {
* Helper method to schedule tasks (all task types) for the given tables that have the tasks enabled. Returns a map
* from the task type to the list of the tasks scheduled.
*/
- private synchronized Map<String, List<String>> scheduleTasks(List<String> tableNamesWithType, boolean isLeader,
+ protected synchronized Map<String, List<String>> scheduleTasks(List<String> tableNamesWithType, boolean isLeader,
@Nullable String minionInstanceTag) {
_controllerMetrics.addMeteredGlobalValue(ControllerMeter.NUMBER_TIMES_SCHEDULE_TASKS_CALLED, 1L);
@@ -586,7 +586,7 @@ public class PinotTaskManager extends ControllerPeriodicTask<Void> {
}
@Nullable
- private synchronized List<String> scheduleTask(String taskType, List<String> tables,
+ protected synchronized List<String> scheduleTask(String taskType, List<String> tables,
@Nullable String minionInstanceTag) {
PinotTaskGenerator taskGenerator = _taskGeneratorRegistry.getTaskGenerator(taskType);
Preconditions.checkState(taskGenerator != null, "Task type: %s is not registered", taskType);
@@ -611,7 +611,7 @@ public class PinotTaskManager extends ControllerPeriodicTask<Void> {
* Returns the list of task names, or {@code null} if no task is scheduled.
*/
@Nullable
- private List<String> scheduleTask(PinotTaskGenerator taskGenerator, List<TableConfig> enabledTableConfigs,
+ protected List<String> scheduleTask(PinotTaskGenerator taskGenerator, List<TableConfig> enabledTableConfigs,
boolean isLeader, @Nullable String minionInstanceTagForTask) {
String taskType = taskGenerator.getTaskType();
List<String> enabledTables =
@@ -744,7 +744,7 @@ public class PinotTaskManager extends ControllerPeriodicTask<Void> {
}
}
- private synchronized void addTaskTypeMetricsUpdaterIfNeeded(String taskType) {
+ protected synchronized void addTaskTypeMetricsUpdaterIfNeeded(String taskType) {
if (!_taskTypeMetricsUpdaterMap.containsKey(taskType)) {
TaskTypeMetricsUpdater taskTypeMetricsUpdater = new TaskTypeMetricsUpdater(taskType, this);
_pinotHelixResourceManager.getPropertyStore()
@@ -753,7 +753,7 @@ public class PinotTaskManager extends ControllerPeriodicTask<Void> {
}
}
- private boolean isTaskSchedulable(String taskType, List<String> tables) {
+ protected boolean isTaskSchedulable(String taskType, List<String> tables) {
TaskState taskQueueState = _helixTaskResourceManager.getTaskQueueState(taskType);
if (TaskState.STOPPED.equals(taskQueueState) || TaskState.STOPPING.equals(taskQueueState)) {
LOGGER.warn("Task queue is in state: {}. Tasks won't be created for taskType: {} and tables: {}. Resume task "
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org