org.apache.hadoop.yarn.api.records
Interface LocalResource


@InterfaceAudience.Public
@InterfaceStability.Stable
public interface LocalResource

LocalResource represents a local resource required to run a container.

The NodeManager is responsible for localizing the resource prior to launching the container.

Applications can specify LocalResourceType and LocalResourceVisibility.

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

Method Summary
 String getPattern()
          Get the pattern that should be used to extract entries from the archive (only used when type is PATTERN).
 URL getResource()
          Get the location of the resource to be localized.
 long getSize()
          Get the size of the resource to be localized.
 long getTimestamp()
          Get the original timestamp of the resource to be localized, used for verification.
 LocalResourceType getType()
          Get the LocalResourceType of the resource to be localized.
 LocalResourceVisibility getVisibility()
          Get the LocalResourceVisibility of the resource to be localized.
 void setPattern(String pattern)
          Set the pattern that should be used to extract entries from the archive (only used when type is PATTERN).
 void setResource(URL resource)
          Set location of the resource to be localized.
 void setSize(long size)
          Set the size of the resource to be localized.
 void setTimestamp(long timestamp)
          Set the timestamp of the resource to be localized, used for verification.
 void setType(LocalResourceType type)
          Set the LocalResourceType of the resource to be localized.
 void setVisibility(LocalResourceVisibility visibility)
          Set the LocalResourceVisibility of the resource to be localized.
 

Method Detail

getResource

URL getResource()
Get the location of the resource to be localized.

Returns:
location of the resource to be localized

setResource

void setResource(URL resource)
Set location of the resource to be localized.

Parameters:
resource - location of the resource to be localized

getSize

long getSize()
Get the size of the resource to be localized.

Returns:
size of the resource to be localized

setSize

void setSize(long size)
Set the size of the resource to be localized.

Parameters:
size - size of the resource to be localized

getTimestamp

long getTimestamp()
Get the original timestamp of the resource to be localized, used for verification.

Returns:
timestamp of the resource to be localized

setTimestamp

void setTimestamp(long timestamp)
Set the timestamp of the resource to be localized, used for verification.

Parameters:
timestamp - timestamp of the resource to be localized

getType

LocalResourceType getType()
Get the LocalResourceType of the resource to be localized.

Returns:
LocalResourceType of the resource to be localized

setType

void setType(LocalResourceType type)
Set the LocalResourceType of the resource to be localized.

Parameters:
type - LocalResourceType of the resource to be localized

getVisibility

LocalResourceVisibility getVisibility()
Get the LocalResourceVisibility of the resource to be localized.

Returns:
LocalResourceVisibility of the resource to be localized

setVisibility

void setVisibility(LocalResourceVisibility visibility)
Set the LocalResourceVisibility of the resource to be localized.

Parameters:
visibility - LocalResourceVisibility of the resource to be localized

getPattern

String getPattern()
Get the pattern that should be used to extract entries from the archive (only used when type is PATTERN).

Returns:
pattern that should be used to extract entries from the archive.

setPattern

void setPattern(String pattern)
Set the pattern that should be used to extract entries from the archive (only used when type is PATTERN).

Parameters:
pattern - pattern that should be used to extract entries from the archive.


Copyright © 2013 Apache Software Foundation. All Rights Reserved.