OUT - public class JDBCInputFormat<OUT extends Tuple> extends Object implements InputFormat<OUT,InputSplit>, NonParallelInput
Tuple,
DriverManager,
Serialized Form| Modifier and Type | Class and Description |
|---|---|
static class |
JDBCInputFormat.JDBCInputFormatBuilder |
| Constructor and Description |
|---|
JDBCInputFormat() |
| Modifier and Type | Method and Description |
|---|---|
static JDBCInputFormat.JDBCInputFormatBuilder |
buildJDBCInputFormat()
A builder used to set parameters to the output format's configuration in a fluent way.
|
void |
close()
Closes all resources used.
|
void |
configure(Configuration parameters) |
InputSplit[] |
createInputSplits(int minNumSplits) |
InputSplitAssigner |
getInputSplitAssigner(InputSplit[] inputSplits) |
BaseStatistics |
getStatistics(BaseStatistics cachedStatistics) |
OUT |
nextRecord(OUT tuple)
Stores the next resultSet row in a tuple
|
void |
open(InputSplit ignored)
Connects to the source database and executes the query.
|
boolean |
reachedEnd()
Checks whether all data has been read.
|
public void configure(Configuration parameters)
configure in interface InputFormat<OUT extends Tuple,InputSplit>public void open(InputSplit ignored) throws IOException
open in interface InputFormat<OUT extends Tuple,InputSplit>ignored - IOExceptionpublic void close()
throws IOException
close in interface InputFormat<OUT extends Tuple,InputSplit>IOException - Indicates that a resource could not be closed.public boolean reachedEnd()
throws IOException
reachedEnd in interface InputFormat<OUT extends Tuple,InputSplit>IOExceptionpublic OUT nextRecord(OUT tuple) throws IOException
nextRecord in interface InputFormat<OUT extends Tuple,InputSplit>tuple - IOExceptionpublic BaseStatistics getStatistics(BaseStatistics cachedStatistics) throws IOException
getStatistics in interface InputFormat<OUT extends Tuple,InputSplit>IOExceptionpublic InputSplit[] createInputSplits(int minNumSplits) throws IOException
createInputSplits in interface InputFormat<OUT extends Tuple,InputSplit>createInputSplits in interface InputSplitSource<InputSplit>IOExceptionpublic InputSplitAssigner getInputSplitAssigner(InputSplit[] inputSplits)
getInputSplitAssigner in interface InputFormat<OUT extends Tuple,InputSplit>getInputSplitAssigner in interface InputSplitSource<InputSplit>public static JDBCInputFormat.JDBCInputFormatBuilder buildJDBCInputFormat()
Copyright © 2015 The Apache Software Foundation. All rights reserved.