NativeRuntime (Apache Hadoop MapReduce NativeTask 3.5.0 API)
Description: declaration: package: org.apache.hadoop.mapred.nativetask, class: NativeRuntime

Package org.apache.hadoop.mapred.nativetask

# 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 Summary

  Constructors
  Constructor
  Description
  `NativeRuntime()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static void`
  `configure(org.apache.hadoop.conf.Configuration jobConf)`
  `static long`
  `createNativeObject(String clazz)`
  create native object We use it to create native handlers
  `static boolean`
  `isNativeLibraryLoaded()`
  `static long`
  `registerLibrary(String libraryName, String clazz)`
  Register a customized library
  `static void`
  `releaseNativeObject(long addr)`
  destroy native object We use to destroy native handlers
  `static void`
  `reportStatus(org.apache.hadoop.mapred.Task.TaskReporter reporter)`
  Get the status report from native space
  `static boolean`
  `supportsCompressionCodec(byte[] codec)`
  Check whether the native side has compression codec support built in

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## 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