Github user YolandaMDavis commented on a diff in the pull request:
https://github.com/apache/nifi/pull/2065#discussion_r132821753
--- Diff:
nifi-toolkit/nifi-toolkit-zookeeper-migrator/src/main/java/org/apache/nifi/toolkit/zkmigrator/ZooKeeperMigrator.java
---
@@ -269,15 +269,23 @@ private String ensureNodeExists(ZooKeeper zooKeeper,
String path, CreateMode cre
}
}
- private DataStatAclNode transformNode(DataStatAclNode node, AuthMode
destinationAuthMode) {
- // For the NiFi use case, all nodes will be migrated to
CREATOR_ALL_ACL
+ private DataStatAclNode transformNode(DataStatAclNode node, AuthMode
destinationAuthMode, boolean useExistingACL) {
+ // If useExistingACL is false, for the NiFi use cases, all nodes
will be migrated to CREATOR_ALL_ACL
final DataStatAclNode migratedNode = new
DataStatAclNode(node.getPath(), node.getData(), node.getStat(),
- destinationAuthMode.equals(AuthMode.OPEN) ?
ZooDefs.Ids.OPEN_ACL_UNSAFE : ZooDefs.Ids.CREATOR_ALL_ACL,
+ determineNodeACL(node,destinationAuthMode,useExistingACL),
node.getEphemeralOwner());
LOGGER.info("transformed original node {} to {}", node,
migratedNode);
return migratedNode;
}
+ private List<ACL> determineNodeACL(DataStatAclNode node, AuthMode
destinationAuthMode, boolean useExistingACL){
--- End diff --
Sure no problem
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---