Class 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 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 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 Detail

      • getResourcePath

        public String getResourcePath()
        Get the resource path
        Returns:
        resource path
      • 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.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object