LocalResourceType (Apache Hadoop Main 3.5.0 API)
Description: declaration: package: org.apache.hadoop.yarn.api.records, enum: LocalResourceType

Package org.apache.hadoop.yarn.api.records

# Enum Class LocalResourceType

java.lang.Object
java.lang.Enum<LocalResourceType>
org.apache.hadoop.yarn.api.records.LocalResourceType

All Implemented Interfaces:
  `Serializable`, `Comparable<LocalResourceType>`, `Constable`

@Public @Stable public enum LocalResourceType extends Enum<LocalResourceType>
`LocalResourceType` specifies the type of a resource localized by the `NodeManager`.

The type can be one of:

- `FILE` - Regular file i.e. uninterpreted bytes.
- `ARCHIVE` - Archive, which is automatically unarchived by the `NodeManager`.
- `PATTERN` - A hybrid between `ARCHIVE` and `FILE`.

See Also:
  - `LocalResource`
  - `ContainerLaunchContext`
  - `ApplicationSubmissionContext`
  - `ContainerManagementProtocol.startContainers(org.apache.hadoop.yarn.api.protocolrecords.StartContainersRequest)`

- ## Nested Class Summary

  ## Nested classes/interfaces inherited from class java.lang.Enum

  `Enum.EnumDesc<E extends Enum<E>>`

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `ARCHIVE`
  Archive, which is automatically unarchived by the `NodeManager`.
  `FILE`
  Regular file i.e. uninterpreted bytes.
  `PATTERN`
  A hybrid between archive and file.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static LocalResourceType`
  `valueOf(String name)`
  Returns the enum constant of this class with the specified name.
  `static LocalResourceType[]`
  `values()`
  Returns an array containing the constants of this enum class, in the order they are declared.

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

  `clone, compareTo, describeConstable, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

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

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### ARCHIVE

    public static final LocalResourceType ARCHIVE
    Archive, which is automatically unarchived by the `NodeManager`.

  - ### FILE

    public static final LocalResourceType FILE
    Regular file i.e. uninterpreted bytes.

  - ### PATTERN

    public static final LocalResourceType PATTERN
    A hybrid between archive and file. Only part of the file is unarchived, and the original file is left in place, but in the same directory as the unarchived part. The part that is unarchived is determined by pattern in #`LocalResource`. Currently only jars support pattern, all others will be treated like a #`ARCHIVE`.

- ## Method Details

  - ### values

    public static LocalResourceType[] values()
    Returns an array containing the constants of this enum class, in the order they are declared.
    Returns:
      an array containing the constants of this enum class, in the order they are declared

  - ### valueOf

    public static LocalResourceType valueOf(String name)
    Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum class has no constant with the specified name
      `NullPointerException` - if the argument is null