There are two ways to include native libraries in YARN jobs:  By specifying -Djava.library.path on the command line, but in this case, there is a possibility that the native libraries will not be loaded correctly, and errors may occur.   The better option to include native libraries is to set the LD _LIBRARY_ PATH in the .bashrc file. YARN is not a substitute for Hadoop, but a more powerful and efficient technology that supports MapReduce and is also referred to as Hadoop 2.0 or MapReduce 2.