Skip to content
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

Open
wants to merge 1 commit into
base: 0.8.3-mmx
Choose a base branch
from

Conversation

nishantmonu51
Copy link

No description provided.

@@ -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) {
Copy link

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?

Copy link

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 :)

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.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

changing to Exception.

@@ -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());

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.

Copy link
Author

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
return taskAction.perform(task, toolbox);
RetType rv = taskAction.perform(task, toolbox);
log.debug(
"Completed action for task[%s]: %s. Took [%d]ms",
Copy link

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

@xvrl
Copy link

xvrl commented Mar 9, 2016

@nishantmonu51 I think we can submit this directly to upstream and merge into our 0.9 branch

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants