[ https://issues.apache.org/jira/browse/HADOOP-9162?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Binglin Chang updated HADOOP-9162: ---------------------------------- Attachment: HADOOP-9162.v2.patch new version addressing my previous comments. As a single main class util, it's hard to add unit test. But I have done some simple manual test, here is the result. {code} decster:~/projects/hadoop-trunk/hadoop-dist/target/hadoop-3.0.0-SNAPSHOT> bin/hadoop Usage: hadoop [--config confdir] COMMAND where COMMAND is one of: fs run a generic filesystem user client version print the version jar <jar> run a jar file checknative [-a|-h] check native hadoop and compression libraries availability distcp <srcurl> <desturl> copy file or directories recursively archive -archiveName NAME -p <parent path> <src>* <dest> create a hadoop archive classpath prints the class path needed to get the Hadoop jar and the required libraries daemonlog get/set the log level for each daemon or CLASSNAME run the class named CLASSNAME Most commands print help when invoked w/o parameters. decster:~/projects/hadoop-trunk/hadoop-dist/target/hadoop-3.0.0-SNAPSHOT> bin/hadoop checknative -h NativeLibraryChecker [-a|-h] decster:~/projects/hadoop-trunk/hadoop-dist/target/hadoop-3.0.0-SNAPSHOT> bin/hadoop checknative 12/12/21 15:07:33 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Native library checking: hadoop: false zlib: false snappy: false lz4: false decster:~/projects/hadoop-trunk/hadoop-dist/target/hadoop-3.0.0-SNAPSHOT> echo $? 1 decster:~/projects/hadoop-trunk/hadoop-dist/target/hadoop-3.0.0-SNAPSHOT> bin/hadoop checknative -a 12/12/21 15:07:58 WARN util.NativeCodeLoader: Unable to load native-hadoop library for your platform... using builtin-java classes where applicable Native library checking: hadoop: false zlib: false snappy: false lz4: false decster:~/projects/hadoop-trunk/hadoop-dist/target/hadoop-3.0.0-SNAPSHOT> echo $? 1 {code} > Add utility to check native library availability > ------------------------------------------------ > > Key: HADOOP-9162 > URL: https://issues.apache.org/jira/browse/HADOOP-9162 > Project: Hadoop Common > Issue Type: Improvement > Components: native > Affects Versions: 3.0.0, 2.0.3-alpha > Reporter: Binglin Chang > Assignee: Binglin Chang > Priority: Minor > Attachments: HADOOP-9162.patch, HADOOP-9162.v2.patch > > > Many times, after deploy hadoop or when trouble shooting, we need to check > whether native library(along with native compression libraries) can work > properly, and I just want to use one command to check that, like this: > hadoop org.apache.hadoop.util.NativeCodeLoader > and it shows: > Native library loading test: > hadoop: false > zlib: false > snappy: false > lz4: false -- 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