InMemoryReader.java 文件源码

java
阅读 19 收藏 0 点赞 0 评论 0

项目:hadoop 作者:
public void nextRawValue(DataInputBuffer value) throws IOException {
  try {
    int pos = memDataIn.getPosition();
    byte[] data = memDataIn.getData();
    value.reset(data, pos, currentValueLength);

    // Position for the next record
    long skipped = memDataIn.skip(currentValueLength);
    if (skipped != currentValueLength) {
      throw new IOException("Rec# " + recNo + 
          ": Failed to skip past value of length: " + 
          currentValueLength);
    }
    // Record the byte
    bytesRead += currentValueLength;

    ++recNo;
  } catch (IOException ioe) {
    dumpOnError();
    throw ioe;
  }
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号