diff --git a/indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClient.java b/indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClient.java index 6798fa332d0f..f7760495a255 100644 --- a/indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClient.java +++ b/indexing-service/src/main/java/io/druid/indexing/common/actions/LocalTaskActionClient.java @@ -43,7 +43,7 @@ public LocalTaskActionClient(Task task, TaskStorage storage, TaskActionToolbox t public RetType submit(TaskAction taskAction) throws IOException { log.info("Performing action for task[%s]: %s", task.getId(), taskAction); - + long startTime = System.currentTimeMillis(); if (taskAction.isAudited()) { // Add audit log try { @@ -59,6 +59,13 @@ public RetType submit(TaskAction taskAction) throws IOExcepti } } - return taskAction.perform(task, toolbox); + RetType rv = taskAction.perform(task, toolbox); + log.debug( + "Completed action for task[%s]: %s. Took [%d]ms", + task.getId(), + taskAction, + System.currentTimeMillis() - startTime + ); + return rv; } } diff --git a/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordResource.java b/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordResource.java index c4307c533acc..3c2d14155322 100644 --- a/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordResource.java +++ b/indexing-service/src/main/java/io/druid/indexing/overlord/http/OverlordResource.java @@ -238,6 +238,8 @@ public Response getWorkerConfigHistory( @Produces(MediaType.APPLICATION_JSON) public Response doAction(final TaskActionHolder holder) { + log.debug("Received action for task[%s]: %s", holder.getTask(), holder.getAction()); + return asLeaderWith( taskMaster.getTaskActionClient(holder.getTask()), new Function() @@ -256,8 +258,8 @@ public Response apply(TaskActionClient taskActionClient) retMap = Maps.newHashMap(); retMap.put("result", ret); } - catch (IOException e) { - log.warn(e, "Failed to perform task action"); + catch (Exception e) { + log.warn(e, "Failed to perform action for task[%s]: %s", holder.getTask(), holder.getAction()); return Response.serverError().build(); }