@InterfaceAudience.Public public class TableOutputFormat extends org.apache.hadoop.mapred.FileOutputFormat<ImmutableBytesWritable,Put>
Modifier and Type | Class and Description |
---|---|
protected static class |
TableOutputFormat.TableRecordWriter
Convert Reduce output (key, value) to (HStoreKey, KeyedDataArrayWritable) and write to an HBase
table.
|
Modifier and Type | Field and Description |
---|---|
static String |
OUTPUT_TABLE
JobConf parameter that specifies the output table
|
Constructor and Description |
---|
TableOutputFormat() |
Modifier and Type | Method and Description |
---|---|
void |
checkOutputSpecs(org.apache.hadoop.fs.FileSystem ignored,
org.apache.hadoop.mapred.JobConf job) |
org.apache.hadoop.mapred.RecordWriter |
getRecordWriter(org.apache.hadoop.fs.FileSystem ignored,
org.apache.hadoop.mapred.JobConf job,
String name,
org.apache.hadoop.util.Progressable progress)
Creates a new record writer.
|
public static final String OUTPUT_TABLE
public TableOutputFormat()
public org.apache.hadoop.mapred.RecordWriter getRecordWriter(org.apache.hadoop.fs.FileSystem ignored, org.apache.hadoop.mapred.JobConf job, String name, org.apache.hadoop.util.Progressable progress) throws IOException
RecordWriter
per job but in HBase, it is more natural if we give you a new
RecordWriter per call of this method. You must close the returned RecordWriter when done.
Failure to do so will drop writes.getRecordWriter
in interface org.apache.hadoop.mapred.OutputFormat<ImmutableBytesWritable,Put>
getRecordWriter
in class org.apache.hadoop.mapred.FileOutputFormat<ImmutableBytesWritable,Put>
ignored
- Ignored filesystemjob
- Current JobConfname
- Name of the job n * @return The newly created writer instance.IOException
- When creating the writer fails.public void checkOutputSpecs(org.apache.hadoop.fs.FileSystem ignored, org.apache.hadoop.mapred.JobConf job) throws org.apache.hadoop.fs.FileAlreadyExistsException, org.apache.hadoop.mapred.InvalidJobConfException, IOException
checkOutputSpecs
in interface org.apache.hadoop.mapred.OutputFormat<ImmutableBytesWritable,Put>
checkOutputSpecs
in class org.apache.hadoop.mapred.FileOutputFormat<ImmutableBytesWritable,Put>
org.apache.hadoop.fs.FileAlreadyExistsException
org.apache.hadoop.mapred.InvalidJobConfException
IOException
Copyright © 2007–2020 The Apache Software Foundation. All rights reserved.