[ 
https://issues.apache.org/jira/browse/HADOOP-14481?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16037076#comment-16037076
 ] 

Steve Loughran commented on HADOOP-14481:
-----------------------------------------

I'm not sure that warn is necessary, given that a lot of time it's OK to use 
the native lib, and printing more stack traces only creates more panic and 
confusion. That's especially true in client apps which don't have the native 
libs on their path (i.e. third party code)

I'd propose
# log stack at debug
# warn message to include a cwiki link to a (new) page explaning the issue and 
the consequence "things *may* be slower"

> Print stack trace when native bzip2 library does not load
> ---------------------------------------------------------
>
>                 Key: HADOOP-14481
>                 URL: https://issues.apache.org/jira/browse/HADOOP-14481
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: io
>            Reporter: Wei-Chiu Chuang
>            Assignee: Wei-Chiu Chuang
>            Priority: Minor
>         Attachments: HADOOP-14481.001.patch
>
>
> When I ran hadoop checknative on my machine, it was not able to load system 
> bzip2 library and printed the following message.
> 17/06/02 09:25:42 WARN bzip2.Bzip2Factory: Failed to load/initialize 
> native-bzip2 library system-native, will use pure-Java version
> Reviewing the relevant code, it fails because of an exception. However, that 
> exception is not logged. We should print the stacktrace, at least at debug 
> log level.
> {code:title=Bzip2Factory#isNativeBzip2Loaded()}
> try {
>           // Initialize the native library.
>           Bzip2Compressor.initSymbols(libname);
>           Bzip2Decompressor.initSymbols(libname);
>           nativeBzip2Loaded = true;
>           LOG.info("Successfully loaded & initialized native-bzip2 library " +
>                    libname);
>         } catch (Throwable t) {
>           LOG.warn("Failed to load/initialize native-bzip2 library " + 
>                    libname + ", will use pure-Java version");
>         }
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: common-issues-unsubscr...@hadoop.apache.org
For additional commands, e-mail: common-issues-h...@hadoop.apache.org

Reply via email to