Class NativeRuntime

java.lang.Object
org.apache.hadoop.mapred.nativetask.NativeRuntime

@Private public class NativeRuntime extends Object
This class stands for the native runtime It has three functions: 1. Create native handlers for map, reduce, outputcollector, etc 2. Configure native task with provided MR configs 3. Provide file system api to native space, so that it can use File system like HDFS.
  • Constructor Details

    • NativeRuntime

      public NativeRuntime()
  • Method Details

    • isNativeLibraryLoaded

      public static boolean isNativeLibraryLoaded()
    • configure

      public static void configure(org.apache.hadoop.conf.Configuration jobConf)
    • createNativeObject

      public static long createNativeObject(String clazz)
      create native object We use it to create native handlers
    • registerLibrary

      public static long registerLibrary(String libraryName, String clazz)
      Register a customized library
    • releaseNativeObject

      public static void releaseNativeObject(long addr)
      destroy native object We use to destroy native handlers
    • reportStatus

      public static void reportStatus(org.apache.hadoop.mapred.Task.TaskReporter reporter) throws IOException
      Get the status report from native space
      Throws:
      IOException
    • supportsCompressionCodec

      public static boolean supportsCompressionCodec(byte[] codec)
      Check whether the native side has compression codec support built in