public class DocumentDBRecordWriter extends Object implements org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.Writable,DocumentDBWritable>
| Constructor and Description |
|---|
DocumentDBRecordWriter(org.apache.hadoop.mapred.JobConf conf,
String host,
String key,
String dbName,
String[] collNames,
String[] rangeIndexes,
boolean upsert) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(org.apache.hadoop.mapred.Reporter reporter)
Writes the last batch of documents that are being cached.
|
void |
write(org.apache.hadoop.io.Writable key,
DocumentDBWritable value)
Writes data to DocumentDB if the cached documents reach the maximum cache size.
|
public DocumentDBRecordWriter(org.apache.hadoop.mapred.JobConf conf,
String host,
String key,
String dbName,
String[] collNames,
String[] rangeIndexes,
boolean upsert)
throws IOException
IOExceptionpublic void close(org.apache.hadoop.mapred.Reporter reporter)
throws IOException
close in interface org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.Writable,DocumentDBWritable>IOExceptionpublic void write(org.apache.hadoop.io.Writable key,
DocumentDBWritable value)
throws IOException
write in interface org.apache.hadoop.mapred.RecordWriter<org.apache.hadoop.io.Writable,DocumentDBWritable>IOExceptionCopyright © 2015. All rights reserved.