public class ZooAuthenticationKeyDistributor extends Object
AuthenticationKey
s, 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
AuthenticationKey s currently stored in ZooKeeper beneath the configured
baseNode . |
void |
initialize()
Ensures that ZooKeeper is in a correct state to perform distribution of
AuthenticationKey s. |
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
AuthenticationKey
s.org.apache.zookeeper.KeeperException
InterruptedException
public List<AuthenticationKey> getCurrentKeys() throws org.apache.zookeeper.KeeperException, InterruptedException
AuthenticationKey
s currently stored in ZooKeeper beneath the configured
baseNode
.AuthenticationKey
sorg.apache.zookeeper.KeeperException
InterruptedException
public void advertise(AuthenticationKey newKey) throws org.apache.zookeeper.KeeperException, InterruptedException
AuthenticationKey
to ZooKeeper.newKey
- The key to add to ZooKeeperorg.apache.zookeeper.KeeperException
InterruptedException
public 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.KeeperException
InterruptedException
Copyright © 2011–2018 The Apache Software Foundation. All rights reserved.