Hadoop C++ HDFS test running Exception Hadoop C++ HDFS test running Exception hadoop hadoop

Hadoop C++ HDFS test running Exception


Try this:

hadoop classpath --glob

Then add the result to the CLASSPATH variable in ~/.bashrc


I've faced problems with using wildcards in classpath when using JNI based programs. Try the direct-jar-in-classpath approach, such as the one generated in this sample code of mine at https://github.com/QwertyManiac/cdh4-libhdfs-example/blob/master/exec.sh#L3, and I believe it should instead work. The whole contained example at https://github.com/QwertyManiac/cdh4-libhdfs-example does work presently.

See also https://stackoverflow.com/a/9322747/1660002


JNI won't take wildcard CLASSPATH. So, simply adding the results of hadoop classpath --glob won't work. The right way is:

export CLASSPATH=${HADOOP_HOME}/etc/hadoop:`find ${HADOOP_HOME}/share/hadoop/ | awk '{path=path":"$0}END{print path}'`export LD_LIBRARY_PATH="${HADOOP_HOME}/lib/native":$LD_LIBRARY_PATH