kfaraz commented on code in PR #14938:
URL: https://github.com/apache/druid/pull/14938#discussion_r1314622946
##########
indexing-service/src/main/java/org/apache/druid/indexing/common/task/NoopTask.java:
##########
@@ -180,33 +155,18 @@ public int getPriority()
public static NoopTask create()
{
- return new NoopTask(null, null, null, 0, 0, null, null, null);
+ return forDatasource(null);
}
- public static NoopTask withGroupId(String groupId)
+ public static NoopTask forDatasource(String datasource)
{
- return new NoopTask(null, groupId, null, 0, 0, null, null, null);
- }
-
- @VisibleForTesting
- public static NoopTask create(String dataSource)
- {
- return new NoopTask(null, null, dataSource, 0, 0, null, null, null);
- }
-
- @VisibleForTesting
- public static NoopTask create(int priority)
- {
- final Map<String, Object> context = new HashMap<>();
- context.put(Tasks.PRIORITY_KEY, priority);
- return new NoopTask(null, null, null, 0, 0, null, null, context);
+ return new NoopTask(null, null, datasource, 0, 0, null, null);
}
- @VisibleForTesting
- public static NoopTask create(String id, int priority)
+ public static NoopTask withPriority(int priority)
Review Comment:
We could rename it to `ofPriority`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]