- java.lang.Object
-
- com.actian.dataflow.cal.yarn.client.ApplicationResource
-
public class ApplicationResource extends Object
An application specific resource that is required at run-time on the target execution cluster. Resources are files that must already be present in HDFS on the target cluster. The path to the resource is provided along with metadata about the resource.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classApplicationResource.ResourceTypeThe resource type.static classApplicationResource.ResourceVisibilityVisibility of the resource.
-
Constructor Summary
Constructors Constructor Description ApplicationResource(String resourcePath)Construct an application resource using the given path to the resource in the shared repository.ApplicationResource(String resourcePath, ApplicationResource.ResourceType type, ApplicationResource.ResourceVisibility visibility, boolean addToClasspath, String... classpathEntries)Construct a new application resource.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object obj)List<String>getClasspathEntries()Get the list of relative classpath entries.StringgetResourcePath()Get the resource pathApplicationResource.ResourceTypegetType()Get the resource type.ApplicationResource.ResourceVisibilitygetVisibility()Get the resource visibility.inthashCode()booleanisAddToClasspath()Gets the indicator of whether or not the resource should be added to container classpath.StringtoString()
-
-
-
Constructor Detail
-
ApplicationResource
public ApplicationResource(String resourcePath, ApplicationResource.ResourceType type, ApplicationResource.ResourceVisibility visibility, boolean addToClasspath, String... classpathEntries)
Construct a new application resource.- Parameters:
resourcePath- path to the resource in a shared repository (i.e. HDFS)type- the type of resource (either file or archive)visibility- visibility of the resource in the repository cacheaddToClasspath- set to true to add the resource to the classpathclasspathEntries- relative path entries contained within the resource (must be an archive)
-
ApplicationResource
public ApplicationResource(String resourcePath)
Construct an application resource using the given path to the resource in the shared repository. Defaults to a regular file with application level visibility.- Parameters:
resourcePath- path to the resource in a shared repository (i.e. HDFS)
-
-
Method Detail
-
getResourcePath
public String getResourcePath()
Get the resource path- Returns:
- resource path
-
getType
public ApplicationResource.ResourceType getType()
Get the resource type.- Returns:
- resource type
-
getVisibility
public ApplicationResource.ResourceVisibility getVisibility()
Get the resource visibility.- Returns:
- resource visibility
-
isAddToClasspath
public boolean isAddToClasspath()
Gets the indicator of whether or not the resource should be added to container classpath.- Returns:
- true implies add to classpath
-
getClasspathEntries
public List<String> getClasspathEntries()
Get the list of relative classpath entries.- Returns:
- list of relative classpath entries.
-
-