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

feat: log groupby errors to processing logger #4575

Merged

Conversation

rodesai
Copy link
Contributor

@rodesai rodesai commented Feb 15, 2020

Description

Logs errors in groupby to the processing logger.

Testing done

Added unit tests for the group by mappers to ensure they log correctly.

@rodesai rodesai requested a review from a team as a code owner February 15, 2020 19:26
Copy link
Contributor

@big-andy-coates big-andy-coates left a comment

Choose a reason for hiding this comment

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

LGTM, thanks @rodesai

Comment on lines +102 to +110
logger.error(
EngineProcessingLogMessageFactory.recordProcessingError(
String.format(
"Group-by column with index %d resolved to null."
+ " The source row will be excluded from the table.",
index),
row
)
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we want to remove the LOG.error line below now that we have this? Seems unnecessary to log the error twice.

Other uses of the processing logger don't double log.

Comment on lines +116 to +123
logger.error(
EngineProcessingLogMessageFactory.recordProcessingError(
String.format(
"Error calculating group-by column with index %d. "
+ "The source row will be excluded from the table: %s",
index, e.getMessage()),
e,
row
)
);
Copy link
Contributor

Choose a reason for hiding this comment

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

Same again - remove the LOG.error below. - and you can remove the LOG field too.

@rodesai rodesai force-pushed the add-processing-logger-group-by-mapper branch from 05cd480 to df3b95e Compare February 19, 2020 07:05
@rodesai rodesai merged commit b503d25 into confluentinc:master Feb 20, 2020
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.

2 participants