-
Notifications
You must be signed in to change notification settings - Fork 32
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more debug logs for task action #24
base: 0.8.3-mmx
Are you sure you want to change the base?
Conversation
@@ -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 (Throwable e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why catch and suppress Throwable
rather than Exception
or IOException
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nm, didn't realize this was metamx/druid. do what you want :)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But really, this will catch things like OOME, which is probably not want to be caught.
Suggest checking for Exception, and throwing if is a fatal type.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
changing to Exception.
e1e080b
to
c8691f3
Compare
@@ -238,6 +238,8 @@ public Response getWorkerConfigHistory( | |||
@Produces(MediaType.APPLICATION_JSON) | |||
public <T> Response doAction(final TaskActionHolder<T> holder) | |||
{ | |||
log.info("Received action for task[%s]: %s", holder.getTask(), holder.getAction()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should probably be debug level.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done.
review comment review comments
c8691f3
to
6195e79
Compare
return taskAction.perform(task, toolbox); | ||
RetType rv = taskAction.perform(task, toolbox); | ||
log.debug( | ||
"Completed action for task[%s]: %s. Took [%d]ms", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Completed action for task[%s]: %s in [%d]ms
might be easier to read
@nishantmonu51 I think we can submit this directly to upstream and merge into our 0.9 branch |
No description provided.