org.apache.hadoop.yarn.api.records
Enum LocalResourceType

java.lang.Object
  extended by java.lang.Enum<LocalResourceType>
      extended by org.apache.hadoop.yarn.api.records.LocalResourceType
All Implemented Interfaces:
Serializable, Comparable<LocalResourceType>

@InterfaceAudience.Public
@InterfaceStability.Stable
public enum LocalResourceType
extends Enum<LocalResourceType>

LocalResourceType specifies the type of a resource localized by the NodeManager.

The type can be one of:

See Also:
LocalResource, ContainerLaunchContext, ApplicationSubmissionContext, ContainerManager.startContainer(org.apache.hadoop.yarn.api.protocolrecords.StartContainerRequest)

Enum Constant Summary
ARCHIVE
          Archive, which is automatically unarchived by the NodeManager.
FILE
          Regular file i.e.
PATTERN
          A hybrid between archive and file.
 
Method Summary
static LocalResourceType valueOf(String name)
          Returns the enum constant of this type with the specified name.
static LocalResourceType[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

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 Detail

values

public static LocalResourceType[] values()
Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
for (LocalResourceType c : LocalResourceType.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static LocalResourceType valueOf(String name)
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (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 type has no constant with the specified name
NullPointerException - if the argument is null


Copyright © 2013 Apache Software Foundation. All Rights Reserved.