T
- The input type of this sourcepublic class DataBaseSource<T extends org.apache.hadoop.mapreduce.lib.db.DBWritable & org.apache.hadoop.io.Writable> extends Object implements Source<T>
DBInputFormat
.
A type that is input via this class must be a Writable that also implements
DBWritable. On the DBWritable.readFields(java.sql.ResultSet)
method
needs to be fully implemented form DBWritable
.
Modifier and Type | Field and Description |
---|---|
String |
countClause |
Modifier and Type | Method and Description |
---|---|
void |
configureSource(org.apache.hadoop.mapreduce.Job job,
int inputId)
Configure the given job to use this source as an input.
|
long |
getSize(org.apache.hadoop.conf.Configuration configuration)
Returns the number of bytes in this
Source . |
PType<T> |
getType()
Returns the
PType for this source. |
public String countClause
public void configureSource(org.apache.hadoop.mapreduce.Job job, int inputId) throws IOException
Source
configureSource
in interface Source<T extends org.apache.hadoop.mapreduce.lib.db.DBWritable & org.apache.hadoop.io.Writable>
job
- The job to configureinputId
- For a multi-input job, an identifier for this input to the jobIOException
public long getSize(org.apache.hadoop.conf.Configuration configuration)
Source
Source
.Copyright © 2013 The Apache Software Foundation. All Rights Reserved.