You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@avro.apache.org by nk...@apache.org on 2019/07/01 13:01:40 UTC

[avro] branch branch-1.9 updated: AVRO-2450 log message about failure to load SnappyCodec (#565)

This is an automated email from the ASF dual-hosted git repository.

nkollar pushed a commit to branch branch-1.9
in repository https://gitbox.apache.org/repos/asf/avro.git


The following commit(s) were added to refs/heads/branch-1.9 by this push:
     new 137e77a  AVRO-2450 log message about failure to load SnappyCodec (#565)
137e77a is described below

commit 137e77abd86fbec0def6391cdbc34eb3a488f71a
Author: Sean Busbey <bu...@apache.org>
AuthorDate: Mon Jul 1 04:38:43 2019 -0500

    AVRO-2450 log message about failure to load SnappyCodec (#565)
    
    
    (cherry picked from commit c7a9b93246c6cccd4bfd210213141befc170990b)
---
 lang/java/avro/src/main/java/org/apache/avro/file/CodecFactory.java | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/lang/java/avro/src/main/java/org/apache/avro/file/CodecFactory.java b/lang/java/avro/src/main/java/org/apache/avro/file/CodecFactory.java
index 8af16f0..13833ca 100644
--- a/lang/java/avro/src/main/java/org/apache/avro/file/CodecFactory.java
+++ b/lang/java/avro/src/main/java/org/apache/avro/file/CodecFactory.java
@@ -22,6 +22,8 @@ import java.util.Map;
 import java.util.zip.Deflater;
 
 import org.apache.avro.AvroRuntimeException;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * Encapsulates the ability to specify and configure a compression codec.
@@ -38,6 +40,8 @@ import org.apache.avro.AvroRuntimeException;
  * {@link #addCodec(String, CodecFactory)}.
  */
 public abstract class CodecFactory {
+  private static final Logger LOG = LoggerFactory.getLogger(CodecFactory.class);
+
   /** Null codec, for no compression. */
   public static CodecFactory nullCodec() {
     return NullCodec.OPTION;
@@ -64,7 +68,7 @@ public abstract class CodecFactory {
     try {
       return new SnappyCodec.Option();
     } catch (Throwable t) {
-      // snappy not available
+      LOG.debug("Snappy was not available", t);
       return null;
     }
   }