Skip to content

Conversation

@gengliangwang
Copy link
Member

What changes were proposed in this pull request?

Since we are targeting on migration INFO/WARN/ERROR level logs to structure logging, this PR removes the logDebug and logTrace methods from the JAVA structured logging framework.

Why are the changes needed?

In the log migration PR #46390, there are unnecessary changes such as updating

logger.debug("Task {} need to spill {} for {}", taskAttemptId,
            Utils.bytesToString(required - got), requestingConsumer);

to

LOGGER.debug("Task {} need to spill {} for {}", String.valueOf(taskAttemptId),
            Utils.bytesToString(required - got), requestingConsumer.toString());

With this PR, we can avoid such changes during log migrations.

Does this PR introduce any user-facing change?

No

How was this patch tested?

Existing UT.

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

No

@gengliangwang
Copy link
Member Author

cc @panbingkun as well.

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

Is this consistent with SPIP, @gengliangwang ?

@dongjoon-hyun
Copy link
Member

#46390 is not merged yet, isn't it?

In the log migration PR #46390, there are unnecessary changes such as updating

@gengliangwang
Copy link
Member Author

Is this consistent with SPIP, @gengliangwang ?

Yes, the SPIP only suggests the logInfo/logWarn/logError APIs. LogDebug/LogTrace is optional. Since #46390 is not migrating the debug/trace level logs, I suggest merging this one to reduce unnecessary changes in it.

@gengliangwang
Copy link
Member Author

In Scala side, the logDebug/logTrace APIs was introduced for debugging cache purposes: #45990

Copy link
Member

@dongjoon-hyun dongjoon-hyun left a comment

Choose a reason for hiding this comment

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

+1, LGTM. Thank you!

@dongjoon-hyun
Copy link
Member

cc @cloud-fan as a release manager for Apache Spark 4.0.0-preview

@dongjoon-hyun
Copy link
Member

Merged to master for Apache Spark 4.0.0-preview.

@dongjoon-hyun
Copy link
Member

Thank you, @gengliangwang .

@panbingkun
Copy link
Contributor

cc @panbingkun as well.

Got it.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants