Package net.sf.katta.operation.master

Examples of net.sf.katta.operation.master.CheckIndicesOperation


    List<String> nodes = _protocol.registerChildListener(this, PathDef.NODES_LIVE, new IAddRemoveListener() {
      @Override
      public void removed(String name) {
        synchronized (Master.this) {
          if (!isInSafeMode()) {
            _protocol.addMasterOperation(new CheckIndicesOperation());
          }
        }
      }

      @Override
      public void added(String name) {
        synchronized (Master.this) {
          if (!isMaster()) {
            return;
          }
          _protocol.addMasterOperation(new RemoveObsoleteShardsOperation(name));
          if (!isInSafeMode()) {
            _protocol.addMasterOperation(new CheckIndicesOperation());
          }
        }
      }
    });
    _protocol.addMasterOperation(new CheckIndicesOperation());
    for (String node : nodes) {
      _protocol.addMasterOperation(new RemoveObsoleteShardsOperation(node));
    }
    LOG.info("found following nodes connected: " + nodes);
  }
View Full Code Here

TOP

Related Classes of net.sf.katta.operation.master.CheckIndicesOperation

Copyright © 2018 www.massapicom. 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.