org.apache.hadoop.mapred.nativetask

## Class NativeRuntime

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

-     @InterfaceAudience.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 and Description
    `NativeRuntime()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and 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 Detail

    - #### NativeRuntime

          public NativeRuntime()

  - ### Method Detail

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

Copyright © 2008–2022 Apache Software Foundation. All rights reserved.