org.apache.tez.runtime.library.common.sort.impl
Class IFile.Reader
java.lang.Object
org.apache.tez.runtime.library.common.sort.impl.IFile.Reader
- Direct Known Subclasses:
- InMemoryReader
- Enclosing class:
- IFile
@InterfaceAudience.Private
@InterfaceStability.Unstable
public static class IFile.Reader
- extends Object
IFile.Reader to read intermediate map-outputs.
|
Constructor Summary |
IFile.Reader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file,
org.apache.hadoop.io.compress.CompressionCodec codec,
org.apache.tez.common.counters.TezCounter readsCounter,
org.apache.tez.common.counters.TezCounter bytesReadCounter,
boolean ifileReadAhead,
int ifileReadAheadLength,
int bufferSize)
Construct an IFile Reader. |
IFile.Reader(InputStream in,
long length,
org.apache.hadoop.io.compress.CompressionCodec codec,
org.apache.tez.common.counters.TezCounter readsCounter,
org.apache.tez.common.counters.TezCounter bytesReadCounter,
boolean readAhead,
int readAheadLength,
int bufferSize)
Construct an IFile Reader. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
bytesRead
public long bytesRead
fileLength
protected final long fileLength
eof
protected boolean eof
buffer
protected byte[] buffer
bufferSize
protected int bufferSize
dataIn
protected DataInputStream dataIn
recNo
protected int recNo
prevKeyLength
protected int prevKeyLength
currentKeyLength
protected int currentKeyLength
currentValueLength
protected int currentValueLength
IFile.Reader
public IFile.Reader(org.apache.hadoop.fs.FileSystem fs,
org.apache.hadoop.fs.Path file,
org.apache.hadoop.io.compress.CompressionCodec codec,
org.apache.tez.common.counters.TezCounter readsCounter,
org.apache.tez.common.counters.TezCounter bytesReadCounter,
boolean ifileReadAhead,
int ifileReadAheadLength,
int bufferSize)
throws IOException
- Construct an IFile Reader.
- Parameters:
fs - FileSystemfile - Path of the file to be opened. This file should have
checksum bytes for the data at the end of the file.codec - codecreadsCounter - Counter for records read from disk
- Throws:
IOException
IFile.Reader
public IFile.Reader(InputStream in,
long length,
org.apache.hadoop.io.compress.CompressionCodec codec,
org.apache.tez.common.counters.TezCounter readsCounter,
org.apache.tez.common.counters.TezCounter bytesReadCounter,
boolean readAhead,
int readAheadLength,
int bufferSize)
throws IOException
- Construct an IFile Reader.
- Parameters:
in - The input streamlength - Length of the data in the stream, including the checksum
bytes.codec - codecreadsCounter - Counter for records read from disk
- Throws:
IOException
getLength
public long getLength()
getPosition
public long getPosition()
throws IOException
- Throws:
IOException
positionToNextRecord
protected boolean positionToNextRecord(DataInput dIn)
throws IOException
- Throws:
IOException
nextRawKey
public boolean nextRawKey(org.apache.hadoop.io.DataInputBuffer key)
throws IOException
- Throws:
IOException
readRawKey
public IFile.Reader.KeyState readRawKey(org.apache.hadoop.io.DataInputBuffer key)
throws IOException
- Throws:
IOException
nextRawValue
public void nextRawValue(org.apache.hadoop.io.DataInputBuffer value)
throws IOException
- Throws:
IOException
close
public void close()
throws IOException
- Throws:
IOException
reset
public void reset(int offset)
disableChecksumValidation
public void disableChecksumValidation()
Copyright © 2014 Apache Software Foundation. All rights reserved.