@Override
  public void nodeDataChanged(String path) {
    if (keysParentZNode.equals(ZKUtil.getParent(path))) {
      try {
        byte[] data = ZKUtil.getDataAndWatch(watcher, path);
        if (data == null || data.length == 0) {
          LOG.debug("Ignoring empty node " + path);
          return;
        }

        AuthenticationKey key =
          (AuthenticationKey) Writables.getWritable(data, new AuthenticationKey());
        secretManager.addKey(key);
      } catch (KeeperException ke) {
        LOG.error(HBaseMarkers.FATAL, "Error reading data from zookeeper", ke);
        watcher.abort("Error reading updated key znode " + path, ke);
      } catch (IOException ioe) {
        LOG.error(HBaseMarkers.FATAL, "Error reading key writables", ioe);
        watcher.abort("Error reading key writables from znode " + path, ioe);
      }
    }
  }
Synchronizes token encryption keys across cluster nodes.
hbase-server/src/main/java/org/apache/hadoop/hbase/security/token/ZKSecretWatcher.java