Class FastqLineRecordReader
- java.lang.Object
-
- org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
-
- fr.ens.biologie.genomique.eoulsan.bio.io.hadoop.FastqLineRecordReader
-
- All Implemented Interfaces:
Closeable
,AutoCloseable
public class FastqLineRecordReader extends org.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
Treats keys as offset in file and value as line.
-
-
Field Summary
Fields Modifier and Type Field Description static String
MAX_LINE_LENGTH
-
Constructor Summary
Constructors Constructor Description FastqLineRecordReader()
FastqLineRecordReader(byte[] recordDelimiter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
close()
org.apache.hadoop.io.LongWritable
getCurrentKey()
org.apache.hadoop.io.Text
getCurrentValue()
float
getProgress()
Get the progress within the splitvoid
initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context)
boolean
nextKeyValue()
boolean
nextKeyValue(boolean cont)
-
-
-
Field Detail
-
MAX_LINE_LENGTH
public static final String MAX_LINE_LENGTH
- See Also:
- Constant Field Values
-
-
Method Detail
-
initialize
public void initialize(org.apache.hadoop.mapreduce.InputSplit genericSplit, org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException
- Specified by:
initialize
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
-
nextKeyValue
public boolean nextKeyValue() throws IOException
- Specified by:
nextKeyValue
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
-
nextKeyValue
public boolean nextKeyValue(boolean cont) throws IOException
- Throws:
IOException
-
getCurrentKey
public org.apache.hadoop.io.LongWritable getCurrentKey()
- Specified by:
getCurrentKey
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
-
getCurrentValue
public org.apache.hadoop.io.Text getCurrentValue()
- Specified by:
getCurrentValue
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
-
getProgress
public float getProgress() throws IOException
Get the progress within the split- Specified by:
getProgress
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
-
close
public void close() throws IOException
- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
- Specified by:
close
in classorg.apache.hadoop.mapreduce.RecordReader<org.apache.hadoop.io.LongWritable,org.apache.hadoop.io.Text>
- Throws:
IOException
-
-