This is an automated email from the ASF dual-hosted git repository.
xiangfu 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 8452c25a09 fix jersey TerminalWriterInterceptor MessageBodyWriter not
found issue (#10462)
8452c25a09 is described below
commit 8452c25a096dca0e38ed5336c145cd96faf00722
Author: Haitao Zhang <[email protected]>
AuthorDate: Thu Mar 23 07:07:14 2023 -0700
fix jersey TerminalWriterInterceptor MessageBodyWriter not found issue
(#10462)
---
.../api/resources/PinotTaskRestletResource.java | 35 ++++++++++++++++++++++
1 file changed, 35 insertions(+)
diff --git
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java
index 33ee29b07f..ae1a079c9c 100644
---
a/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java
+++
b/pinot-controller/src/main/java/org/apache/pinot/controller/api/resources/PinotTaskRestletResource.java
@@ -157,6 +157,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/tasktypes")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("List all task types")
public Set<String> listTaskTypes() {
return _pinotHelixTaskResourceManager.getTaskTypes();
@@ -165,6 +166,7 @@ public class PinotTaskRestletResource {
@Deprecated
@GET
@Path("/tasks/taskqueues")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("List all task queues (deprecated)")
public Set<String> getTaskQueues() {
return _pinotHelixTaskResourceManager.getTaskQueues();
@@ -172,6 +174,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/{taskType}/state")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the state (task queue state) for the given task type")
public TaskState getTaskQueueState(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType) {
@@ -181,6 +184,7 @@ public class PinotTaskRestletResource {
@Deprecated
@GET
@Path("/tasks/taskqueuestate/{taskType}")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the state (task queue state) for the given task type
(deprecated)")
public StringResultResponse getTaskQueueStateDeprecated(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType) {
@@ -189,6 +193,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/{taskType}/tasks")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("List all tasks for the given task type")
public Set<String> getTasks(@ApiParam(value = "Task type", required = true)
@PathParam("taskType") String taskType) {
return _pinotHelixTaskResourceManager.getTasks(taskType);
@@ -196,6 +201,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/{taskType}/{tableNameWithType}/state")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("List all tasks for the given task type")
public Map<String, TaskState> getTaskStatesByTable(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType,
@@ -206,6 +212,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/{taskType}/{tableNameWithType}/metadata")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get task metadata for the given task type and table")
public String getTaskMetadataByTable(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType,
@@ -222,6 +229,7 @@ public class PinotTaskRestletResource {
@DELETE
@Path("/tasks/{taskType}/{tableNameWithType}/metadata")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Delete task metadata for the given task type and table")
public SuccessResponse deleteTaskMetadataByTable(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType,
@@ -234,6 +242,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/{taskType}/taskcounts")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Fetch count of sub-tasks for each of the tasks for the given
task type")
public Map<String, PinotHelixTaskResourceManager.TaskCount> getTaskCounts(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType) {
@@ -242,6 +251,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/{taskType}/debug")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Fetch information for all the tasks for the given task type")
public Map<String, PinotHelixTaskResourceManager.TaskDebugInfo>
getTasksDebugInfo(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType,
@@ -254,6 +264,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/{taskType}/{tableNameWithType}/debug")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Fetch information for all the tasks for the given task type
and table")
public Map<String, PinotHelixTaskResourceManager.TaskDebugInfo>
getTasksDebugInfo(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType,
@@ -322,6 +333,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/task/{taskName}/debug")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Fetch information for the given task name")
public PinotHelixTaskResourceManager.TaskDebugInfo getTaskDebugInfo(
@ApiParam(value = "Task name", required = true) @PathParam("taskName")
String taskName,
@@ -335,6 +347,7 @@ public class PinotTaskRestletResource {
@Deprecated
@GET
@Path("/tasks/tasks/{taskType}")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("List all tasks for the given task type (deprecated)")
public Set<String> getTasksDeprecated(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType) {
@@ -343,6 +356,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/{taskType}/taskstates")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get a map from task to task state for the given task type")
public Map<String, TaskState> getTaskStates(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType) {
@@ -352,6 +366,7 @@ public class PinotTaskRestletResource {
@Deprecated
@GET
@Path("/tasks/taskstates/{taskType}")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get a map from task to task state for the given task type
(deprecated)")
public Map<String, TaskState> getTaskStatesDeprecated(
@ApiParam(value = "Task type", required = true) @PathParam("taskType")
String taskType) {
@@ -360,6 +375,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/task/{taskName}/state")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the task state for the given task")
public TaskState getTaskState(
@ApiParam(value = "Task name", required = true) @PathParam("taskName")
String taskName) {
@@ -369,6 +385,7 @@ public class PinotTaskRestletResource {
@Deprecated
@GET
@Path("/tasks/taskstate/{taskName}")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the task state for the given task (deprecated)")
public StringResultResponse getTaskStateDeprecated(
@ApiParam(value = "Task name", required = true) @PathParam("taskName")
String taskName) {
@@ -377,6 +394,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/subtask/{taskName}/state")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the states of all the sub tasks for the given task")
public Map<String, TaskPartitionState> getSubtaskStates(
@ApiParam(value = "Task name", required = true) @PathParam("taskName")
String taskName) {
@@ -385,6 +403,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/task/{taskName}/config")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the task config (a list of child task configs) for the
given task")
public List<PinotTaskConfig> getTaskConfigs(
@ApiParam(value = "Task name", required = true) @PathParam("taskName")
String taskName) {
@@ -393,6 +412,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/task/{taskName}/runtime/config")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the task runtime config for the given task")
public Map<String, String> getTaskConfig(
@ApiParam(value = "Task name", required = true) @PathParam("taskName")
String taskName) {
@@ -402,6 +422,7 @@ public class PinotTaskRestletResource {
@Deprecated
@GET
@Path("/tasks/taskconfig/{taskName}")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the task config (a list of child task configs) for the
given task (deprecated)")
public List<PinotTaskConfig> getTaskConfigsDeprecated(
@ApiParam(value = "Task name", required = true) @PathParam("taskName")
String taskName) {
@@ -410,6 +431,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/subtask/{taskName}/config")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Get the configs of specified sub tasks for the given task")
public Map<String, PinotTaskConfig> getSubtaskConfigs(
@ApiParam(value = "Task name", required = true) @PathParam("taskName")
String taskName,
@@ -498,6 +520,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/scheduler/information")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Fetch cron scheduler information")
public Map<String, Object> getCronSchedulerInformation()
throws SchedulerException {
@@ -535,6 +558,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/scheduler/jobKeys")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Fetch cron scheduler job keys")
public List<JobKey> getCronSchedulerJobKeys()
throws SchedulerException {
@@ -551,6 +575,7 @@ public class PinotTaskRestletResource {
@GET
@Path("/tasks/scheduler/jobDetails")
+ @Produces(MediaType.APPLICATION_JSON)
@ApiOperation("Fetch cron scheduler job keys")
public Map<String, Object> getCronSchedulerJobDetails(
@ApiParam(value = "Table name (with type suffix)")
@QueryParam("tableName") String tableName,
@@ -607,6 +632,7 @@ public class PinotTaskRestletResource {
@POST
@Path("/tasks/schedule")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.UPDATE)
@ApiOperation("Schedule tasks and return a map from task type to task name
scheduled")
public Map<String, String> scheduleTasks(@ApiParam(value = "Task type")
@QueryParam("taskType") String taskType,
@@ -655,6 +681,7 @@ public class PinotTaskRestletResource {
@Deprecated
@PUT
@Path("/tasks/scheduletasks")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.UPDATE)
@ApiOperation("Schedule tasks (deprecated)")
public Map<String, String> scheduleTasksDeprecated() {
@@ -663,6 +690,7 @@ public class PinotTaskRestletResource {
@PUT
@Path("/tasks/{taskType}/cleanup")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.UPDATE)
@ApiOperation("Clean up finished tasks (COMPLETED, FAILED) for the given
task type")
public SuccessResponse cleanUpTasks(
@@ -674,6 +702,7 @@ public class PinotTaskRestletResource {
@Deprecated
@PUT
@Path("/tasks/cleanuptasks/{taskType}")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.UPDATE)
@ApiOperation("Clean up finished tasks (COMPLETED, FAILED) for the given
task type (deprecated)")
public SuccessResponse cleanUpTasksDeprecated(
@@ -684,6 +713,7 @@ public class PinotTaskRestletResource {
@PUT
@Path("/tasks/{taskType}/stop")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.UPDATE)
@ApiOperation("Stop all running/pending tasks (as well as the task queue)
for the given task type")
public SuccessResponse stopTasks(
@@ -694,6 +724,7 @@ public class PinotTaskRestletResource {
@PUT
@Path("/tasks/{taskType}/resume")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.UPDATE)
@ApiOperation("Resume all stopped tasks (as well as the task queue) for the
given task type")
public SuccessResponse resumeTasks(
@@ -705,6 +736,7 @@ public class PinotTaskRestletResource {
@Deprecated
@PUT
@Path("/tasks/taskqueue/{taskType}")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.UPDATE)
@ApiOperation("Stop/resume a task queue (deprecated)")
public SuccessResponse toggleTaskQueueState(
@@ -724,6 +756,7 @@ public class PinotTaskRestletResource {
@DELETE
@Path("/tasks/{taskType}")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.DELETE)
@ApiOperation("Delete all tasks (as well as the task queue) for the given
task type")
public SuccessResponse deleteTasks(
@@ -736,6 +769,7 @@ public class PinotTaskRestletResource {
@DELETE
@Path("/tasks/task/{taskName}")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.DELETE)
@ApiOperation("Delete a single task given its task name")
public SuccessResponse deleteTask(
@@ -749,6 +783,7 @@ public class PinotTaskRestletResource {
@Deprecated
@DELETE
@Path("/tasks/taskqueue/{taskType}")
+ @Produces(MediaType.APPLICATION_JSON)
@Authenticate(AccessType.DELETE)
@ApiOperation("Delete a task queue (deprecated)")
public SuccessResponse deleteTaskQueue(
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]