belugabehr commented on a change in pull request #912: HBASE-23380: General Cleanup of FSUtil URL: https://github.com/apache/hbase/pull/912#discussion_r355617474
########## File path: hbase-server/src/main/java/org/apache/hadoop/hbase/util/FSUtils.java ########## @@ -227,12 +232,8 @@ public static FSDataOutputStream create(Configuration conf, FileSystem fs, Path throw new IOException(ite.getCause()); } catch (NoSuchMethodException e) { LOG.debug("DFS Client does not support most favored nodes create; using default create"); - if (LOG.isTraceEnabled()) LOG.trace("Ignoring; use default create", e); - } catch (IllegalArgumentException e) { - LOG.debug("Ignoring (most likely Reflection related exception) " + e); - } catch (SecurityException e) { - LOG.debug("Ignoring (most likely Reflection related exception) " + e); - } catch (IllegalAccessException e) { + LOG.trace("Ignoring; use default create", e); Review comment: For such a trivial case, there is not need to check for trace being enabled. The trace method itself will check internally if trace is enabled. Checking for trace logging here would only be required if there was some sort of complicated computation that would simply be thrown away every time. Passing a static string and a reference to an Exception does not require any computation. ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services