Examples of EpochPBImpl


Examples of org.apache.hadoop.yarn.server.resourcemanager.recovery.records.impl.pb.EpochPBImpl

    String epochNodePath = getNodePath(zkRootNodePath, EPOCH_NODE);
    int currentEpoch = 0;
    if (existsWithRetries(epochNodePath, true) != null) {
      // load current epoch
      byte[] data = getDataWithRetries(epochNodePath, true);
      Epoch epoch = new EpochPBImpl(EpochProto.parseFrom(data));
      currentEpoch = epoch.getEpoch();
      // increment epoch and store it
      byte[] storeData = Epoch.newInstance(currentEpoch + 1).getProto()
          .toByteArray();
      setDataWithRetries(epochNodePath, storeData, -1);
    } else {
View Full Code Here

Examples of org.apache.hadoop.yarn.server.resourcemanager.recovery.records.impl.pb.EpochPBImpl

    int currentEpoch = 0;
    if (fs.exists(epochNodePath)) {
      // load current epoch
      FileStatus status = fs.getFileStatus(epochNodePath);
      byte[] data = readFile(epochNodePath, status.getLen());
      Epoch epoch = new EpochPBImpl(EpochProto.parseFrom(data));
      currentEpoch = epoch.getEpoch();
      // increment epoch and store it
      byte[] storeData = Epoch.newInstance(currentEpoch + 1).getProto()
          .toByteArray();
      updateFile(epochNodePath, storeData);
    } else {
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.