@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
.
Modifier and Type | Method and Description |
---|---|
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. |
URL getResource()
void setResource(URL resource)
resource
- location of the resource to be localizedlong getSize()
void setSize(long size)
size
- size of the resource to be localizedlong getTimestamp()
void setTimestamp(long timestamp)
timestamp
- timestamp of the resource to be localizedLocalResourceType getType()
LocalResourceType
of the resource to be localized.LocalResourceType
of the resource to be localizedvoid setType(LocalResourceType type)
LocalResourceType
of the resource to be localized.type
- LocalResourceType
of the resource to be localizedLocalResourceVisibility getVisibility()
LocalResourceVisibility
of the resource to be
localized.LocalResourceVisibility
of the resource to be
localizedvoid setVisibility(LocalResourceVisibility visibility)
LocalResourceVisibility
of the resource to be
localized.visibility
- LocalResourceVisibility
of the resource to be
localizedString getPattern()
PATTERN
).void setPattern(String pattern)
PATTERN
).pattern
- pattern that should be used to extract entries
from the archive.Copyright © 2014 Apache Software Foundation. All Rights Reserved.