[ https://issues.apache.org/jira/browse/PARQUET-369?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14906915#comment-14906915 ]
Ryan Blue commented on PARQUET-369: ----------------------------------- I've fixed this by using an exclusion to not shade the org.slf4j.impl.* classes. There aren't any impl classes in the jar so there are no leaked org.slf4j classes, but this prevents references to log bindings from being modified. Not shading slf4j would be a problem because parquet-format would have a dependency on it. I also tried minimizing the jar to see if it went away entirely, but slf4j was still required because classes in thrift still reference it. I think this is a good fix. > Shading SLF4J prevents SLF4J locating org.slf4j.impl.StaticLoggerBinder > ----------------------------------------------------------------------- > > Key: PARQUET-369 > URL: https://issues.apache.org/jira/browse/PARQUET-369 > Project: Parquet > Issue Type: Bug > Components: parquet-format > Reporter: Cheng Lian > > Parquet-format shades SLF4J to {{parquet.org.slf4j}} (see > [here|https://github.com/apache/parquet-format/blob/apache-parquet-format-2.3.0/pom.xml#L162]). > This also accidentally shades [this > line|https://github.com/qos-ch/slf4j/blob/v_1.7.2/slf4j-api/src/main/java/org/slf4j/LoggerFactory.java#L207] > {code} > private static String STATIC_LOGGER_BINDER_PATH = > "org/slf4j/impl/StaticLoggerBinder.class"; > {code} > to > {code} > private static String STATIC_LOGGER_BINDER_PATH = > "parquet/org/slf4j/impl/StaticLoggerBinder.class"; > {code} > and thus {{LoggerFactory}} can never find the correct {{StaticLoggerBinder}} > implementation even if we provide dependencies like {{slf4j-log4j12}} on the > classpath. > This happens in Spark. Whenever we write a Parquet file, we see the following > famous message and can never get rid of it: > {noformat} > SLF4J: Failed to load class "org.slf4j.impl.StaticLoggerBinder". > SLF4J: Defaulting to no-operation (NOP) logger implementation > SLF4J: See http://www.slf4j.org/codes.html#StaticLoggerBinder for further > details. > {noformat} -- This message was sent by Atlassian JIRA (v6.3.4#6332)