OUT - public class JDBCInputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple> extends Object implements org.apache.flink.api.common.io.InputFormat<OUT,org.apache.flink.core.io.InputSplit>, org.apache.flink.api.common.io.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(org.apache.flink.configuration.Configuration parameters) |
org.apache.flink.core.io.InputSplit[] |
createInputSplits(int minNumSplits) |
org.apache.flink.core.io.InputSplitAssigner |
getInputSplitAssigner(org.apache.flink.core.io.InputSplit[] inputSplits) |
org.apache.flink.api.common.io.statistics.BaseStatistics |
getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics) |
OUT |
nextRecord(OUT tuple)
Stores the next resultSet row in a tuple
|
void |
open(org.apache.flink.core.io.InputSplit ignored)
Connects to the source database and executes the query.
|
boolean |
reachedEnd()
Checks whether all data has been read.
|
public void configure(org.apache.flink.configuration.Configuration parameters)
configure in interface org.apache.flink.api.common.io.InputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.core.io.InputSplit>public void open(org.apache.flink.core.io.InputSplit ignored)
throws IOException
open in interface org.apache.flink.api.common.io.InputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.core.io.InputSplit>ignored - IOExceptionpublic void close()
throws IOException
close in interface org.apache.flink.api.common.io.InputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.core.io.InputSplit>IOException - Indicates that a resource could not be closed.public boolean reachedEnd()
throws IOException
reachedEnd in interface org.apache.flink.api.common.io.InputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.core.io.InputSplit>IOExceptionpublic OUT nextRecord(OUT tuple) throws IOException
nextRecord in interface org.apache.flink.api.common.io.InputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.core.io.InputSplit>tuple - IOExceptionpublic org.apache.flink.api.common.io.statistics.BaseStatistics getStatistics(org.apache.flink.api.common.io.statistics.BaseStatistics cachedStatistics)
throws IOException
getStatistics in interface org.apache.flink.api.common.io.InputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.core.io.InputSplit>IOExceptionpublic org.apache.flink.core.io.InputSplit[] createInputSplits(int minNumSplits)
throws IOException
createInputSplits in interface org.apache.flink.api.common.io.InputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.core.io.InputSplit>createInputSplits in interface org.apache.flink.core.io.InputSplitSource<org.apache.flink.core.io.InputSplit>IOExceptionpublic org.apache.flink.core.io.InputSplitAssigner getInputSplitAssigner(org.apache.flink.core.io.InputSplit[] inputSplits)
getInputSplitAssigner in interface org.apache.flink.api.common.io.InputFormat<OUT extends org.apache.flink.api.java.tuple.Tuple,org.apache.flink.core.io.InputSplit>getInputSplitAssigner in interface org.apache.flink.core.io.InputSplitSource<org.apache.flink.core.io.InputSplit>public static JDBCInputFormat.JDBCInputFormatBuilder buildJDBCInputFormat()
Copyright © 2014–2015 The Apache Software Foundation. All rights reserved.