Examples of OnChange


Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

  }

  private void watchForShardServerChanges() {
    ZookeeperPathConstants.getOnlineShardsPath(_cluster);
    _watchOnlineShards = new WatchChildren(_zookeeper, ZookeeperPathConstants.getOnlineShardsPath(_cluster))
        .watch(new OnChange() {
          private List<String> _prevOnlineShards = new ArrayList<String>();

          @Override
          public void action(List<String> onlineShards) {
            List<String> oldOnlineShards = _prevOnlineShards;
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

    }
  }

  private void watchForOnlineShardNodes(final String cluster) {
    WatchChildren watch = new WatchChildren(_zk, ZookeeperPathConstants.getOnlineShardsPath(cluster))
        .watch(new OnChange() {
          @Override
          public void action(List<String> children) {
            _onlineShardsNodes.put(cluster, children);
          }
        });
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

    BlurUtil.createIfMissing(_zookeeper, ZookeeperPathConstants.getClustersPath());
  }

  private void watchForClusterChanges() throws KeeperException, InterruptedException {
    _watchForClusters = new WatchChildren(_zookeeper, ZookeeperPathConstants.getClustersPath());
    _watchForClusters.watch(new OnChange() {
      @Override
      public void action(List<String> children) {
        for (String cluster : children) {
          try {
            watchForLayoutChanges(cluster);
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

    }
  }

  private void watch(String cluster, String path, ConcurrentMap<String, WatchChildren> map) {
    WatchChildren watchForTables = new WatchChildren(_zookeeper, path);
    watchForTables.watch(new OnChange() {
      @Override
      public void action(List<String> children) {
        LOG.info("Layout change.");
        updateLayout();
      }
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

  }

  private WatchChildren watchForShardServerChanges() {
    WatchChildren watchOnlineShards = new WatchChildren(_zookeeper,
        ZookeeperPathConstants.getOnlineShardsPath(_cluster));
    watchOnlineShards.watch(new OnChange() {
      private List<String> _prevOnlineShards = new ArrayList<String>();

      @Override
      public void action(List<String> onlineShards) {
        List<String> oldOnlineShards = _prevOnlineShards;
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

    BlurUtil.createIfMissing(_zookeeper, ZookeeperPathConstants.getClustersPath());
  }

  private void watchForClusterChanges() throws KeeperException, InterruptedException {
    _watchForClusters = new WatchChildren(_zookeeper, ZookeeperPathConstants.getClustersPath());
    _watchForClusters.watch(new OnChange() {
      @Override
      public void action(List<String> children) {
        for (String cluster : new HashSet<String>(_distributedLayoutFactoryMap.keySet())) {
          if (!children.contains(cluster)) {
            _distributedLayoutFactoryMap.remove(cluster);
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

    String path = ZookeeperPathConstants.getTablesPath(cluster);
    if (map.containsKey(cluster)) {
      return;
    }
    WatchChildren watchForTableLayoutChanges = new WatchChildren(_zookeeper, path);
    watchForTableLayoutChanges.watch(new OnChange() {
      @Override
      public void action(List<String> children) {
        LOG.info("Layout change for cluster [{0}].", cluster);
        updateLayout(cluster);
      }
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

    String key = cluster + "|" + table;
    if (map.containsKey(key)) {
      return;
    }
    WatchChildren watchForTableLayoutChanges = new WatchChildren(_zookeeper, path);
    watchForTableLayoutChanges.watch(new OnChange() {
      @Override
      public void action(List<String> children) {
        LOG.info("Layout change for cluster [{0}] table [{1}].", cluster, table);
        updateLayout(cluster);
      }
View Full Code Here

Examples of org.apache.blur.zookeeper.WatchChildren.OnChange

    }
  }

  private void watchForOnlineShardNodes(final String cluster) {
    WatchChildren watch = new WatchChildren(_zk, ZookeeperPathConstants.getOnlineShardsPath(cluster));
    watch.watch(new OnChange() {
      @Override
      public void action(List<String> children) {
        _onlineShardsNodes.put(cluster, children);
      }
    });
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.