Examples of MasterMetaData


Examples of net.sf.katta.protocol.metadata.MasterMetaData

    String zkMasterPath = _zkConf.getZkPath(PathDef.MASTER);
    cleanupOldMasterData(masterName, zkMasterPath);

    boolean isMaster;
    try {
      createEphemeral(master, zkMasterPath, new MasterMetaData(masterName, System.currentTimeMillis()));
      isMaster = true;
      LOG.info(masterName + " started as master");
    } catch (ZkNodeExistsException e) {
      registerDataListener(master, new IZkDataListener() {
        @Override
View Full Code Here

Examples of net.sf.katta.protocol.metadata.MasterMetaData

    return queue;
  }

  private void cleanupOldMasterData(final String masterName, String zkMasterPath) {
    if (_zkClient.exists(zkMasterPath)) {
      final MasterMetaData existingMaster = _zkClient.readData(zkMasterPath);
      if (existingMaster.getMasterName().equals(masterName)) {
        LOG.warn("detected old master entry pointing to this host - deleting it..");
        _zkClient.delete(zkMasterPath);
      }
    }
  }
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.