You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2020/07/07 16:44:02 UTC

[GitHub] [nifi] mattyb149 commented on pull request #4376: NIFI-7592: Allow NiFi to be started without a GUI/REST interface

mattyb149 commented on pull request #4376:
URL: https://github.com/apache/nifi/pull/4376#issuecomment-654986964


   The PR removes nifi-jetty (which has the JettyServer class, an implementation of the NiFiServer interface) as the parent classloader for all NARs that don't have one. Some NARs still need Jetty itself (some HTTP processors, e.g.) so our JettyServer class and its dependencies are now in a nifi-server NAR, which has the "nifi-jetty-bundle" as a parent. 
   The naming gets confusing here because NiFi code has a JettyServer class, but the nifi-jetty-bundle just has pure Jetty dependencies for those NARs that need them. For example all NARs with custom UIs (the Advanced button on the component dialog), components that need to start a server (ListenHttp, e.g.) have nifi-jetty-bundle as the top-level parent.
   
   This PR also includes refactoring the way the NiFiServer implementation is instantiated. It used to look for a hardcoded class name (for JettyServer) and use reflection to instantiate it. This PR removes that code and replaces it with a ServiceLoader that looks in the NARs for an implementation of NiFiServer. For the normal NiFi assembly, the nifi-server NAR (with JettyServer) will be there so it will get discovered as expected. But for other assemblies (such as MiNiFi Java), the nifi-server NAR would be replaced with a different implementation, and this PR offers one called MiNiFiServer in a minifi-server NAR. If you replace the nifi-server NAR with minifi-server, the UI/REST components are no longer available, and the flow controller and all components are created immediately and the flow is loaded/initialized.


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org