AmatyaAvadhanula commented on code in PR #12404:
URL: https://github.com/apache/druid/pull/12404#discussion_r897969409
##########
core/src/main/java/org/apache/druid/metadata/MetadataStorageActionHandler.java:
##########
@@ -99,6 +103,54 @@ List<TaskInfo<EntryType, StatusType>> getTaskInfos(
@Nullable String datasource
);
+ /**
+ * This is the recommended method to fetch Tasks for the task view
+ * This utilizes the new type and group_id columns and should be utilized
after migration
+ * Returns a list of TaskInfo for the tasks corresponding to the given
filters
+ * The TaskInfo comprises the TaskMetadata which is significantly smaller
than a Task, and the TaskStatus
+ * These are sufficient to create the TaskStatusPlus for a given Task, and
prevent unnecessary memory usage
+ *
+ * If {@code taskLookups} includes {@link TaskLookupType#ACTIVE}, it returns
all active tasks in the metadata store.
+ * If {@code taskLookups} includes {@link TaskLookupType#COMPLETE}, it
returns all complete tasks in the metadata
+ * store. For complete tasks, additional filters in {@code
CompleteTaskLookup} can be applied.
+ * All lookups should be processed atomically if more than one lookup is
given.
+ *
+ * fetchPayload determines the query used to fetch from the tasks table
+ * If true, fetch the payload and deserialize it to obtain the above fields
+ * Else, use the newly created type and group_id columns in the query for
task summaries
Review Comment:
done
##########
core/src/main/java/org/apache/druid/metadata/MetadataStorageActionHandler.java:
##########
@@ -99,6 +103,54 @@ List<TaskInfo<EntryType, StatusType>> getTaskInfos(
@Nullable String datasource
);
+ /**
+ * This is the recommended method to fetch Tasks for the task view
+ * This utilizes the new type and group_id columns and should be utilized
after migration
+ * Returns a list of TaskInfo for the tasks corresponding to the given
filters
+ * The TaskInfo comprises the TaskMetadata which is significantly smaller
than a Task, and the TaskStatus
+ * These are sufficient to create the TaskStatusPlus for a given Task, and
prevent unnecessary memory usage
+ *
+ * If {@code taskLookups} includes {@link TaskLookupType#ACTIVE}, it returns
all active tasks in the metadata store.
+ * If {@code taskLookups} includes {@link TaskLookupType#COMPLETE}, it
returns all complete tasks in the metadata
+ * store. For complete tasks, additional filters in {@code
CompleteTaskLookup} can be applied.
+ * All lookups should be processed atomically if more than one lookup is
given.
+ *
+ * fetchPayload determines the query used to fetch from the tasks table
+ * If true, fetch the payload and deserialize it to obtain the above fields
+ * Else, use the newly created type and group_id columns in the query for
task summaries
+ *
+ * @param taskLookups task lookup type and filters.
+ * @param datasource datasource filter
+ */
+ List<TaskInfo<TaskMetadata, StatusType>> getTaskMetadataInfos(
Review Comment:
used getTaskStatusList
--
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]