Package org.apache.hadoop.raid

Examples of org.apache.hadoop.raid.ParallelStreamReader


          if (tmpList.size() == 0) {
            continue;
          }
         
          InputStream[] streams = tmpList.toArray(new InputStream[] {});
          ParallelStreamReader reader = null;
          try {
            reader = new ParallelStreamReader(
                reporter, streams,
                limit, 4, 2, limit);
            reader.start();
            int readNum = 0;
            while (readNum < limit) {
              ReadResult result = reader.getReadResult();
              for (IOException ex : result.ioExceptions) {
                if (ex != null) {
                  LOG.warn("Encounter exception when checking file: " + srcPath +
                      ", " + ex.getMessage());
                  return false;
                }
              }
              readNum += result.readBufs[0].length;
            }
          } finally {
            if (null != reader) {
              reader.shutdown();
            }
            reporter.progress();
          }
        }
      } finally {
View Full Code Here

TOP

Related Classes of org.apache.hadoop.raid.ParallelStreamReader

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.