Package org.apache.accumulo.master.EventCoordinator

Examples of org.apache.accumulo.master.EventCoordinator.Listener


      zoo.putPersistentData(path, "forced down".getBytes(Constants.UTF8), NodeExistsPolicy.OVERWRITE);
      return null;
    }
   
    // TODO move this to isReady() and drop while loop? - ACCUMULO-1259
    Listener listener = master.getEventCoordinator().getListener();
    master.shutdownTServer(server);
    while (master.onlineTabletServers().contains(server)) {
      TServerConnection connection = master.getConnection(server);
      if (connection != null) {
        try {
          TabletServerStatus status = connection.getTableMap(false);
          if (status.tableMap != null && status.tableMap.isEmpty()) {
            log.info("tablet server hosts no tablets " + server);
            connection.halt(master.getMasterLock());
            log.info("tablet server asked to halt " + server);
            break;
          }
        } catch (TTransportException ex) {
          // expected
        } catch (Exception ex) {
          log.error("Error talking to tablet server " + server + ": " + ex);
        }
      }
      listener.waitForEvents(1000);
    }
   
    return null;
  }
View Full Code Here

TOP

Related Classes of org.apache.accumulo.master.EventCoordinator.Listener

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.