hadoop-common-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Colin Patrick McCabe (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (HADOOP-9164) Add version number and/or library file name to native library for easy tracking
Date Wed, 02 Jan 2013 19:14:14 GMT

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

Colin Patrick McCabe commented on HADOOP-9164:
----------------------------------------------

{code}
  if ((void *)dlsym_snappy_compress != NULL) {
    ret = dladdr(
        (void *)dlsym_snappy_compress,
        &dl_info);
  }
  return (*env)->NewStringUTF(env, ret==0?HADOOP_SNAPPY_LIBRARY:dl_info.dli_fname);
{code}

I think this could be simplified a bit by returning a new string based on {{HADOOP_SNAPPY_LIBRARY}}
inside the if statement.  Also, there isn't any need to cast pointers to {{void*}}, or explicitly
write {{!= NULL}}.  You can simply write this:

{code}
  if (dlsym_snappy_compress) {
    ...
  }
{code}
                
> Add version number and/or library file name to native library for easy tracking
> -------------------------------------------------------------------------------
>
>                 Key: HADOOP-9164
>                 URL: https://issues.apache.org/jira/browse/HADOOP-9164
>             Project: Hadoop Common
>          Issue Type: Improvement
>          Components: native
>    Affects Versions: 2.0.2-alpha
>            Reporter: Binglin Chang
>            Assignee: Binglin Chang
>            Priority: Minor
>         Attachments: HADOOP-9164.v1.patch, HADOOP-9164.v2.patch, HADOOP-9164.v3.patch
>
>


--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Mime
View raw message