You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by jtstorck <gi...@git.apache.org> on 2018/11/15 23:41:34 UTC

[GitHub] nifi pull request #3174: [WIP] NIFI-5820 NiFi built on Java 1.8 can run on J...

GitHub user jtstorck opened a pull request:

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

    [WIP] NIFI-5820 NiFi built on Java 1.8 can run on Java 9/10/11

    Updated RunNiFi.java to add libs need to run on Java 11 when it is the detected runtime java version and grant access to the necessary module when running on Java 9 or 10
    Added dependencies/includes/excludes to nifi-assembly configurations for enabling NiFi to run on Java 11
    
    Thank you for submitting a contribution to Apache NiFi.
    
    In order to streamline the review of the contribution we ask you
    to ensure the following steps have been taken:
    
    ### For all changes:
    - [x] Is there a JIRA ticket associated with this PR? Is it referenced 
         in the commit message?
    
    - [x] Does your PR title start with NIFI-XXXX where XXXX is the JIRA number you are trying to resolve? Pay particular attention to the hyphen "-" character.
    
    - [x] Has your PR been rebased against the latest commit within the target branch (typically master)?
    
    - [x] Is your initial contribution a single, squashed commit?
    
    ### For code changes:
    - [x] Have you ensured that the full suite of tests is executed via mvn -Pcontrib-check clean install at the root nifi folder?
    - [ ] Have you written or updated unit tests to verify your changes?
    - [x] If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under [ASF 2.0](http://www.apache.org/legal/resolved.html#category-a)? 
    - [ ] If applicable, have you updated the LICENSE file, including the main LICENSE file under nifi-assembly?
    - [ ] If applicable, have you updated the NOTICE file, including the main NOTICE file found under nifi-assembly?
    - [ ] If adding new Properties, have you added .displayName in addition to .name (programmatic access) for each of the new properties?
    
    ### For documentation related changes:
    - [ ] Have you ensured that format looks appropriate for the output in which it is rendered?
    
    ### Note:
    Please ensure that once the PR is submitted, you check travis-ci for build issues and submit an update to your PR as soon as possible.


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

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

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

    https://github.com/apache/nifi/pull/3174.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 #3174
    
----
commit 4859444b6b503a86953d0a6b06be07f081357552
Author: Jeff Storck <jt...@...>
Date:   2018-11-15T23:38:02Z

    NIFI-5820 NiFi built on Java 1.8 can run on Java 9/10/11
    Updated RunNiFi.java to add libs need to run on Java 11 when it is the detected runtime java version and grant access to the necessary module when running on Java 9 or 10
    Added dependencies/includes/excludes to nifi-assembly configurations for enabling NiFi to run on Java 11

----


---

[GitHub] nifi issue #3174: [WIP] NIFI-5820 NiFi built on Java 1.8 can run on Java 9/1...

Posted by jtstorck <gi...@git.apache.org>.
Github user jtstorck commented on the issue:

    https://github.com/apache/nifi/pull/3174
  
    Thanks for taking a look at the PR, @joewitt.  That warning is due to accessing, via reflection, the `pid` method on the Process API, which was added in Java 9.  The code that does this was added by NIFI-5175, to allow NiFI built on Java 1.8 to run on Java 9.  There's a comment in the code detailing why the use of reflection is necessary.  Please see https://github.com/apache/nifi/blob/master/nifi-bootstrap/src/main/java/org/apache/nifi/bootstrap/util/OSUtils.java#L111.
    
    The warning is expected, and when we have a minimum requirement of Java 11, we can refactor OSUtils, or probably remove the class entirely, since the Process API (as of Java 9) provides a platform independent way to get a PID.  I don't think we'll need to have the methods in OSUtils for getting the PID based on which platform on which NiFi is running.


---

[GitHub] nifi issue #3174: [WIP] NIFI-5820 NiFi built on Java 1.8 can run on Java 9/1...

Posted by joewitt <gi...@git.apache.org>.
Github user joewitt commented on the issue:

    https://github.com/apache/nifi/pull/3174
  
    it built with java 8.  switched to 11.  nifi starts up and appears to be working great.
    
    I did notice this on startup
    
    nifi.sh: JAVA_HOME not set; results may vary
    
    Java home: 
    NiFi home: /Users/joe/development/nifi.git/nifi-assembly/target/nifi-1.9.0-SNAPSHOT-bin/nifi-1.9.0-SNAPSHOT
    
    Bootstrap Config File: /../development/nifi.git/nifi-assembly/target/nifi-1.9.0-SNAPSHOT-bin/nifi-1.9.0-SNAPSHOT/conf/bootstrap.conf
    
    WARNING: An illegal reflective access operation has occurred
    WARNING: Illegal reflective access by org.apache.nifi.bootstrap.util.OSUtils (file:/../development/nifi.git/nifi-assembly/target/nifi-1.9.0-SNAPSHOT-bin/nifi-1.9.0-SNAPSHOT/lib/bootstrap/nifi-bootstrap-1.9.0-SNAPSHOT.jar) to method java.lang.ProcessImpl.pid()
    WARNING: Please consider reporting this to the maintainers of org.apache.nifi.bootstrap.util.OSUtils
    WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
    WARNING: All illegal access operations will be denied in a future release
    



---

[GitHub] nifi issue #3174: NIFI-5820 NiFi built on Java 1.8 can run on Java 9/10/11

Posted by jtstorck <gi...@git.apache.org>.
Github user jtstorck commented on the issue:

    https://github.com/apache/nifi/pull/3174
  
    Rebased this against current master, but some additional updates need to be made along with some more local testing.  Setting this back to WIP while I make these changes...


---