You are viewing a plain text version of this content. The canonical link for it is here.
Posted to hdfs-issues@hadoop.apache.org by "Muhammad Samir Khan (JIRA)" <ji...@apache.org> on 2019/07/16 14:56:00 UTC
[jira] [Commented] (HDFS-12491) Support wildcard in CLASSPATH for
libhdfs
[ https://issues.apache.org/jira/browse/HDFS-12491?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16886185#comment-16886185 ]
Muhammad Samir Khan commented on HDFS-12491:
--------------------------------------------
Tested using following steps:
1) Compile libhdfs with debugging on (in the patch) by uncommenting the line:
{code:java}
// #define LIBHDFS_JNI_HELPER_DEBUGGING_ON{code}
and compile:
{code:java}
mvn install -Pdist,native -Dtar -DskipTests -Dmaven.javadoc.skip -pl \
hadoop-hdfs-project/hadoop-hdfs-native-client{code}
2) Copy compiled library to $HADOOP_HDFS_HOME
{code:java}
cp hadoop-hdfs-project/hadoop-hdfs-native-client/target/hadoop-hdfs-native-client-3.3.0-SNAPSHOT/lib/native/libhdfs.so* \
$HADOOP_HDFS_HOME/lib/native/{code}
3) Get and compile sample libhdfs program, eg one given in [http://hadoop.apache.org/docs/r3.1.0/hadoop-project-dist/hadoop-hdfs/LibHdfs.html] Say the file is put in above_sample.c, then compile as follows:
{code:java}
gcc above_sample.c \
-I$HADOOP_HDFS_HOME/include \
-L$HADOOP_HDFS_HOME/lib/native \
-lhdfs \
-o above_sample{code}
4) Copy the script testWildCard.sh to the same location as above_sample and then run the tests:
{code:java}
./testWildCard.sh{code}
> Support wildcard in CLASSPATH for libhdfs
> -----------------------------------------
>
> Key: HDFS-12491
> URL: https://issues.apache.org/jira/browse/HDFS-12491
> Project: Hadoop HDFS
> Issue Type: Improvement
> Components: libhdfs
> Affects Versions: 2.8.0
> Reporter: John Zhuge
> Assignee: Muhammad Samir Khan
> Priority: Major
> Attachments: HDFS-12491.001.patch, testWildCard.sh
>
>
> According to libhdfs doc, wildcard in CLASSPATH is not support:
> bq. The most common problem is the CLASSPATH is not set properly when calling a program that uses libhdfs. Make sure you set it to all the Hadoop jars needed to run Hadoop itself as well as the right configuration directory containing hdfs-site.xml. It is not valid to use wildcard syntax for specifying multiple jars. It may be useful to run hadoop classpath --glob or hadoop classpath --jar <path> to generate the correct classpath for your deployment.
--
This message was sent by Atlassian JIRA
(v7.6.14#76016)
---------------------------------------------------------------------
To unsubscribe, e-mail: hdfs-issues-unsubscribe@hadoop.apache.org
For additional commands, e-mail: hdfs-issues-help@hadoop.apache.org