Class NativeRuntime
java.lang.Object
org.apache.hadoop.mapred.nativetask.NativeRuntime
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 -
Method Summary
Modifier and TypeMethodDescriptionstatic voidconfigure(org.apache.hadoop.conf.Configuration jobConf) static longcreateNativeObject(String clazz) create native object We use it to create native handlersstatic booleanstatic longregisterLibrary(String libraryName, String clazz) Register a customized librarystatic voidreleaseNativeObject(long addr) destroy native object We use to destroy native handlersstatic voidreportStatus(org.apache.hadoop.mapred.Task.TaskReporter reporter) Get the status report from native spacestatic booleansupportsCompressionCodec(byte[] codec) Check whether the native side has compression codec support built in
-
Constructor Details
-
NativeRuntime
public NativeRuntime()
-
-
Method Details
-
isNativeLibraryLoaded
public static boolean isNativeLibraryLoaded() -
configure
public static void configure(org.apache.hadoop.conf.Configuration jobConf) -
createNativeObject
create native object We use it to create native handlers -
registerLibrary
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
-