Skip to content
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

Fix logging message template in AlluxioMasterProcess #617

Closed
dbw9580 opened this issue Dec 14, 2021 · 2 comments · Fixed by Alluxio/alluxio#14683
Closed

Fix logging message template in AlluxioMasterProcess #617

dbw9580 opened this issue Dec 14, 2021 · 2 comments · Fixed by Alluxio/alluxio#14683

Comments

@dbw9580
Copy link

dbw9580 commented Dec 14, 2021

The logging message template in AlluxioMasterProcess should use {} as a placeholder, instead of %s.

Change this line of code:

https://github.com/Alluxio/alluxio/blob/e0bd13efcf98c79ef7d7848a22a48fe0408c1680/core/server/master/src/main/java/alluxio/master/AlluxioMasterProcess.java#L194

    LOG.info("Starting all masters as: %s.", (isLeader) ? "leader" : "follower");

to

    LOG.info("Starting all masters as: {}.", (isLeader) ? "leader" : "follower");
@xwzbupt
Copy link

xwzbupt commented Dec 14, 2021

/assign @xwzbupt

alluxio-bot pushed a commit to Alluxio/alluxio that referenced this issue Dec 16, 2021
### What changes are proposed in this pull request?

Modify the placeholder from "%s" to "{}" in the LOG statement.

### Why are the changes needed?

Please clarify why the changes are needed. For instance,
1. The performance of `{}` is better than `%s`,considering `%s` will
cause memory overhead and generate temporary objects.

### Does this PR introduce any user facing changes?

No.

Fixes Alluxio/Community#617

pr-link: #14683
change-id: cid-7ef21fd8246ae2c0b952aabb82f043050356fb6c
@dbw9580
Copy link
Author

dbw9580 commented Dec 16, 2021

Fixed by Alluxio/alluxio#14683

@dbw9580 dbw9580 closed this as completed Dec 16, 2021
yyongycy pushed a commit to yyongycy/alluxio that referenced this issue Jan 6, 2022
### What changes are proposed in this pull request?

Modify the placeholder from "%s" to "{}" in the LOG statement.

### Why are the changes needed?

Please clarify why the changes are needed. For instance,
1. The performance of `{}` is better than `%s`,considering `%s` will
cause memory overhead and generate temporary objects.

### Does this PR introduce any user facing changes?

No.

Fixes Alluxio/Community#617

pr-link: Alluxio#14683
change-id: cid-7ef21fd8246ae2c0b952aabb82f043050356fb6c
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 a pull request may close this issue.

2 participants