Class MultiTableOutputFormat.MultiTableRecordWriter
java.lang.Object
org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,Mutation>
org.apache.hadoop.hbase.mapreduce.MultiTableOutputFormat.MultiTableRecordWriter
- Enclosing class:
- MultiTableOutputFormat
protected static class MultiTableOutputFormat.MultiTableRecordWriter
extends org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,Mutation>
Record writer for outputting to multiple HTables.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) org.apache.hadoop.conf.Configuration(package private) Connectionprivate static final org.slf4j.Logger(package private) Map<ImmutableBytesWritable,BufferedMutator> (package private) boolean -
Constructor Summary
ConstructorsConstructorDescriptionMultiTableRecordWriter(org.apache.hadoop.conf.Configuration conf, boolean useWriteAheadLogging) HBaseConfiguration to used whether to use write ahead logging. -
Method Summary
Modifier and TypeMethodDescriptionvoidclose(org.apache.hadoop.mapreduce.TaskAttemptContext context) (package private) BufferedMutatorgetBufferedMutator(ImmutableBytesWritable tableName) the name of the table, as a stringvoidwrite(ImmutableBytesWritable tableName, Mutation action) Writes an action (Put or Delete) to the specified table.
-
Field Details
-
LOG
-
connection
-
mutatorMap
-
conf
org.apache.hadoop.conf.Configuration conf -
useWriteAheadLogging
boolean useWriteAheadLogging
-
-
Constructor Details
-
MultiTableRecordWriter
public MultiTableRecordWriter(org.apache.hadoop.conf.Configuration conf, boolean useWriteAheadLogging) throws IOException HBaseConfiguration to used whether to use write ahead logging. This can be turned off ( false) to improve performance when bulk loading data.- Throws:
IOException
-
-
Method Details
-
getBufferedMutator
the name of the table, as a string- Returns:
- the named mutator if there is a problem opening a table
- Throws:
IOException
-
close
- Specified by:
closein classorg.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,Mutation> - Throws:
IOException
-
write
Writes an action (Put or Delete) to the specified table. the table being updated. the update, either a put or a delete. if the action is not a put or a delete.- Specified by:
writein classorg.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,Mutation> - Throws:
IOException
-