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. ThisOutputFormat
accepts keys and values of typeText
(for a table name) andMutation
from the Map and Reduce functions. Configured with fluent API usingconfigure()
. 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
Constructors Constructor Description AccumuloOutputFormat()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext job)
static OutputFormatBuilder.ClientParams<org.apache.hadoop.mapreduce.Job>
configure()
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)
-
-
-
Method Detail
-
checkOutputSpecs
public void checkOutputSpecs(org.apache.hadoop.mapreduce.JobContext job) throws IOException
- 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
public static OutputFormatBuilder.ClientParams<org.apache.hadoop.mapreduce.Job> configure()
Sets all the information required for this map reduce job.
-
-