org.apache.hadoop.hbase.mapreduce
Class MultiTableOutputFormat.MultiTableRecordWriter
java.lang.Object
org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,org.apache.hadoop.io.Writable>
org.apache.hadoop.hbase.mapreduce.MultiTableOutputFormat.MultiTableRecordWriter
- Enclosing class:
- MultiTableOutputFormat
protected static class MultiTableOutputFormat.MultiTableRecordWriter
- extends org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,org.apache.hadoop.io.Writable>
Record writer for outputting to multiple HTables.
Method Summary |
void |
close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
|
void |
write(ImmutableBytesWritable tableName,
org.apache.hadoop.io.Writable action)
Writes an action (Put or Delete) to the specified table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MultiTableOutputFormat.MultiTableRecordWriter
public MultiTableOutputFormat.MultiTableRecordWriter(org.apache.hadoop.conf.Configuration conf,
boolean useWriteAheadLogging)
- Parameters:
conf
- HBaseConfiguration to useduseWriteAheadLogging
- whether to use write ahead logging. This can be turned off (
false) to improve performance when bulk loading data.
close
public void close(org.apache.hadoop.mapreduce.TaskAttemptContext context)
throws IOException
- Specified by:
close
in class org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,org.apache.hadoop.io.Writable>
- Throws:
IOException
write
public void write(ImmutableBytesWritable tableName,
org.apache.hadoop.io.Writable action)
throws IOException
- Writes an action (Put or Delete) to the specified table.
- Specified by:
write
in class org.apache.hadoop.mapreduce.RecordWriter<ImmutableBytesWritable,org.apache.hadoop.io.Writable>
- Parameters:
tableName
- the table being updated.action
- the update, either a put or a delete.
- Throws:
IllegalArgumentException
- if the action is not a put or a delete.
IOException
Copyright © 2011 The Apache Software Foundation. All Rights Reserved.