jojochuang commented on a change in pull request #2372:
URL: https://github.com/apache/ozone/pull/2372#discussion_r659531240
##########
File path:
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/update/server/MockCRLStore.java
##########
@@ -107,7 +107,7 @@ public BigInteger issueCert() throws Exception {
scmCertStore.getCrls(ImmutableList.of(crlId.get()));
if (crlInfos.isEmpty()) {
- log.debug("CRL[0]: {}", crlInfos.get(0).toString());
+ log.debug("CRL[0]: {}", crlInfos.get(0));
Review comment:
this statement doesn't make sense.
if crlInfos is empty, crlInfos.get(0) would throw IndexOutOfBoundsException
##########
File path:
hadoop-ozone/ozone-manager/src/main/java/org/apache/hadoop/ozone/om/TrashPolicyOzone.java
##########
@@ -266,7 +266,8 @@ private void createCheckpoint(Path trashRoot, Date date)
throws IOException {
while (true) {
try {
fs.rename(current, checkpoint);
- LOG.debug("Created trash checkpoint: " + checkpoint.toUri().getPath());
+ LOG.debug("Created trash checkpoint: {}",
+ checkpoint.toUri().getPath());
Review comment:
this one is tricky, because URI.getPath() is not a O(1) operation. It
constructs a String on the fly.
We need to wrap this debug message with if (LOG.isDebugEnabled()) {
##########
File path:
hadoop-hdds/server-scm/src/test/java/org/apache/hadoop/hdds/scm/update/server/MockCRLStore.java
##########
@@ -107,7 +107,7 @@ public BigInteger issueCert() throws Exception {
scmCertStore.getCrls(ImmutableList.of(crlId.get()));
if (crlInfos.isEmpty()) {
- log.debug("CRL[0]: {}", crlInfos.get(0).toString());
+ log.debug("CRL[0]: {}", crlInfos.get(0));
Review comment:
@xiaoyuyao any idea what this was meant for?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]