protected static class MultiTableOutputFormat.MultiTableRecordWriter
extends org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Mutation>
| Constructor and Description |
|---|
MultiTableRecordWriter(org.apache.hadoop.conf.Configuration conf,
boolean useWriteAheadLogging) |
| Modifier and Type | Method and Description |
|---|---|
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext context) |
void |
write(org.apache.hadoop.hbase.io.ImmutableBytesWritable tableName,
org.apache.hadoop.hbase.client.Mutation action)
Writes an action (Put or Delete) to the specified table.
|
public MultiTableRecordWriter(org.apache.hadoop.conf.Configuration conf,
boolean useWriteAheadLogging)
throws IOException
conf - HBaseConfiguration to useduseWriteAheadLogging - whether to use write ahead logging. This can be turned off (
false) to improve performance when bulk loading data.IOExceptionpublic void close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
close in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.Mutation>IOExceptionpublic void write(org.apache.hadoop.hbase.io.ImmutableBytesWritable tableName,
org.apache.hadoop.hbase.client.Mutation action)
throws IOException
write in class org.apache.hadoop.mapreduce.RecordWriter<org.apache.hadoop.hbase.io.ImmutableBytesWritable,org.apache.hadoop.hbase.client.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–2020 The Apache Software Foundation. All rights reserved.