Class ProgressCounterInputStream
- java.lang.Object
-
- java.io.InputStream
-
- java.io.FilterInputStream
-
- fr.ens.biologie.genomique.eoulsan.io.ProgressCounterInputStream
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public final class ProgressCounterInputStream extends FilterInputStream
This class implements a FilterInputStream that inform Hadoop of the progress of task using counters.- Since:
- 1.0
- Author:
- Laurent Jourdren
-
-
Field Summary
-
Fields inherited from class java.io.FilterInputStream
in
-
-
Constructor Summary
Constructors Constructor Description ProgressCounterInputStream(InputStream is, org.apache.hadoop.mapreduce.Counter counter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
int
read()
int
read(byte[] b)
int
read(byte[] b, int off, int len)
-
Methods inherited from class java.io.FilterInputStream
available, mark, markSupported, reset, skip
-
Methods inherited from class java.io.InputStream
nullInputStream, readAllBytes, readNBytes, readNBytes, transferTo
-
-
-
-
Constructor Detail
-
ProgressCounterInputStream
public ProgressCounterInputStream(InputStream is, org.apache.hadoop.mapreduce.Counter counter)
-
-
Method Detail
-
read
public final int read() throws IOException
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
public final int read(byte[] b, int off, int len) throws IOException
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
read
public final int read(byte[] b) throws IOException
- Overrides:
read
in classFilterInputStream
- Throws:
IOException
-
close
public final void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Overrides:
close
in classFilterInputStream
- Throws:
IOException
-
-