MINOR: Various code cleanups in core and clients#5850
Merged
ijuma merged 2 commits intoapache:trunkfrom Oct 29, 2018
Merged
Conversation
- Removed unused imports - Use string interpolations instead of concatenations
ijuma
reviewed
Oct 28, 2018
Member
ijuma
left a comment
There was a problem hiding this comment.
Thanks for the PRs, just a few nits.
| zkUtils.createPersistentPath(zkPath, jsonPartitionData) | ||
| } else { | ||
| info("Topic update " + jsonPartitionData.toString) | ||
| info(s"Topic update ${jsonPartitionData.toString}") |
Member
There was a problem hiding this comment.
toString can be removed in both cases.
|
|
||
| updateToken(token) | ||
| info(s"Delegation token renewed for token : " + tokenInfo.tokenId + " for owner :" + tokenInfo.owner) | ||
| info(s"Delegation token renewed for token : ${tokenInfo.tokenId} for owner :${tokenInfo.owner}") |
Member
There was a problem hiding this comment.
Existing issue, but we can maybe fix it now, there should be a space after the : not before. A few more cases in this file.
| maxLag = -1L | ||
| for ((topicPartition, fetchResponsePerReplica) <- recordsCache) { | ||
| debug("Verifying " + topicPartition) | ||
| debug(s"Verifying ${topicPartition}") |
| props.load(resourceStream); | ||
| } catch (Exception e) { | ||
| log.warn("Error while loading kafka-version.properties :" + e.getMessage()); | ||
| log.warn("Error while loading kafka-version.properties :{}", e.getMessage()); |
Member
There was a problem hiding this comment.
Existing issue, space should be after the colon.
| log.info("Kafka version : " + AppInfoParser.getVersion()); | ||
| log.info("Kafka commitId : " + AppInfoParser.getCommitId()); | ||
| log.info("Kafka version : {}", AppInfoParser.getVersion()); | ||
| log.info("Kafka commitId : {}", AppInfoParser.getCommitId()); |
Member
There was a problem hiding this comment.
Existing issue: space after colon. No need for () in getVersion and getCommitId.
Member
Author
|
Thanks for the quick review. I've pushed an update |
pengxiaolong
pushed a commit
to pengxiaolong/kafka
that referenced
this pull request
Jun 14, 2019
…and clients (apache#5850) Also removed a few unused imports and tweaked the log message slightly. Reviewers: Ismael Juma <ismael@juma.me.uk>
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.
Committer Checklist (excluded from commit message)