[Hotfix][Zeta][Log] Fix zeta parallelStream log trace for job#8456
Merged
Conversation
hailin0
commented
Jan 5, 2025
| return new MDCStream<>(context, delegate.filter(new MDCPredicate<>(context, predicate))); | ||
| return new MDCStream<>( | ||
| context, | ||
| delegate.filter(new MDCPredicate<>(() -> MDCContext.of(context), predicate))); |
Member
Author
There was a problem hiding this comment.
Because element iteration caused repeated execution, it was changed to lazy initialization.
hailin0
commented
Jan 5, 2025
| Assertions.assertNull(MDC.get(MDCContext.TASK_ID)); | ||
|
|
||
| tracedStream = MDCTracer.tracing(mdcContext, Arrays.asList(1, 2, 3).stream()); | ||
| try (MDCContext ignored = MDCContext.of(1, 2, 3).activate()) { |
hailin0
commented
Jan 5, 2025
| private final Long jobId; | ||
| private final Long pipelineId; | ||
| private final Long taskId; | ||
| private transient volatile MDCContext toRestore; |
Hisoka-X
previously approved these changes
Jan 6, 2025
Hisoka-X
approved these changes
Jan 7, 2025
liunaijie
approved these changes
Jan 7, 2025
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.
Purpose of this pull request
[Zeta][Log] Fix zeta parallelStream log trace for job
Fix #8206
Does this PR introduce any user-facing change?
No
How was this patch tested?
Added
https://github.com/apache/seatunnel/pull/8456/files#diff-40f618a095529aee401bc1ec6f27e378dac5a93d606136cc40d819afae47ec6eR212
Check list
New License Guide
release-note.