Class 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 Detail

      • AccumuloOutputFormat

        public AccumuloOutputFormat()
    • Method Detail

      • checkOutputSpecs

        public void checkOutputSpecs​(org.apache.hadoop.mapreduce.JobContext job)
                              throws IOException
        Specified by:
        checkOutputSpecs in class org.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 class org.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 class org.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.