-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-47579][CORE][PART4] Migrate logInfo with variables to structured logging framework #46724
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
Conversation
|
@gengliangwang Please help review this. I will merge this after #46739 |
|
@gengliangwang Hi please help review |
| Utils.deleteRecursively(sessionBasedRoot) | ||
| } | ||
| logInfo(s"Session evicted: ${state.sessionUUID}") | ||
| logInfo(log"Session evicted: ${LogMDC(UUID, state.sessionUUID)}") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SESSION_ID
| s"Starting executor with user classpath (userClassPathFirst = $userClassPathFirst): " + | ||
| urls.mkString("'", ",", "'") | ||
| log"Starting executor with user classpath" + | ||
| log" (userClassPathFirst = ${LogMDC(CLASS_PATH, userClassPathFirst)}): " + |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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)}.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
SESSION_ID
| .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.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DURATION, or we can just merge DURATION and TOTAL_TIME
|
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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used.
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not used.
|
@zeotuan please fix the test failures and remove all the unused keys(I didn't go over all the new keys). |
common/utils/src/main/scala/org/apache/spark/internal/LogKey.scala
Outdated
Show resolved
Hide resolved
|
Merging to master |
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.