public class JdbcDataProperties extends Object
Constructor and Description |
---|
JdbcDataProperties()
Default constructor
|
JdbcDataProperties(String driver,
String url,
String dbTable,
Boolean addJar)
Create the configuration for a schema or table at a JDBC accesible
database to include and make available as a 'table(s)' to the Apache
Spark SQL Context.
|
Modifier and Type | Method and Description |
---|---|
String |
getColumnName()
|
String |
getDbTable()
|
String |
getDriver()
|
Long |
getLowerBound()
|
Integer |
getNumPartitions()
|
Long |
getUpperBound()
|
String |
getUrl()
|
Boolean |
isAddJar()
|
void |
setAddJar(Boolean addJar)
|
void |
setColumnName(String columnName)
|
void |
setDbTable(String dbTable)
|
void |
setDriver(String driver)
|
void |
setLowerBound(Long lowerBound)
|
void |
setNumPartitions(Integer numPartitions)
|
void |
setUpperBound(Long upperBound)
|
void |
setUrl(String url)
|
public JdbcDataProperties()
public JdbcDataProperties(String driver, String url, String dbTable, Boolean addJar)
JdbcDataProperties
driver
- JDBC driver class nameurl
- JDBC URL used to connect to the databasedbTable
- database table to be included to the context. Leave this value
empty to include all tables in the schema (should be defined
at the jdbc URL).addJar
- flag used to instruct the Spark Context to send the JDBC
driver to Spark Workers. This is usually required (true).public String getDbTable()
public String getUrl()
public String getDriver()
public Boolean isAddJar()
public Integer getNumPartitions()
public Long getUpperBound()
public Long getLowerBound()
public String getColumnName()
public void setDriver(String driver)
driver
- JDBC driver class namepublic void setUrl(String url)
url
- JDBC URL used to connect to the databasepublic void setDbTable(String dbTable)
dbTable
- database table to be included to the contextpublic void setAddJar(Boolean addJar)
addJar
- is send the file type driver to Spark Workerspublic void setNumPartitions(Integer numPartitions)
numPartitions
- partition informationpublic void setUpperBound(Long upperBound)
upperBound
- partition informationpublic void setLowerBound(Long lowerBound)
lowerBound
- partition informationpublic void setColumnName(String columnName)
columnName
- partition informationCopyright © 2010–2017. All rights reserved.