public abstract class AbstractJDBCOutputFormat<T> extends RichOutputFormat<T>
Row
,
DriverManager
,
Serialized FormModifier and Type | Field and Description |
---|---|
protected Connection |
connection |
protected String |
dbURL |
Constructor and Description |
---|
AbstractJDBCOutputFormat(String username,
String password,
String drivername,
String dbURL) |
Modifier and Type | Method and Description |
---|---|
protected void |
closeDbConnection() |
void |
configure(Configuration parameters)
Configures this output format.
|
protected void |
establishConnection() |
getRuntimeContext, setRuntimeContext
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
close, open, writeRecord
protected final String dbURL
protected transient Connection connection
public void configure(Configuration parameters)
OutputFormat
This method is always called first on a newly instantiated output format.
parameters
- The configuration with all parameters.protected void establishConnection() throws SQLException, ClassNotFoundException
SQLException
ClassNotFoundException
protected void closeDbConnection() throws IOException
IOException
Copyright © 2014–2020 The Apache Software Foundation. All rights reserved.