title: loading native libraries in hadoop reducer?
body: <p>I have a native library I need to load for my reduce method and I added it to the distributed cache but when I call System.loadLibrary(mylib.so) in my map method I get an error  and failed map task:</p>
  
  <pre><code>Error: no mylib.so in java.library.path
  </code></pre>
  
  <p>Even though I added it to the distributed cache.  Am I missing a step?  In my job configuration I call:</p>
  
  <pre><code>DistributedCache.addCacheFile(uri, job.getConfiguration());
  </code></pre>
  
  <p>Where the uri is the path to mylib.so on the hadoop file system.</p>
  
  <p>This native library depends on many others, all existing on my /hadoop/fs/mystuff/libs on the hadoop fs.  I add them all to the distributed cache and I even tried loading all of them in my reduce task using the System.loadLibrary() call.  But I keep getting that same java.library.path error.  I also tried adding the libraries as command line arguments to the -files flag but I still get the error above.</p>