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

Log topic and table name when a row fails to be inserted into BQ #192

Merged
merged 3 commits into from
Oct 7, 2019

Conversation

bingqinzhou
Copy link
Contributor

No description provided.

Copy link
Contributor

@wrp wrp left a comment

Choose a reason for hiding this comment

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

Nice!!

List<InsertAllRequest.RowToInsert> failRows = new ArrayList<>();
for (int index = 0; index < rows.size(); index++) {
if (failRowsSet.contains((long)index)) {
logger.debug("[row with index {}]: failed", index);
logger.debug("Row with index {} from topic {} failed to be written to table {}.", index, topic, table.getFullTableName());
Copy link
Contributor

Choose a reason for hiding this comment

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

I feel like this is a good time to maybe move this log message outside of the for loop so we don't get a big stack of errors, but instead one error message that contains all the indexes that failed.

Copy link
Contributor Author

@bingqinzhou bingqinzhou Oct 4, 2019

Choose a reason for hiding this comment

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

I feel like this is a good time to maybe move this log message outside of the for loop so we don't get a big stack of errors, but instead one error message that contains all the indexes that failed.

@mtagle Understood, updated accordingly.

@mtagle mtagle merged commit ec13580 into master Oct 7, 2019
@bingqinzhou bingqinzhou deleted the log_table_and_topic_for_failed_rows branch December 3, 2019 18:08
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.

None yet

4 participants