public static class TaskLog.Reader extends InputStream
Constructor and Description |
---|
Reader(TaskAttemptID taskid,
TaskLog.LogName kind,
long start,
long end,
boolean isCleanup)
Read a log file from start to end positions.
|
Modifier and Type | Method and Description |
---|---|
int |
available() |
void |
close() |
int |
read() |
int |
read(byte[] buffer,
int offset,
int length) |
mark, markSupported, read, reset, skip
public Reader(TaskAttemptID taskid, TaskLog.LogName kind, long start, long end, boolean isCleanup) throws IOException
taskid
- the id of the task to read the log file forkind
- the kind of log to readstart
- the offset to read from (negative is relative to tail)end
- the offset to read upto (negative is relative to tail)isCleanup
- whether the attempt is cleanup attempt or notIOException
public int read() throws IOException
read
in class InputStream
IOException
public int read(byte[] buffer, int offset, int length) throws IOException
read
in class InputStream
IOException
public int available() throws IOException
available
in class InputStream
IOException
public void close() throws IOException
close
in interface Closeable
close
in interface AutoCloseable
close
in class InputStream
IOException
Copyright © 2016 Apache Software Foundation. All Rights Reserved.