Skip to content

refactor(hadoop-common): use SLF4J parameterized logging instead of string concatenation#19160

Merged
voonhous merged 1 commit into
apache:masterfrom
voonhous:cleanup-slf4j-log-templating-hadoop-common
Jul 4, 2026
Merged

refactor(hadoop-common): use SLF4J parameterized logging instead of string concatenation#19160
voonhous merged 1 commit into
apache:masterfrom
voonhous:cleanup-slf4j-log-templating-hadoop-common

Conversation

@voonhous

@voonhous voonhous commented Jul 3, 2026

Copy link
Copy Markdown
Member

Describe the issue this Pull Request addresses

A number of log/LOG calls in hudi-hadoop-common build their message with + string concatenation. This eagerly builds the string even when the level is disabled and reads worse than a parameterized statement. This PR converts them to SLF4J {} templating. Part of the ongoing logging cleanup (follows #19155, #19156, #19157, #19158, #19159).

Summary and Changelog

  • Converted string-concatenation log/LOG calls to {} placeholders across hudi-hadoop-common (main + tests). Mechanical and behavior-preserving.
  • HoodieParquetFileBinaryCopier: the trailing e stays the throwable arg, so its stacktrace is logged as before.

Impact

none - purely mechanical, behavior-preserving logging change.

Risk Level

none

Documentation Update

none

Note: a couple of files still use plain LoggerFactory.getLogger LOG fields. Migrating those to the Lombok @Slf4j annotation will be done in a separate round of cleanup sweeps; this PR only covers the concatenation-to-templating conversion.

Contributor's checklist

  • Read through contributor's guide
  • Enough context is provided in the sections above
  • Adequate tests were added if applicable

…tring concatenation

Convert log/LOG string concatenation to {} placeholders across
hudi-hadoop-common (main + tests). Mechanical and behavior-preserving;
the trailing throwable in HoodieParquetFileBinaryCopier stays the last
arg so its stacktrace is logged as before.
@voonhous voonhous changed the title refactor(hadoop-common): use SLF4J parameterized logging instead of s… refactor(hadoop-common): use SLF4J parameterized logging instead of string concatenation Jul 3, 2026

@hudi-agent hudi-agent left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

⚠️ 🤖 This review was generated by an AI agent and may contain mistakes. Please verify any suggestions before applying.

No issues flagged.

cc @yihua

@hudi-bot

hudi-bot commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

CI report:

Bot commands @hudi-bot supports the following commands:
  • @hudi-bot run azure re-run the last Azure build

@github-actions github-actions Bot added the size:S PR with lines of changes in (10, 100] label Jul 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:S PR with lines of changes in (10, 100]

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants