mirror of https://github.com/apache/druid.git
Merge pull request #2755 from gianm/scary-warning
Overlord: Avoid a scary Jersey warning.
This commit is contained in:
commit
0081bb87f0
|
@ -25,10 +25,10 @@ import io.druid.indexing.common.task.Task;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*/
|
*/
|
||||||
public class TaskActionHolder<T>
|
public class TaskActionHolder
|
||||||
{
|
{
|
||||||
private final Task task;
|
private final Task task;
|
||||||
private final TaskAction<T> action;
|
private final TaskAction action;
|
||||||
|
|
||||||
@JsonCreator
|
@JsonCreator
|
||||||
public TaskActionHolder(
|
public TaskActionHolder(
|
||||||
|
@ -47,7 +47,7 @@ public class TaskActionHolder<T>
|
||||||
}
|
}
|
||||||
|
|
||||||
@JsonProperty
|
@JsonProperty
|
||||||
public TaskAction<T> getAction()
|
public TaskAction getAction()
|
||||||
{
|
{
|
||||||
return action;
|
return action;
|
||||||
}
|
}
|
||||||
|
|
|
@ -39,7 +39,6 @@ import io.druid.indexing.common.TaskStatus;
|
||||||
import io.druid.indexing.common.actions.TaskActionClient;
|
import io.druid.indexing.common.actions.TaskActionClient;
|
||||||
import io.druid.indexing.common.actions.TaskActionHolder;
|
import io.druid.indexing.common.actions.TaskActionHolder;
|
||||||
import io.druid.indexing.common.task.Task;
|
import io.druid.indexing.common.task.Task;
|
||||||
import io.druid.indexing.overlord.RemoteTaskRunner;
|
|
||||||
import io.druid.indexing.overlord.TaskMaster;
|
import io.druid.indexing.overlord.TaskMaster;
|
||||||
import io.druid.indexing.overlord.TaskQueue;
|
import io.druid.indexing.overlord.TaskQueue;
|
||||||
import io.druid.indexing.overlord.TaskRunner;
|
import io.druid.indexing.overlord.TaskRunner;
|
||||||
|
@ -259,7 +258,7 @@ public class OverlordResource
|
||||||
@POST
|
@POST
|
||||||
@Path("/action")
|
@Path("/action")
|
||||||
@Produces(MediaType.APPLICATION_JSON)
|
@Produces(MediaType.APPLICATION_JSON)
|
||||||
public <T> Response doAction(final TaskActionHolder<T> holder)
|
public Response doAction(final TaskActionHolder holder)
|
||||||
{
|
{
|
||||||
return asLeaderWith(
|
return asLeaderWith(
|
||||||
taskMaster.getTaskActionClient(holder.getTask()),
|
taskMaster.getTaskActionClient(holder.getTask()),
|
||||||
|
@ -275,7 +274,7 @@ public class OverlordResource
|
||||||
// or token that gets passed around.
|
// or token that gets passed around.
|
||||||
|
|
||||||
try {
|
try {
|
||||||
final T ret = taskActionClient.submit(holder.getAction());
|
final Object ret = taskActionClient.submit(holder.getAction());
|
||||||
retMap = Maps.newHashMap();
|
retMap = Maps.newHashMap();
|
||||||
retMap.put("result", ret);
|
retMap.put("result", ret);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue