5
0
mirror of https://github.com/apache/sqoop.git synced 2025-05-06 21:53:44 +08:00

SQOOP-1419: Sqoop2: From/To: Check TO connection is enabled

(Abraham Elmahrek via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2014-08-13 16:36:53 -07:00 committed by Abraham Elmahrek
parent 69f03d47b6
commit 1d4b9e96cf

View File

@ -288,6 +288,11 @@ public MSubmission submit(long jobId, HttpEventContext ctx) {
"Connection id: " + fromConnection.getPersistenceId()); "Connection id: " + fromConnection.getPersistenceId());
} }
if (!toConnection.getEnabled()) {
throw new SqoopException(FrameworkError.FRAMEWORK_0010,
"Connection id: " + toConnection.getPersistenceId());
}
SqoopConnector fromConnector = SqoopConnector fromConnector =
ConnectorManager.getInstance().getConnector(job.getConnectorId(ConnectorType.FROM)); ConnectorManager.getInstance().getConnector(job.getConnectorId(ConnectorType.FROM));
SqoopConnector toConnector = SqoopConnector toConnector =