Package org.apache.hadoop.mapreduce
Class RecordWriter<K,V>
java.lang.Object
org.apache.hadoop.mapreduce.RecordWriter<K,V>
RecordWriter writes the output <key, value> pairs
to an output file.
RecordWriter implementations write the job outputs to the
FileSystem.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionabstract voidclose(TaskAttemptContext context) Close thisRecordWriterto future operations.abstract voidWrites a key/value pair.
-
Constructor Details
-
RecordWriter
public RecordWriter()
-
-
Method Details
-
write
Writes a key/value pair.- Parameters:
key- the key to write.value- the value to write.- Throws:
IOExceptionInterruptedException
-
close
Close thisRecordWriterto future operations.- Parameters:
context- the context of the task- Throws:
IOExceptionInterruptedException
-