Package org.apache.hadoop.raid.DirectoryStripeReader

Examples of org.apache.hadoop.raid.DirectoryStripeReader.BlockInfo


    assertNotNull(lfs);
    for (int fid = 0; fid < lfs.size(); fid++) {
      FileStatus fsStat = lfs.get(fid);
      long numBlock = RaidNode.getNumBlocks(fsStat);
      for (int bid = 0; bid < numBlock; bid++) {
        blocks.add(new BlockInfo(fid, bid));
      }
      lengths[fid] = fsStat.getLen();
    }
    HashSet<Integer> affectedFiles = new HashSet<Integer>();
    HashSet<Integer> affectedBlocks = new HashSet<Integer>();
    // corrupt blocks
    for (int blockNumToCorrupt : listBlockNumToCorrupt) {
      if (blockNumToCorrupt >= blocks.size()) {
        continue;
      }
      BlockInfo bi = null;
      int blockIndex = blockNumToCorrupt;
      if (blockNumToCorrupt < 0) {
        blockIndex = blocks.size() + blockNumToCorrupt;
        if (blockIndex < 0) {
          continue;
View Full Code Here


      sourceEnd = Math.min(sourceStart + stripeLength, sourceBlocks.size());
    } else {
      // cache the candidate blocks.
      BlockInfo[] tmpStripe = new BlockInfo[stripeLength];
      for (int i = 0; i < stripeLength; i++) {
        tmpStripe[i] = new BlockInfo(0, 0);
      }
      int curIdx = 0;
      boolean found = false;

      sourceBlocks = new ArrayList<LocatedBlock>();
View Full Code Here

    assertNotNull(lfs);
    for (int fid = 0; fid < lfs.size(); fid++) {
      FileStatus fsStat = lfs.get(fid);
      long numBlock = RaidNode.getNumBlocks(fsStat);
      for (int bid = 0; bid < numBlock; bid++) {
        blocks.add(new BlockInfo(fid, bid));
      }
      lengths[fid] = fsStat.getLen();
    }
    HashSet<Integer> affectedFiles = new HashSet<Integer>();
    HashSet<Integer> affectedBlocks = new HashSet<Integer>();
    // corrupt blocks
    for (int blockNumToCorrupt : listBlockNumToCorrupt) {
      if (blockNumToCorrupt >= blocks.size()) {
        continue;
      }
      BlockInfo bi = null;
      int blockIndex = blockNumToCorrupt;
      if (blockNumToCorrupt < 0) {
        blockIndex = blocks.size() + blockNumToCorrupt;
        if (blockIndex < 0) {
          continue;
View Full Code Here

TOP

Related Classes of org.apache.hadoop.raid.DirectoryStripeReader.BlockInfo

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.