|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.hadoop.mapreduce.OutputFormat<org.apache.hadoop.io.Text,VerticaRecord>
org.apache.hadoop.vertica.VerticaOutputFormat
public class VerticaOutputFormat
Output formatter for loading reducer output to Vertica
Constructor Summary | |
---|---|
VerticaOutputFormat()
|
Method Summary | |
---|---|
void |
checkOutputSpecs(JobContext context)
Check for validity of the output-specification for the job. |
void |
checkOutputSpecs(JobContext context,
boolean test)
Test check specs (don't connect to db) |
OutputCommitter |
getOutputCommitter(TaskAttemptContext context)
(@inheritDoc) |
RecordWriter<org.apache.hadoop.io.Text,VerticaRecord> |
getRecordWriter(TaskAttemptContext context)
Get the RecordWriter for the given task. |
static VerticaRecord |
getValue(org.apache.hadoop.conf.Configuration conf)
|
static void |
optimize(org.apache.hadoop.conf.Configuration conf)
Optionally called at the end of a job to optimize any newly created and loaded tables. |
static void |
setOutput(Job job,
String tableName)
Set the output table |
static void |
setOutput(Job job,
String tableName,
boolean dropTable)
Set the output table and whether to drop it before loading |
static void |
setOutput(Job job,
String tableName,
boolean dropTable,
String... tableDef)
Set the output table, whether to drop it before loading and the create table specification if it doesn't exist |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public VerticaOutputFormat()
Method Detail |
---|
public static void setOutput(Job job, String tableName)
job
- tableName
- public static void setOutput(Job job, String tableName, boolean dropTable)
job
- tableName
- dropTable
- public static void setOutput(Job job, String tableName, boolean dropTable, String... tableDef)
job
- tableName
- dropTable
- tableDef
- list of column definitions such as "foo int", "bar varchar(10)"public void checkOutputSpecs(JobContext context) throws IOException
This is to validate the output specification for the job when it is a job is submitted. Typically checks that it does not already exist, throwing an exception when it already exists, so that output is not overwritten.
checkOutputSpecs
in class OutputFormat<org.apache.hadoop.io.Text,VerticaRecord>
context
- information about the job
IOException
- when output should not be attemptedpublic void checkOutputSpecs(JobContext context, boolean test) throws IOException
context
- test
- true if testing
IOException
public RecordWriter<org.apache.hadoop.io.Text,VerticaRecord> getRecordWriter(TaskAttemptContext context) throws IOException
RecordWriter
for the given task.
getRecordWriter
in class OutputFormat<org.apache.hadoop.io.Text,VerticaRecord>
context
- the information about the current task.
RecordWriter
to write the output for the job.
IOException
public static VerticaRecord getValue(org.apache.hadoop.conf.Configuration conf) throws Exception
Exception
public static void optimize(org.apache.hadoop.conf.Configuration conf) throws Exception
conf
-
Exception
public OutputCommitter getOutputCommitter(TaskAttemptContext context) throws IOException, InterruptedException
getOutputCommitter
in class OutputFormat<org.apache.hadoop.io.Text,VerticaRecord>
context
- the task context
IOException
InterruptedException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |