This is an automated email from the ASF dual-hosted git repository.
sijie pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/bookkeeper.git
The following commit(s) were added to refs/heads/master by this push:
new 64e8686 Enforce zkAcls on initNewCluster
64e8686 is described below
commit 64e86868e8f887e3ffdb47c3955b90c19c124407
Author: Sijie Guo <[email protected]>
AuthorDate: Mon Feb 19 20:30:51 2018 -0800
Enforce zkAcls on initNewCluster
Descriptions of the changes in this PR:
initNewCluster was introduced #979. The new command doesn't honor to
zookeeper acls settings. This change is to change those zookeeper calls to use
`zkAcls`.
Author: Sijie Guo <[email protected]>
Reviewers: Charan Reddy Guttapalem <[email protected]>, Enrico
Olivelli <[email protected]>
This closes #1171 from sijie/enforce_acls
---
.../java/org/apache/bookkeeper/discover/ZKRegistrationManager.java | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/discover/ZKRegistrationManager.java
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/discover/ZKRegistrationManager.java
index 11452f2..66f2509 100644
---
a/bookkeeper-server/src/main/java/org/apache/bookkeeper/discover/ZKRegistrationManager.java
+++
b/bookkeeper-server/src/main/java/org/apache/bookkeeper/discover/ZKRegistrationManager.java
@@ -74,7 +74,6 @@ import org.apache.zookeeper.Watcher;
import org.apache.zookeeper.Watcher.Event.EventType;
import org.apache.zookeeper.Watcher.Event.KeeperState;
import org.apache.zookeeper.ZKUtil;
-import org.apache.zookeeper.ZooDefs.Ids;
import org.apache.zookeeper.ZooKeeper;
import org.apache.zookeeper.data.ACL;
import org.apache.zookeeper.data.Stat;
@@ -486,10 +485,10 @@ public class ZKRegistrationManager implements
RegistrationManager {
}
// Create ledgers root node
- zk.create(zkLedgersRootPath, "".getBytes(UTF_8), Ids.OPEN_ACL_UNSAFE,
CreateMode.PERSISTENT);
+ zk.create(zkLedgersRootPath, "".getBytes(UTF_8), zkAcls,
CreateMode.PERSISTENT);
// create available bookies node
- zk.create(zkAvailableBookiesPath, "".getBytes(UTF_8),
Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+ zk.create(zkAvailableBookiesPath, "".getBytes(UTF_8), zkAcls,
CreateMode.PERSISTENT);
// creates the new layout and stores in zookeeper
AbstractZkLedgerManagerFactory.newLedgerManagerFactory(conf,
layoutManager);
@@ -497,7 +496,7 @@ public class ZKRegistrationManager implements
RegistrationManager {
// create INSTANCEID
String instanceId = UUID.randomUUID().toString();
zk.create(conf.getZkLedgersRootPath() + "/" +
BookKeeperConstants.INSTANCEID, instanceId.getBytes(UTF_8),
- Ids.OPEN_ACL_UNSAFE, CreateMode.PERSISTENT);
+ zkAcls, CreateMode.PERSISTENT);
log.info("Successfully initiated cluster. ZKServers: {} ledger root
path: {} instanceId: {}", zkServers,
zkLedgersRootPath, instanceId);
--
To stop receiving notification emails like this one, please contact
[email protected].