ndimiduk commented on a change in pull request #1335: HBASE-24000 Simplify
CommonFSUtils after upgrading to hadoop 2.10.0
URL: https://github.com/apache/hbase/pull/1335#discussion_r397525621
##########
File path:
hbase-common/src/main/java/org/apache/hadoop/hbase/util/CommonFSUtils.java
##########
@@ -525,10 +518,7 @@ private static void invokeSetStoragePolicy(final
FileSystem fs, final Path path,
try {
fs.setStoragePolicy(path, storagePolicy);
-
- if (LOG.isDebugEnabled()) {
- LOG.debug("Set storagePolicy={} for path={}", storagePolicy, path);
- }
+ LOG.debug("Set storagePolicy={} for path={}", storagePolicy, path);
Review comment:
nit: `path` is not an instance of `String`, so auto-type-conversion means
this will call `path.toString()` even when debug is not enabled. That method
looks entirely too complicated, with lots of branching, but I guess nothing too
hateful. Just and FYI.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services