Skip to content

NIFI-3300 Implemented usage of ZooKeeper chroot capability in the con…#1456

Closed
jtstorck wants to merge 2 commits intoapache:masterfrom
jtstorck:NIFI-3300
Closed

NIFI-3300 Implemented usage of ZooKeeper chroot capability in the con…#1456
jtstorck wants to merge 2 commits intoapache:masterfrom
jtstorck:NIFI-3300

Conversation

@jtstorck
Copy link
Contributor

…nect string

Updated ZooKeeper connect string parsing tests
Updated admin doc for ZooKeeper Migrator migration of nifi root nodes, updated source and destination ZK check by servers in the connection string instead of the entire connection string

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:

  • Is there a JIRA ticket associated with this PR? Is it referenced
    in the commit message?

  • 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.

  • Has your PR been rebased against the latest commit within the target branch (typically master)?

  • Is your initial contribution a single, squashed commit?

For code changes:

  • 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?
  • If adding new dependencies to the code, are these dependencies licensed in a way that is compatible for inclusion under ASF 2.0?
  • 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.

…nect string

Updated ZooKeeper connect string parsing tests
Updated admin doc for ZooKeeper Migrator migration of nifi root nodes, updated source and destination ZK check by servers in the connection string instead of the entire connection string
@brosander
Copy link
Contributor

Reviewing


class ZooKeeperEndpointConfig {
private final String connectString;
private final List servers;
Copy link
Contributor

@brosander brosander Feb 1, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should this be List<String> ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, fixed.

@brosander
Copy link
Contributor

@jtstorck I'm hitting an issue restoring to a different path on the same server

Exception in thread "main" java.lang.IllegalArgumentException: Source ZooKeeper config ZooKeeperEndpointConfig{connectString=zk-kerberos:2181/, servers=[zk-kerberos:2181], path=/} for the data provided can not be the same as the configured destination ZooKeeper config ZooKeeperEndpointConfig{connectString=zk-kerberos:2181/abcd, servers=[zk-kerberos:2181], path=/abcd}
        at com.google.common.base.Preconditions.checkArgument(Preconditions.java:145)
        at org.apache.nifi.toolkit.zkmigrator.ZooKeeperMigrator.writeZooKeeper(ZooKeeperMigrator.java:137)
        at org.apache.nifi.toolkit.zkmigrator.ZooKeeperMigratorMain.main(ZooKeeperMigratorMain.java:160)

@jtstorck
Copy link
Contributor Author

jtstorck commented Feb 1, 2017

@brosander Good catch, this should be allowed. I'll update the code and add a test for this use case.

…to allow data to be written to the same ZooKeeper with a different path

Added test for writing to the same ZooKeeper with a different path
Added type parameter to server list in for ZooKeeperEndpointConfig
@brosander
Copy link
Contributor

+1 Merging

@asfgit asfgit closed this in af2861f Feb 1, 2017
@jtstorck jtstorck deleted the NIFI-3300 branch February 2, 2017 15:30
nickcarenza pushed a commit to nickcarenza/nifi that referenced this pull request Mar 3, 2017
…nect string

Updated ZooKeeper connect string parsing tests
Updated admin doc for ZooKeeper Migrator migration of nifi root nodes, updated source and destination ZK check by servers in the connection string instead of the entire connection string
Added check between source and destination ZooKeeper paths to allow data to be written to the same ZooKeeper with a different path
Added test for writing to the same ZooKeeper with a different path
Added type parameter to server list in for ZooKeeperEndpointConfig

This closes apache#1456.

Signed-off-by: Bryan Rosander <brosander@apache.org>
aperepel pushed a commit to aperepel/nifi that referenced this pull request Mar 29, 2017
…nect string

Updated ZooKeeper connect string parsing tests
Updated admin doc for ZooKeeper Migrator migration of nifi root nodes, updated source and destination ZK check by servers in the connection string instead of the entire connection string
Added check between source and destination ZooKeeper paths to allow data to be written to the same ZooKeeper with a different path
Added test for writing to the same ZooKeeper with a different path
Added type parameter to server list in for ZooKeeperEndpointConfig

This closes apache#1456.

Signed-off-by: Bryan Rosander <brosander@apache.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants