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
Modifier and TypeFieldDescription(package private) org.apache.hadoop.conf.Configuration
(package private) Connection
private static final org.slf4j.Logger
(package private) Map<ImmutableBytesWritable,
BufferedMutator> (package private) boolean
-
Constructor Summary
ConstructorDescriptionMultiTableRecordWriter
(org.apache.hadoop.conf.Configuration conf, boolean useWriteAheadLogging) HBaseConfiguration to used whether to use write ahead logging. -
Method Summary
Modifier and TypeMethodDescriptionvoid
close
(org.apache.hadoop.mapreduce.TaskAttemptContext context) (package private) BufferedMutator
getBufferedMutator
(ImmutableBytesWritable tableName) the name of the table, as a stringvoid
write
(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:
close
in 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:
write
in classorg.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,
Mutation> - Throws:
IOException
-