NativeCodeLoader:62 - Unable to load native-hadoop library for your platform... using builtin-java c

The following prompt appears Spark runtime
NativeCodeLoader: 62 - Unable to load native
-hadoop library for your platform ... using builtin-java classes where applicable this is a WRAN tips, of course, must not affect the operation of the program, but in the end still looked uncomfortable.
in fact, the meaning of this exception information to say it can not find Hadoop native library, which is a bottom of a library written in C ++, the program will not find it efficient to use a relatively low point to the java libraries by default.
in I have seen a lot of articles on the Internet. They all say that the compiled package on the hadoop official website is compiled on a 32-bit machine, and your own machine is 64-bit, so you have to download the source project file and compile it yourself.
But I I found that this is not the problem, just add the following configuration in $SPARK_HOME/conf/spark-env.sh:

export LD_LIBRARY_PATH=${
    
    LD_LIBRARY_PATH}:$HADOOP_HOME/lib/native

After saving, restart Spark.
When the program is executed again, there will be no abnormal information.

Guess you like

Origin blog.csdn.net/qq_42359956/article/details/105641354