@Override
    public void process(WatchedEvent watchedEvent) {
      if (watchedEvent.getType() == Event.EventType.NodeChildrenChanged) {
        if (
          !(ChaosConstants.CHAOS_AGENT_STATUS_PERSISTENT_ZNODE + ChaosConstants.ZNODE_PATH_SEPARATOR
            + agentName).equals(watchedEvent.getPath())
        ) {
          throw new RuntimeException(
            KeeperException.create(KeeperException.Code.DATAINCONSISTENCY));
        }

        LOG.info("Change in Tasks Node, checking for Tasks again.");
        getTasks();
      }

    }
Watcher for notifying if any task is assigned to agent or not, by seeking if any Node is being
added to agent as Child.
hbase-it/src/main/java/org/apache/hadoop/hbase/chaos/ChaosAgent.java