private void refreshNodes(List<ZKUtil.NodeAndData> nodes) {
    for (ZKUtil.NodeAndData n : nodes) {
      String path = n.getNode();
      String keyId = ZKUtil.getNodeName(path);
      try {
        byte[] data = n.getData();
        if (data == null || data.length == 0) {
          LOG.debug("Ignoring empty node " + path);
          continue;
        }
        AuthenticationKey key =
          (AuthenticationKey) Writables.getWritable(data, new AuthenticationKey());
        secretManager.addKey(key);
      } catch (IOException ioe) {
        LOG.error(HBaseMarkers.FATAL,
          "Failed reading new secret key for id '" + keyId + "' from zk", ioe);
        watcher.abort("Error deserializing key from znode " + path, ioe);
      }
    }
  }
Synchronizes token encryption keys across cluster nodes.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/ZKSecretWatcher.java