Java 类org.apache.hadoop.util.CyclicIteration 实例源码

项目:hadoop-on-lustre    文件:DecommissionManager.java   
private void check() {
  int count = 0;
  for(Map.Entry<String, DatanodeDescriptor> entry
      : new CyclicIteration<String, DatanodeDescriptor>(
          fsnamesystem.datanodeMap, firstkey)) {
    final DatanodeDescriptor d = entry.getValue();
    firstkey = entry.getKey();

    if (d.isDecommissionInProgress()) {
      try {
        fsnamesystem.checkDecommissionStateInternal(d);
      } catch(Exception e) {
        LOG.warn("entry=" + entry, e);
      }
      if (++count == numNodesPerCheck) {
        return;
      }
    }
  }
}
项目:cumulus    文件:DecommissionManager.java   
private void check() {
  int count = 0;
  for(Map.Entry<String, DatanodeDescriptor> entry
      : new CyclicIteration<String, DatanodeDescriptor>(
          fsnamesystem.datanodeMap, firstkey)) {
    final DatanodeDescriptor d = entry.getValue();
    firstkey = entry.getKey();

    if (d.isDecommissionInProgress()) {
      try {
        fsnamesystem.checkDecommissionStateInternal(d);
      } catch(Exception e) {
        LOG.warn("entry=" + entry, e);
      }
      if (++count == numNodesPerCheck) {
        return;
      }
    }
  }
}
项目:hadoop-0.20    文件:DecommissionManager.java   
private void check() {
  int count = 0;
  for(Map.Entry<String, DatanodeDescriptor> entry
      : new CyclicIteration<String, DatanodeDescriptor>(
          fsnamesystem.datanodeMap, firstkey)) {
    final DatanodeDescriptor d = entry.getValue();
    firstkey = entry.getKey();

    if (d.isDecommissionInProgress()) {
      try {
        fsnamesystem.checkDecommissionStateInternal(d);
      } catch(Exception e) {
        LOG.warn("entry=" + entry, e);
      }
      if (++count == numNodesPerCheck) {
        return;
      }
    }
  }
}
项目:hortonworks-extension    文件:DecommissionManager.java   
private void check() {
  int count = 0;
  for(Map.Entry<String, DatanodeDescriptor> entry
      : new CyclicIteration<String, DatanodeDescriptor>(
          fsnamesystem.datanodeMap, firstkey)) {
    final DatanodeDescriptor d = entry.getValue();
    firstkey = entry.getKey();

    if (d.isDecommissionInProgress()) {
      try {
        fsnamesystem.checkDecommissionStateInternal(d);
      } catch(Exception e) {
        LOG.warn("entry=" + entry, e);
      }
      if (++count == numNodesPerCheck) {
        return;
      }
    }
  }
}
项目:hortonworks-extension    文件:DecommissionManager.java   
private void check() {
  int count = 0;
  for(Map.Entry<String, DatanodeDescriptor> entry
      : new CyclicIteration<String, DatanodeDescriptor>(
          fsnamesystem.datanodeMap, firstkey)) {
    final DatanodeDescriptor d = entry.getValue();
    firstkey = entry.getKey();

    if (d.isDecommissionInProgress()) {
      try {
        fsnamesystem.checkDecommissionStateInternal(d);
      } catch(Exception e) {
        LOG.warn("entry=" + entry, e);
      }
      if (++count == numNodesPerCheck) {
        return;
      }
    }
  }
}
项目:hadoop-gpu    文件:DecommissionManager.java   
private void check() {
  int count = 0;
  for(Map.Entry<String, DatanodeDescriptor> entry
      : new CyclicIteration<String, DatanodeDescriptor>(
          fsnamesystem.datanodeMap, firstkey)) {
    final DatanodeDescriptor d = entry.getValue();
    firstkey = entry.getKey();

    if (d.isDecommissionInProgress()) {
      try {
        fsnamesystem.checkDecommissionStateInternal(d);
      } catch(Exception e) {
        LOG.warn("entry=" + entry, e);
      }
      if (++count == numNodesPerCheck) {
        return;
      }
    }
  }
}