mirror of
https://github.com/apache/sqoop.git
synced 2025-05-07 23:03:07 +08:00
SQOOP-1012: Sqoop2: Generic JDBC Connector should have one static instance of validator
(Vasanth kumar RJ via Jarek Jarcec Cecho)
This commit is contained in:
parent
01ffb2f428
commit
dd3bfa3981
@ -33,6 +33,8 @@
|
|||||||
|
|
||||||
public class GenericJdbcConnector extends SqoopConnector {
|
public class GenericJdbcConnector extends SqoopConnector {
|
||||||
|
|
||||||
|
private static GenericJdbcValidator genericJdbcValidator = new GenericJdbcValidator();
|
||||||
|
|
||||||
private static final Importer IMPORTER = new Importer(
|
private static final Importer IMPORTER = new Importer(
|
||||||
GenericJdbcImportInitializer.class,
|
GenericJdbcImportInitializer.class,
|
||||||
GenericJdbcImportPartitioner.class,
|
GenericJdbcImportPartitioner.class,
|
||||||
@ -91,8 +93,7 @@ public Exporter getExporter() {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Validator getValidator() {
|
public Validator getValidator() {
|
||||||
// TODO(jarcec): Cache this object eventually
|
return genericJdbcValidator;
|
||||||
return new GenericJdbcValidator();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
Loading…
Reference in New Issue
Block a user