arunpandianp commented on code in PR #38814:
URL: https://github.com/apache/beam/pull/38814#discussion_r3431471905
##########
runners/google-cloud-dataflow-java/worker/src/main/java/org/apache/beam/runners/dataflow/worker/windmill/work/processing/StreamingWorkScheduler.java:
##########
@@ -187,21 +184,22 @@ private static Windmill.WorkItemCommitRequest
buildWorkItemTruncationRequest(
/** Sets the stage name and workId of the Thread executing the {@link Work}
for logging. */
private static void setUpWorkLoggingContext(String workLatencyTrackingId,
String computationId) {
- DataflowWorkerLoggingMDC.setWorkId(workLatencyTrackingId);
+ setLoggingContextWorkId(workLatencyTrackingId);
+ setLoggingContextComputation(computationId);
+ }
+
+ private static void setLoggingContextComputation(@Nullable String
computationId) {
DataflowWorkerLoggingMDC.setStageName(computationId);
}
- private static String getShuffleTaskStepName(MapTask mapTask) {
- // The MapTask instruction is ordered by dependencies, such that the first
element is
- // always going to be the shuffle task.
- return mapTask.getInstructions().get(0).getName();
+ private static void setLoggingContextWorkId(@Nullable String
workLatencyTrackingId) {
+ DataflowWorkerLoggingMDC.setWorkId(workLatencyTrackingId);
}
/** Resets logging context of the Thread executing the {@link Work} for
logging. */
- private void resetWorkLoggingContext(String workLatencyTrackingId) {
- sampler.resetForWorkId(workLatencyTrackingId);
- DataflowWorkerLoggingMDC.setWorkId(null);
- DataflowWorkerLoggingMDC.setStageName(null);
+ private void resetWorkLoggingContext() {
Review Comment:
done.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]