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

SQOOP-1724: Sqoop2: Support old config types for backward compatibility in connector data upgrade

(Veena Basavaraj via Jarek Jarcec Cecho)
This commit is contained in:
Jarek Jarcec Cecho 2014-11-13 12:21:47 -08:00
parent 59ff6aeac7
commit fbdd940eb3
2 changed files with 10 additions and 0 deletions

View File

@ -25,6 +25,10 @@ public enum MConfigType {
/** Unknown config type */
OTHER,
@Deprecated
// exists for the connector upgrade path only
CONNECTION,
/** link config type */
LINK,

View File

@ -2609,6 +2609,10 @@ public void loadDriverConfigs(List<MConfig> driverConfig,
}
driverConfig.add(mDriverConfig);
break;
//added for connector upgrade path
case CONNECTION:
// do nothing since we do not support it
break;
default:
throw new SqoopException(DerbyRepoError.DERBYREPO_0007,
"connector-" + fromConnectorId + ":" + configType);
@ -2737,6 +2741,8 @@ public void loadConnectorConfigTypes(List<MConfig> linkConfig, List<MConfig> fro
MConfigType mConfigType = MConfigType.valueOf(configType);
switch (mConfigType) {
//added for connector upgrade path
case CONNECTION:
case LINK:
if (linkConfig.size() != configIndex) {
throw new SqoopException(DerbyRepoError.DERBYREPO_0010,