incubator-s4-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Matthieu Morel (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (S4-72) Resource loading from S4R
Date Wed, 11 Jul 2012 14:10:33 GMT

    [ https://issues.apache.org/jira/browse/S4-72?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13411536#comment-13411536
] 

Matthieu Morel commented on S4-72:
----------------------------------

I uploaded a patch in branch S4-72.

* It replaces the "multiple classloaders" scheme with a mechanism inspired from Hadoop's classloading
scheme.
* S4R are generated differently: dependencies are not exploded then gathered again. Instead,
we place them in a /lib directory in the S4R, whereas the app jar is placed in /app. After
retrieval, nodes unzip the S4R in a given directory and load class/resources from there.

Benefits:
* user resources take precedence over dependencies resources: upon class/resource loading,
the /app dir takes precedence over the /lib dir (which fulfills the requirements for this
ticket)
* S4R packaging is _much_ faster, in particular with large dependencies: there is no need
to unzip/copy/zip all dependencies
* simpler and more efficient classloading
                
> Resource loading from S4R
> -------------------------
>
>                 Key: S4-72
>                 URL: https://issues.apache.org/jira/browse/S4-72
>             Project: Apache S4
>          Issue Type: Improvement
>    Affects Versions: 0.5
>            Reporter: Daniel Gómez Ferro
>             Fix For: 0.5
>
>
> S4RLoader should load resources from jars. This could be accomplished overriding {{findResource()}}
or directly {{getResource()/getResourceAsStream()}}.
> User resources should also take precedence over dependencies resources. Right now dependencies
are exploded and packaged on a single JAR causing all resources to be at the same level, possibly
conflicting with each other. There are a couple of options to solve this:
>    * Specify a directory for user resources which will be searched before any other directory
>    * Don't explode dependencies, packaging them as JARs. Only user resources would be
at top level

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

       

Mime
View raw message