[
https://issues.apache.org/jira/browse/HADOOP-12972?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15218788#comment-15218788
]
Colin Patrick McCabe commented on HADOOP-12972:
-----------------------------------------------
Hi [~jzhuge],
The output of the "lz4" command on Ubuntu isn't relevant. Hadoop uses its own
bundled version of the lz4 source code, stored in
{{./hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.c}}.
I don't even have the {{lz4}} command installed on my system, and I don't
know what the {{lz4cli.c}} source code file you are referencing is (it sounds
like something in a 3rd party package that Hadoop doesn't use.)
You can see the way that the version is calculated here in
{{./hadoop-common-project/hadoop-common/src/main/native/src/org/apache/hadoop/io/compress/lz4/lz4.h}}
{code}
#define LZ4_VERSION_MAJOR 1 /* for major interface/format changes */
#define LZ4_VERSION_MINOR 3 /* for minor interface/format changes */
#define LZ4_VERSION_RELEASE 1 /* for tweaks, bug-fixes, or development */
#define LZ4_VERSION_NUMBER (LZ4_VERSION_MAJOR *100*100 + LZ4_VERSION_MINOR *100
+ LZ4_VERSION_RELEASE)
{code}
So a version number of 10301 corresponds to major = 1, minor = 3, release = 1.
It seems fairly easy to read. If you want to improve this so that it prints
out things in dot-dot-dot format, that would be a useful patch. But it doesn't
seem strictly necessary.
> Lz4Compressor#getLibraryName returns the wrong version number
> -------------------------------------------------------------
>
> Key: HADOOP-12972
> URL: https://issues.apache.org/jira/browse/HADOOP-12972
> Project: Hadoop Common
> Issue Type: Bug
> Components: native
> Affects Versions: 2.6.0
> Reporter: John Zhuge
> Assignee: Colin Patrick McCabe
> Priority: Trivial
> Fix For: 2.8.0
>
> Attachments: HADOOP-12972.001.patch
>
>
> HADOOP-11184 updated lz4 to "r123", but {{hadoop checknative -a}} still
> prints "revision:99".
> {code}
> $ hadoop checknative -a
> 16/03/29 11:42:40 INFO bzip2.Bzip2Factory: Successfully loaded & initialized
> native-bzip2 library system-native
> 16/03/29 11:42:40 INFO zlib.ZlibFactory: Successfully loaded & initialized
> native-zlib library
> Native library checking:
> hadoop: true
> /opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.1209/lib/hadoop/lib/native/libhadoop.so.1.0.0
> zlib: true /lib64/libz.so.1
> snappy: true
> /opt/cloudera/parcels/CDH-5.8.0-1.cdh5.8.0.p0.1209/lib/hadoop/lib/native/libsnappy.so.1
> lz4: true revision:99
> bzip2: true /lib64/libbz2.so.1
> openssl: true /usr/lib64/libcrypto.so
> {code}
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)