You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@accumulo.apache.org by GitBox <gi...@apache.org> on 2022/01/18 17:23:44 UTC

[GitHub] [accumulo] trietopsoft commented on a change in pull request #2417: Use Hadoop compression codec override (#2416)

trietopsoft commented on a change in pull request #2417:
URL: https://github.com/apache/accumulo/pull/2417#discussion_r786990059



##########
File path: core/src/main/java/org/apache/accumulo/core/file/rfile/bcfile/Compression.java
##########
@@ -761,16 +761,20 @@ CompressionCodec initCodec(final AtomicBoolean checked, final int bufferSize,
      */
     CompressionCodec createNewCodec(final String codecClazzProp, final String defaultClazz,
         final int bufferSize, final String bufferSizeConfigOpt) {
-      String extClazz =
-          (conf.get(codecClazzProp) == null ? System.getProperty(codecClazzProp) : null);
+      String extClazz = conf.get(codecClazzProp);
+      if (extClazz == null) {
+        extClazz = System.getProperty(codecClazzProp);
+      }
       String clazz = (extClazz != null) ? extClazz : defaultClazz;
       try {
         log.info("Trying to load codec class {} for {}", clazz, codecClazzProp);
         Configuration config = new Configuration(conf);
         updateBuffer(config, bufferSizeConfigOpt, bufferSize);
         return (CompressionCodec) ReflectionUtils.newInstance(Class.forName(clazz), config);
       } catch (ClassNotFoundException e) {
-        // This is okay.
+        // This is not okay.
+        log.warn("Unable to load codec class {} for {}, reason: {}", clazz, codecClazzProp,
+            e.getMessage());

Review comment:
       This was discussed here: https://github.com/apache/accumulo/pull/2417#issuecomment-1013312101 The exception stacktrace is not required since having the message is sufficient.




-- 
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: notifications-unsubscribe@accumulo.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org