protected static class MultiTableOutputFormat.MultiTableRecordWriter extends org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,Mutation>
| Modifier and Type | Field and Description |
|---|---|
(package private) org.apache.hadoop.conf.Configuration |
conf |
(package private) Connection |
connection |
private static org.apache.commons.logging.Log |
LOG |
(package private) Map<ImmutableBytesWritable,BufferedMutator> |
mutatorMap |
(package private) boolean |
useWriteAheadLogging |
| Constructor and Description |
|---|
MultiTableOutputFormat.MultiTableRecordWriter(org.apache.hadoop.conf.Configuration conf,
boolean useWriteAheadLogging) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext context) |
(package private) BufferedMutator |
getBufferedMutator(ImmutableBytesWritable tableName) |
void |
write(ImmutableBytesWritable tableName,
Mutation action)
Writes an action (Put or Delete) to the specified table.
|
private static final org.apache.commons.logging.Log LOG
Connection connection
Map<ImmutableBytesWritable,BufferedMutator> mutatorMap
org.apache.hadoop.conf.Configuration conf
boolean useWriteAheadLogging
public MultiTableOutputFormat.MultiTableRecordWriter(org.apache.hadoop.conf.Configuration conf,
boolean useWriteAheadLogging)
conf - HBaseConfiguration to useduseWriteAheadLogging - whether to use write ahead logging. This can be turned off (
false) to improve performance when bulk loading data.BufferedMutator getBufferedMutator(ImmutableBytesWritable tableName) throws IOException
tableName - the name of the table, as a stringIOException - if there is a problem opening a tablepublic void close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
close in class org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,Mutation>IOExceptionpublic void write(ImmutableBytesWritable tableName, Mutation action) throws IOException
write in class org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,Mutation>tableName - the table being updated.action - the update, either a put or a delete.IllegalArgumentException - if the action is not a put or a delete.IOExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.