## org.apache.hadoop.util
Class NativeCodeLoader

    java.lang.Object
      org.apache.hadoop.util.NativeCodeLoader

    public class NativeCodeLoader

extends Object

A helper to load the native hadoop code i.e. libhadoop.so. This handles the fallback to either the bundled libhadoop-Linux-i386-32.so or the default java implementations where appropriate.

Constructor Summary
`NativeCodeLoader()`

Method Summary
`boolean` `getLoadNativeLibraries(Configuration conf)` Return if native hadoop libraries, if present, can be used for this job.
`static boolean` `isNativeCodeLoaded()` Check if native-hadoop code is loaded for this platform.
`void` `setLoadNativeLibraries(Configuration conf, boolean loadNativeLibraries)` Set if native hadoop libraries, if present, can be used for this job.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### NativeCodeLoader

    public NativeCodeLoader()

Method Detail

### isNativeCodeLoaded

    public static boolean isNativeCodeLoaded()

  Check if native-hadoop code is loaded for this platform.

  Returns:
    `true` if native-hadoop is loaded, else `false`

### getLoadNativeLibraries

    public boolean getLoadNativeLibraries(Configuration conf)

  Return if native hadoop libraries, if present, can be used for this job.

  Parameters:
    `conf` - configuration
  Returns:
    `true` if native hadoop libraries, if present, can be used for this job; `false` otherwise.

### setLoadNativeLibraries

    public void setLoadNativeLibraries(Configuration conf,
                                       boolean loadNativeLibraries)

  Set if native hadoop libraries, if present, can be used for this job.

  Parameters:
    `conf` - configuration
    `loadNativeLibraries` - can native hadoop libraries be loaded

Copyright © 2009 The Apache Software Foundation