[SPARK-47579][CORE][PART4] Migrate logInfo with variables to structured logging framework#46724
Closed
zeotuan wants to merge 14 commits into
Closed
[SPARK-47579][CORE][PART4] Migrate logInfo with variables to structured logging framework#46724zeotuan wants to merge 14 commits into
zeotuan wants to merge 14 commits into
Conversation
Contributor
Author
|
@gengliangwang Please help review this. I will merge this after #46739 |
Member
Contributor
Author
|
@gengliangwang Hi please help review |
| Utils.deleteRecursively(sessionBasedRoot) | ||
| } | ||
| logInfo(s"Session evicted: ${state.sessionUUID}") | ||
| logInfo(log"Session evicted: ${LogMDC(UUID, state.sessionUUID)}") |
| s"Starting executor with user classpath (userClassPathFirst = $userClassPathFirst): " + | ||
| urls.mkString("'", ",", "'") | ||
| log"Starting executor with user classpath" + | ||
| log" (userClassPathFirst = ${LogMDC(CLASS_PATH, userClassPathFirst)}): " + |
Member
There was a problem hiding this comment.
userClassPathFirst is a boolean
| } | ||
| logInfo(s"Created or updated repl class loader $classLoader for $sessionUUID.") | ||
| logInfo(log"Created or updated repl class loader ${LogMDC(CLASS_LOADER, classLoader)}" + | ||
| log" for ${LogMDC(UUID, sessionUUID)}.") |
| .timeTakenMs { committer.commitJob(jobContext, ret.toImmutableArraySeq) } | ||
| logInfo(s"Write Job ${jobContext.getJobID} committed. Elapsed time: $duration ms.") | ||
| logInfo(log"Write Job ${MDC(JOB_ID, jobContext.getJobID)} committed." + | ||
| log" Elapsed time: ${MDC(TOTAL_TIME, duration)} ms.") |
Member
There was a problem hiding this comment.
DURATION, or we can just merge DURATION and TOTAL_TIME
Member
|
LGTM except for a few minor comments. Thanks for the work! |
| case object WORKER extends LogKey | ||
| case object WORKER_HOST extends LogKey | ||
| case object WORKER_ID extends LogKey | ||
| case object WORKER_MEMORY extends LogKey |
| case object TOPIC_PARTITION_OFFSET_RANGE extends LogKey | ||
| case object TOTAL extends LogKey | ||
| case object TOTAL_EFFECTIVE_TIME extends LogKey | ||
| case object TOTAL_RECORDS_READ extends LogKey |
Member
|
@zeotuan please fix the test failures and remove all the unused keys(I didn't go over all the new keys). |
gengliangwang
approved these changes
May 29, 2024
Member
|
Merging to master |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The PR aims to migrate
logInfoin Core module 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?
Was this patch authored or co-authored using generative AI tooling?
No.