Package org.apache.hadoop.fs

Examples of org.apache.hadoop.fs.PositionedReadable


    @Override
    // IOMapperBase
    public Long doIO(Reporter reporter, String name, long totalSize // in bytes
    ) throws IOException {
      PositionedReadable in = (PositionedReadable) this.stream;
      long actualSize = 0;
      for (long pos = nextOffset(-1); actualSize < totalSize; pos = nextOffset(pos)) {
        int curSize = in.read(pos, buffer, 0, bufferSize);
        if (curSize < 0)
          break;
        actualSize += curSize;
        reporter.setStatus("reading " + name + "@" + actualSize + "/" + totalSize + " ::host = "
            + hostName);
View Full Code Here

TOP

Related Classes of org.apache.hadoop.fs.PositionedReadable

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.