Package org.apache.hadoop.raid.BlockReconstructor

Examples of org.apache.hadoop.raid.BlockReconstructor.CorruptBlockReconstructor


                e instanceof ChecksumException) && codec.isDirRaid) {
              if (retry <= 0) {
                throw e;
              }
              redo = true;
              CorruptBlockReconstructor constructor =
                  new CorruptBlockReconstructor(conf);
             
              Set<Path> srcPaths = new HashSet<Path>();
              for (int idx : errorLocations) {
                Path srcPath = stripeInputInfo.getSrcPaths()[idx];
                if (srcPath != null) {
                  srcPaths.add(srcPath);
                }
              }
            
              for (Path srcPath : srcPaths) {
                Decoder decoder = new Decoder(conf, codec);
                decoder.connectToStore(srcPath);
                LOG.info("In Encoding: try to reconstruct the file: " + srcPath);
                // will throw exception if it fails to reconstruct the lost
                // blocks.
                constructor.processFile(srcPath, null, decoder, true, null);
                LOG.info("In Encoding: finished to reconstruct the file: " + srcPath);
              }
            } else {
              throw e;
            }
View Full Code Here

TOP

Related Classes of org.apache.hadoop.raid.BlockReconstructor.CorruptBlockReconstructor

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.