Class AccumuloOutputFormat
java.lang.Object
org.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.Text,Mutation>
org.apache.accumulo.hadoop.mapreduce.AccumuloOutputFormat
public class AccumuloOutputFormat
extends org.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.Text,Mutation>
This class allows MapReduce jobs to use Accumulo as the sink for data. This
OutputFormat
accepts keys and values of type Text
(for a table name) and Mutation
from the Map
and Reduce functions. Configured with fluent API using configure()
.
Here is an example with all possible options:
AccumuloOutputFormat.configure().clientProperties(props).batchWriterOptions(bwConfig) .defaultTable(name).createTables(true) // disabled by default .simulationMode(true) // disabled by default .store(job);
- Since:
- 2.0
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
checkOutputSpecs
(org.apache.hadoop.mapreduce.JobContext job) static OutputFormatBuilder.ClientParams<org.apache.hadoop.mapreduce.Job>
Sets all the information required for this map reduce job.org.apache.hadoop.mapreduce.OutputCommitter
getOutputCommitter
(org.apache.hadoop.mapreduce.TaskAttemptContext context) org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,
Mutation> getRecordWriter
(org.apache.hadoop.mapreduce.TaskAttemptContext attempt)
-
Constructor Details
-
AccumuloOutputFormat
public AccumuloOutputFormat()
-
-
Method Details
-
checkOutputSpecs
- Specified by:
checkOutputSpecs
in classorg.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.Text,
Mutation> - Throws:
IOException
-
getOutputCommitter
public org.apache.hadoop.mapreduce.OutputCommitter getOutputCommitter(org.apache.hadoop.mapreduce.TaskAttemptContext context) - Specified by:
getOutputCommitter
in classorg.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.Text,
Mutation>
-
getRecordWriter
public org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.io.Text,Mutation> getRecordWriter(org.apache.hadoop.mapreduce.TaskAttemptContext attempt) throws IOException - Specified by:
getRecordWriter
in classorg.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.Text,
Mutation> - Throws:
IOException
-
configure
Sets all the information required for this map reduce job.
-