org.apache.hadoop.mapred.nativetask

## Class HadoopPlatform

- java.lang.Object
- - org.apache.hadoop.mapred.nativetask.Platform
  - - org.apache.hadoop.mapred.nativetask.HadoopPlatform

-     @InterfaceAudience.Private
      public class HadoopPlatform
      extends Platform

- - ### Field Summary

    - ### Fields inherited from class org.apache.hadoop.mapred.nativetask.Platform

      `keyClassNames`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `HadoopPlatform()`

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `boolean` | `define(Class<?> comparatorClass)` whether it's the platform that has defined a custom Java comparator NativeTask doesn't support custom Java comparators (set with mapreduce.job.output.key.comparator.class) but a platform (e.g Pig) could also set that conf and implement native comparators so we shouldn't bail out.
    `void` | `init()` initialize a platform, where we should call registerKey
    `String` | `name()`
    `boolean` | `support(String keyClassName, INativeSerializer<?> serializer, org.apache.hadoop.mapred.JobConf job)` whether a platform supports a specific key should at least satisfy two conditions 1.

    - ### Methods inherited from class org.apache.hadoop.mapred.nativetask.Platform

      `registerKey`

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

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

- - ### Constructor Detail

    - #### HadoopPlatform

          public HadoopPlatform()
                         throws IOException

      Throws:
        `IOException`

  - ### Method Detail

    - #### init

          public void init()
                    throws IOException

      Description copied from class: `Platform`
      initialize a platform, where we should call registerKey
      Specified by:
        `init` in class `Platform`
      Throws:
        `IOException`

    - #### support

          public boolean support(String keyClassName,
                                 INativeSerializer<?> serializer,
                                 org.apache.hadoop.mapred.JobConf job)

      Description copied from class: `Platform`
      whether a platform supports a specific key should at least satisfy two conditions 1. the key belongs to the platform 2. the associated serializer must implement `INativeComparable` interface
      Specified by:
        `support` in class `Platform`
      Parameters:
        `keyClassName` - map out put key class name
        `serializer` - serializer associated with key via registerKey
        `job` - job configuration
      Returns:
        true if the platform has implemented native comparators of the key and false otherwise

    - #### define

          public boolean define(Class<?> comparatorClass)

      Description copied from class: `Platform`
      whether it's the platform that has defined a custom Java comparator NativeTask doesn't support custom Java comparators (set with mapreduce.job.output.key.comparator.class) but a platform (e.g Pig) could also set that conf and implement native comparators so we shouldn't bail out.
      Specified by:
        `define` in class `Platform`
      Parameters:
        `comparatorClass` - comparator set with mapreduce.job.output.key.comparator.class

    - #### name

          public String name()

      Specified by:
        `name` in class `Platform`
      Returns:
        name of a Platform, useful for logs and debug

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