You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2017/09/08 21:50:00 UTC

[jira] [Commented] (NIFI-4363) Parameterize heap allocation in NiFi Toolkit scripts

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

ASF GitHub Bot commented on NIFI-4363:
--------------------------------------

GitHub user jtstorck opened a pull request:

    https://github.com/apache/nifi/pull/2136

    NIFI-4363 Replaced hardcoded heap size options with JAVA_ARGS environ…

    …ment variable.
    
    Hardcoded heap size settings have been preserved as defaults in the JAVA_ARGS variable if it is not available in the scope of the script.
    
    To test in *nix and OS X, temporarily use "set -x" in a script to echo commands to the terminal.
    Example:
    ```sh
    $ JAVA_ARGS="-Xms1m -Xmx24m" ./encrypt-config.sh
    ```
    will run:
    ```sh
    /usr/bin/java -cp '/Users/jstorck/git-repos/nifi/nifi-toolkit/nifi-toolkit-assembly/target/nifi-toolkit-1.4.0-SNAPSHOT-bin/nifi-toolkit-1.4.0-SNAPSHOT/classpath:/Users/jstorck/git-repos/nifi/nifi-toolkit/nifi-toolkit-assembly/target/nifi-toolkit-1.4.0-SNAPSHOT-bin/nifi-toolkit-1.4.0-SNAPSHOT/lib/*' -Xms1m -Xmx24m org.apache.nifi.properties.ConfigEncryptionTool
    ```
    Without specifying JAVA_ARGS:
    ```sh
    $ ./encrypt-config.sh
    ```
    will run:
    ```sh
    /usr/bin/java -cp '/Users/jstorck/git-repos/nifi/nifi-toolkit/nifi-toolkit-assembly/target/nifi-toolkit-1.4.0-SNAPSHOT-bin/nifi-toolkit-1.4.0-SNAPSHOT/classpath:/Users/jstorck/git-repos/nifi/nifi-toolkit/nifi-toolkit-assembly/target/nifi-toolkit-1.4.0-SNAPSHOT-bin/nifi-toolkit-1.4.0-SNAPSHOT/lib/*' -Xms128m -Xmx256m org.apache.nifi.properties.ConfigEncryptionTool
    ```
    
    To test in Windows, temporarily remove @echo off from a batch file to echo commands to the terminal.
    Example:
    ```bat
    C:\Users\Administrator\Documents>set JAVA_ARGS=-Xmx24m
    C:\Users\Administrator\Documents>encrypt-config.bat
    ```
    will run:
    ```bat
    C:\Users\Administrator\Documents>cmd.exe /C ""java" -cp C:\Users\Administrator\Documents\..\classpath;C:\Users\Administrator\Documents\..\lib\* -Xmx24m org.apache.nifi.properties.ConfigEncryptionTool  ""
    ```
    Without setting JAVA_ARGS:
    ```bat
    C:\Users\Administrator\Documents>encrypt-config.bat
    ```
    will run:
    ```bat
    C:\Users\Administrator\Documents>cmd.exe /C ""java" -cp C:\Users\Administrator\Documents\..\classpath;C:\Users\Administrator\Documents\..\lib\* -Xms128m -Xmx256m org.apache.nifi.properties.ConfigEncryptionTool  ""```

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

    $ git pull https://github.com/jtstorck/nifi NIFI-4363

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

    https://github.com/apache/nifi/pull/2136.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 #2136
    
----
commit 889379bddbf7fd0d8e7fa1ca0acad5c31395258c
Author: Jeff Storck <jt...@gmail.com>
Date:   2017-09-08T21:33:00Z

    NIFI-4363 Replaced hardcoded heap size options with JAVA_ARGS environment variable.

----


> Parameterize heap allocation in NiFi Toolkit scripts
> ----------------------------------------------------
>
>                 Key: NIFI-4363
>                 URL: https://issues.apache.org/jira/browse/NIFI-4363
>             Project: Apache NiFi
>          Issue Type: Improvement
>          Components: Tools and Build
>    Affects Versions: 1.3.0
>            Reporter: Jeff Storck
>            Assignee: Jeff Storck
>
> Replace hardcoded heap allocation of java in scripts with parameterized values.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)