public class LineBreakAccessor extends HdfsSplittableDataAccessor implements WriteAccessor
data, inputFormat, iter, jobConf, key, reader
Constructor and Description |
---|
LineBreakAccessor(InputData input)
Constructs a LineReaderAccessor.
|
Modifier and Type | Method and Description |
---|---|
void |
closeForWrite()
Closes the output stream after done writing.
|
protected java.lang.Object |
getReader(org.apache.hadoop.mapred.JobConf jobConf,
org.apache.hadoop.mapred.InputSplit split)
Specialized accessors will override this method and implement their own
recordReader.
|
boolean |
openForWrite()
Opens file for write.
|
boolean |
writeNextObject(OneRow onerow)
Writes row into stream.
|
closeForRead, getNextSplit, isThreadSafe, openForRead, readNextObject
public LineBreakAccessor(InputData input)
input
- all input parameters coming from the client requestprotected java.lang.Object getReader(org.apache.hadoop.mapred.JobConf jobConf, org.apache.hadoop.mapred.InputSplit split) throws java.io.IOException
HdfsSplittableDataAccessor
getReader
in class HdfsSplittableDataAccessor
jobConf
- the hadoop jobconf to use for the selected InputFormatsplit
- the input split to be read by the accessorjava.io.IOException
- if recordreader could not be createdpublic boolean openForWrite() throws java.lang.Exception
openForWrite
in interface WriteAccessor
java.lang.Exception
- if opening the resource failedpublic boolean writeNextObject(OneRow onerow) throws java.lang.Exception
writeNextObject
in interface WriteAccessor
onerow
- the object to be writtenjava.lang.Exception
- writing to the resource failedpublic void closeForWrite() throws java.lang.Exception
closeForWrite
in interface WriteAccessor
java.lang.Exception
- if closing the resource failed