Class ApplicationResource

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.
  • Constructor Details

    • 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 cache
      addToClasspath - set to true to add the resource to the classpath
      classpathEntries - 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 Details

    • getResourcePath

      public String getResourcePath()
      Get the resource path
      Returns:
      resource path
    • getType

      Get the resource type.
      Returns:
      resource type
    • 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.
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object