Monday 5 October 2015

Hadoop - 2.7.1 - Native References

package org.apache.hadoop.io.nativeio;

NativeIO
SharedFileDescriptorFactory

  /**
   * Return true if the JNI-based native IO extensions are available.
   */
  public static boolean isAvailable() {
    return NativeCodeLoader.isNativeCodeLoaded() && nativeLoaded;
  }

// import org.apache.hadoop.util.NativeCodeLoader;

  static {
    // Try to load native hadoop library and set fallback flag appropriately
    if(LOG.isDebugEnabled()) {
      LOG.debug("Trying to load the custom-built native-hadoop library...");
    }
    try {
      System.loadLibrary("hadoop");
      LOG.debug("Loaded the native-hadoop library");
      nativeCodeLoaded = true;
    } catch (Throwable t) {
      // Ignore failure to load
      if(LOG.isDebugEnabled()) {
        LOG.debug("Failed to load native-hadoop with error: " + t);
        LOG.debug("java.library.path=" +
            System.getProperty("java.library.path"));
      }
    }
    
    if (!nativeCodeLoaded) {
      LOG.warn("Unable to load native-hadoop library for your platform... " +
               "using builtin-java classes where applicable");
    }
  }



hadoop-2.7.1-src/hadoop-hdfs-project/hadoop-hdfs/src/main/java/overview.html

From [http://wiki.apache.org/hadoop/HowToContribute]:
"A Java Development Kit. The Hadoop developers recommend Oracle Java 7. You may also use OpenJDK."

Access to the sources:
http://wiki.apache.org/hadoop/GitAndHadoop

No comments: