We use System.loadLibrary("snappy") from the Java side. However in libhadoop, we use dlopen to open libsnappy.so dynamically. System.loadLibrary uses java.library.path to resolve libraries, and dlopen uses LD_LIBRARY_PATH and the system paths to resolve libraries. Because of this, the two library loading functions can be at odds.
We should fix this so we only load the library once, preferably using the standard Java java.library.path.
We should also log the search path(s) we use for libsnappy.so when loading fails, so that it's easier to diagnose configuration issues.