public class DocumentDBRecordWriter extends org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Writable,DocumentDBWritable>
Constructor and Description |
---|
DocumentDBRecordWriter(org.apache.hadoop.conf.Configuration conf,
String host,
String key,
String dbName,
String[] collNames,
String[] rangeIndexes,
boolean upsert) |
Modifier and Type | Method and Description |
---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
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.conf.Configuration conf, String host, String key, String dbName, String[] collNames, String[] rangeIndexes, boolean upsert) throws IOException
IOException
public void write(org.apache.hadoop.io.Writable key, DocumentDBWritable value) throws IOException
write
in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Writable,DocumentDBWritable>
IOException
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext context) throws IOException, InterruptedException
close
in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Writable,DocumentDBWritable>
IOException
InterruptedException
Copyright © 2015. All rights reserved.