You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@samza.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/11/06 19:45:00 UTC

[jira] [Commented] (SAMZA-1817) Long classpath support

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

ASF GitHub Bot commented on SAMZA-1817:
---------------------------------------

GitHub user Sanil15 opened a pull request:

    https://github.com/apache/samza/pull/797

    SAMZA-1817: Generating relative path from absolute paths

    - We removed wildcarding to shorten the classpath since it induces indeterminism in classpath on two consecutive deploys
    - This patch constructs classpath (run-class.sh) by generating the relative path from directory executing the script to target directory where jars are present. 
    - From observations on deploying jobs on YARN and locally, we saw that we can save over 65% of classpath length by switching to relative paths as compared to the absolute path
    


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/Sanil15/samza SAMZA-1817-reopen

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/samza/pull/797.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #797
    
----
commit 218ab2cb8bd8f9095a14c339427cb623c3fb9a91
Author: Sanil15 <sa...@...>
Date:   2018-11-06T19:39:37Z

    Generating relative path from absolute paths

----


> Long classpath support
> ----------------------
>
>                 Key: SAMZA-1817
>                 URL: https://issues.apache.org/jira/browse/SAMZA-1817
>             Project: Samza
>          Issue Type: Bug
>            Reporter: Sanil Jain
>            Assignee: Sanil Jain
>            Priority: Major
>
> Samza team could also support a problem for long classpath by implementing something that would reduce the classpath length.
> Some potential ideas to fix:
> - Change the generated classpath (done in Samza's bash scripts) to be a list of `<directory>/*jar` entries instead of a list of every individual jar. Wildcards in the classpath are supported in jdk >= 6.
> This should be a relatively simple change and can be implemented by getting the parent directory of all jar files into a list, sorting and making the list unique, then append a wildcard to the end to pick up all jars under each directory in the list (ask Jon Bringhurst if you have any questions).
> See https://github.com/apache/samza/blob/92ae4c628abb3d113520ec47ca82f08c480123ad/samza-shell/src/main/bash/run-class.sh#L63 for where the code change for this should probably be.
> - Use the manifest in a special "uber-jar" to list all dependencies in the classpath. Then just include that one "uber-jar" in the classpath on the cli. This would probably be tough to do, and seems like it would be annoying to manage, but apparently IntelliJ uses this strategy.
> Note that this is not an issue with the number of arguments (argc limit, which is based on a multiple of the ulimit -s stack size), it is a problem with the length of a single argument (strlen(*argv) limit based on MAX_ARG_STRLEN, which is a multiple of the PAGE_SIZE). So, the only way to get around this limit is to recompile the kernel with a different page size (which obviously isn't practical).



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)