nifi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (NIFI-1860) Backward compatibility for Site-to-Site client
Date Mon, 09 May 2016 06:23:12 GMT


ASF GitHub Bot commented on NIFI-1860:

GitHub user ijokarumawak opened a pull request:

    NIFI-1860 Added ContainerRequestFilter to redirect

    - redirect /controller to /site-to-site

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

    $ git pull nifi-1860

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

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

    This closes #422
commit 9abb4a27a39c8ed8f0ba0f3ab52202a3cc5010a6
Author: ijokarumawak <>
Date:   2016-05-09T06:18:25Z

    NIFI-1860 Added ContainerRequestFilter to redirect
    - redirect /controller to /site-to-site


> Backward compatibility for Site-to-Site client
> ----------------------------------------------
>                 Key: NIFI-1860
>                 URL:
>             Project: Apache NiFi
>          Issue Type: Sub-task
>          Components: Core Framework
>            Reporter: Koji Kawamura
>             Fix For: 1.0.0
> NIFI-1554 has moved /nifi-api/controller to /nifi-api/site-to-site/ .
> However, Site-to-Site client is not updated yet, and it still sends a request to /nifi-api/controller
to obtain information for Site-to-Site. 
> {}
>     private ControllerDTO refreshRemoteInfo() throws IOException {
>         final boolean webInterfaceSecure = clusterUrl.toString().startsWith("https");
>         final NiFiRestApiUtil utils = new NiFiRestApiUtil(webInterfaceSecure ? sslContext
: null);
>         final ControllerDTO controller = utils.getController(apiUri + "/controller",
> {code}
> We can simply change the URL to "/site-to-site", but if we do so, old version of NiFi
won't be able to communicate with the new version of NiFi via Site-to-Site.
> Possible approaches to provide backward compatibility are:
> * A. keep the old endpoint and let it respond with 301 Moved Permanently
> * B. add a ContainerRequestFilter to modify requested url
> * C. Jetty Rewrite Handler
> Similarly when new version of NiFi tries to communicate with old version of NiFi, it
has to send request to /controller, instead of /site-to-site. For this scenario, adding retry
logic in new version of SIte-to-SIte client would be sufficient.
> # Send request to /site-to-site
> # If response code is 404 or 405, then retry sending request to /controller

This message was sent by Atlassian JIRA

View raw message