private Set<URL> filterAndBuildUserClasspath(Container container) {
        if (logger.isDebugEnabled()) {
            logger.debug("Building additional classpath for the container: " + container);
        }
        Set<URL> additionalClassPathUrls = new HashSet<URL>();
        Set<Path> userClassPath =
                this.extractUserProvidedClassPathEntries(container);

        for (Path resourcePath : userClassPath) {
            String resourceName = "file:///" + new File(resourcePath.getName()).getAbsolutePath();
            if (logger.isDebugEnabled()) {
                logger.debug("\t adding " + resourceName + " to the classpath");
            }
            try {
                additionalClassPathUrls.add(new URI(resourceName).toURL());
            }
            catch (Exception e) {
                throw new IllegalArgumentException(e);
            }
        }
        return additionalClassPathUrls;
    }
private Set < URL > filterAndBuildUserClasspath ( Container container ) { if ( logger . isDebugEnabled ( ) ) { logger . debug ( "Building additional classpath for the container: " + container ) ; } Set < URL > additionalClassPathUrls = new HashSet < URL > ( ) ; Set < Path > userClassPath = this . extractUserProvidedClassPathEntries ( container ) ; for ( Path resourcePath : userClassPath ) { String resourceName = "file:///" + new File ( resourcePath . getName ( ) ) . getAbsolutePath ( ) ; if ( logger . isDebugEnabled ( ) ) { logger . debug ( "\t adding " + resourceName + " to the classpath" ) ; } try { additionalClassPathUrls . add ( new URI ( resourceName ) . toURL ( ) ) ; } catch ( Exception e ) { throw new IllegalArgumentException ( e ) ; } } return additionalClassPathUrls ; }
YARN provides ability to pass resources (e.g., classpath) through
{@link LocalResource}s which allows user to provision all the resources
required to run the app. This method will extract those resources as a
{@link Set} of {@link URL}s so they are used when {@link ClassLoader} for a
container is created.

This is done primarily as a convenience for applications that rely on
automatic classpath propagation (e.g., pull everything from my dev
classpath) instead of manual.

@param container
@return