Package org.apache.hadoop.raid.StripeStore

Examples of org.apache.hadoop.raid.StripeStore.StripeInfo


      if (codec.isDirRaid) {
        HashMap<Block, StripeInfo> stripeMapping = new HashMap<Block, StripeInfo>();
        HashMap<StripeInfo, Integer> stripeMappingNum =
            new HashMap<StripeInfo, Integer>();
        for (Block blk : blks) {
          StripeInfo newSi = stripeStore.getStripe(codec, blk);
          assertNotNull(newSi);
          if (stripeMapping.containsKey(blk)) {
            StripeInfo si = stripeMapping.get(blk);
            assertEquals(si.parityBlocks, newSi.parityBlocks);
            assertEquals(si.srcBlocks, newSi.srcBlocks);
            Integer num = stripeMappingNum.get(si);
            stripeMappingNum.put(si, num + 1);
          } else {
View Full Code Here


   */
  public StripeInfo retrieveStripe(Block lostBlock, Path p,
      long lostBlockOffset, FileSystem fs, Context context,
      boolean online)
          throws IOException {
    StripeInfo si = null;
    if (stripeStore != null) {
      IOException caughtException = null;
      try {
        si = stripeStore.getStripe(codec, lostBlock);
      } catch (IOException ioe) {
View Full Code Here

          srcPath, lostBlockOffset, srcFs, context);
      if (abortReconstruction(oldCRC, decoder)) {
        blocksLostChecksum.add(lostBlock);
        continue;
      }
      StripeInfo si = decoder.retrieveStripe(lostBlock,
          srcPath, lostBlockOffset, srcFs, context, false);
      if (si == null && decoder.stripeStore != null) {
        blocksLostStripe.add(lostBlock);
        continue;
      }
View Full Code Here

          parityPath, lostBlockOffset, parityFs, context);
      if (abortReconstruction(oldCRC, decoder)) {
        blocksLostChecksum.add(lostBlock);
        continue;
      }
      StripeInfo si = decoder.retrieveStripe(lostBlock,
          srcPath, lostBlockOffset, srcFs, context, false);
      if (si == null && decoder.stripeStore != null) {
        blocksLostStripe.add(lostBlock);
        continue;
      }
View Full Code Here

        lss.initialize(localConf, false, dfs);
        Set<List<Block>> corruptCandidates =
            new HashSet<List<Block>>(lss.stripeSet.keySet());
        for (List<Block> lb : corruptCandidates) {
          for (Codec codec : Codec.getCodecs()) {
            StripeInfo si = lss.getStripe(codec, lb.get(0));
            if (si == null) {
              continue;
            }
            String oldSi = si.toString();
            Collections.rotate(si.parityBlocks, 1);
            Collections.rotate(si.srcBlocks, 1);
            lss.putStripe(codec, si.parityBlocks, si.srcBlocks);
            String newSi = lss.getStripe(codec, lb.get(0)).toString();
            LOG.info("Corrupt the stripe info old : " + oldSi +
View Full Code Here

              long corruptOffset,
              long limit,
              boolean useStripeStore)
              throws IOException {
    boolean recoverFromStripeInfo = false;
    StripeInfo si = null;
    FileSystem srcFs = srcPath.getFileSystem(conf);
    Decoder decoder = new Decoder(conf, codec);
    // Test if parity file exists
    if (parityFilePair == null) {
      if (codec.isDirRaid && useStripeStore) {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.raid.StripeStore.StripeInfo

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.