public class CompressedSplitLineReader extends SplitLineReader
Constructor and Description |
---|
CompressedSplitLineReader(org.apache.hadoop.io.compress.SplitCompressionInputStream in,
org.apache.hadoop.conf.Configuration conf,
byte[] recordDelimiterBytes) |
Modifier and Type | Method and Description |
---|---|
protected int |
fillBuffer(InputStream in,
byte[] buffer,
boolean inDelimiter) |
boolean |
needAdditionalRecordAfterSplit() |
int |
readDefaultLine(NonSyncByteArrayOutputStream str,
ArrayList<Integer> offsets,
int maxLineLength,
int maxBytesToConsume)
Read a line terminated by one of CR, LF, or CRLF.
|
int |
readLine(org.apache.hadoop.io.Text str,
int maxLineLength,
int maxBytesToConsume)
Read one line from the InputStream into the given Text.
|
close, readLine, readLine, reset
public CompressedSplitLineReader(org.apache.hadoop.io.compress.SplitCompressionInputStream in, org.apache.hadoop.conf.Configuration conf, byte[] recordDelimiterBytes) throws IOException
IOException
protected int fillBuffer(InputStream in, byte[] buffer, boolean inDelimiter) throws IOException
fillBuffer
in class LineReader
IOException
public int readLine(org.apache.hadoop.io.Text str, int maxLineLength, int maxBytesToConsume) throws IOException
LineReader
readLine
in class LineReader
str
- the object to store the given line (without newline)maxLineLength
- the maximum number of bytes to store into str;
the rest of the line is silently discarded.maxBytesToConsume
- the maximum number of bytes to consume
in this call. This is only a hint, because if the line cross
this threshold, we allow it to happen. It can overshoot
potentially by as much as one buffer length.IOException
- if the underlying stream throwspublic int readDefaultLine(NonSyncByteArrayOutputStream str, ArrayList<Integer> offsets, int maxLineLength, int maxBytesToConsume) throws IOException
LineReader
readDefaultLine
in class LineReader
IOException
public boolean needAdditionalRecordAfterSplit()
needAdditionalRecordAfterSplit
in class SplitLineReader
Copyright © 2014 Apache Software Foundation. All Rights Reserved.