public class ZooAuthenticationKeyDistributor extends Object
AuthenticationKeys, Accumulo's secret in the
delegation token model, to other Accumulo nodes via ZooKeeper.| Constructor and Description |
|---|
ZooAuthenticationKeyDistributor(ZooReaderWriter zk,
String baseNode) |
| Modifier and Type | Method and Description |
|---|---|
void |
advertise(AuthenticationKey newKey)
Add the given
AuthenticationKey to ZooKeeper. |
List<AuthenticationKey> |
getCurrentKeys()
Fetch all
AuthenticationKeys currently stored in ZooKeeper beneath the configured
baseNode. |
void |
initialize()
Ensures that ZooKeeper is in a correct state to perform distribution of
AuthenticationKeys. |
void |
remove(AuthenticationKey key)
Remove the given
AuthenticationKey from ZooKeeper. |
public ZooAuthenticationKeyDistributor(ZooReaderWriter zk, String baseNode)
public void initialize()
throws org.apache.zookeeper.KeeperException,
InterruptedException
AuthenticationKeys.org.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic List<AuthenticationKey> getCurrentKeys() throws org.apache.zookeeper.KeeperException, InterruptedException
AuthenticationKeys currently stored in ZooKeeper beneath the configured
baseNode.AuthenticationKeysorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void advertise(AuthenticationKey newKey) throws org.apache.zookeeper.KeeperException, InterruptedException
AuthenticationKey to ZooKeeper.newKey - The key to add to ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionpublic void remove(AuthenticationKey key) throws org.apache.zookeeper.KeeperException, InterruptedException
AuthenticationKey from ZooKeeper. If the node for the provided
key doesn't exist in ZooKeeper, a warning is printed but an error is not thrown. Since
there is only a single process managing ZooKeeper at one time, any inconsistencies should be
client error.key - The key to remove from ZooKeeperorg.apache.zookeeper.KeeperExceptionInterruptedExceptionCopyright © 2011–2018 The Apache Software Foundation. All rights reserved.