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

[SPARK-47587][SQL] Hive module: Migrate logWarn with variables to structured logging framework #45927

Closed
wants to merge 3 commits into from

Conversation

panbingkun
Copy link
Contributor

@panbingkun panbingkun commented Apr 8, 2024

What changes were proposed in this pull request?

The pr aims to migrate logWarning in module Hive with variables to structured logging framework.

Why are the changes needed?

To enhance Apache Spark's logging system by implementing structured logging.

Does this PR introduce any user-facing change?

No.

How was this patch tested?

  • Pass GA.

Was this patch authored or co-authored using generative AI tooling?

No.

@panbingkun panbingkun changed the title [SPARK-47587][SQL] Hive module: Migrate logWarn with variables to structured logging framework [WIP][SPARK-47587][SQL] Hive module: Migrate logWarn with variables to structured logging framework Apr 8, 2024
"HiveClient got thrift exception, destroying client and retrying " +
s"(${retryLimit - numTries} tries remaining)", e)
log"HiveClient got thrift exception, destroying client and retrying " +
log"${MDC(RETRY_COUNT, numTries)} times", e)
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Although there is a slight difference in the meaning expressed in these two places, one is how many times are left and the other is how many times have been retried. In order to be consistent with other parts of Spark, adjustments have been made here

catalogProxy.invalidateCachedTable(tableIdentifier)
None
}
}

private def logWarningUnexpectedFileFormat(
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Extract a common method

@panbingkun panbingkun changed the title [WIP][SPARK-47587][SQL] Hive module: Migrate logWarn with variables to structured logging framework [SPARK-47587][SQL] Hive module: Migrate logWarn with variables to structured logging framework Apr 11, 2024
@panbingkun panbingkun marked this pull request as ready for review April 11, 2024 02:07
@panbingkun
Copy link
Contributor Author

cc @gengliangwang

@gengliangwang
Copy link
Member

Thanks, merging to master

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