mirror of
https://github.com/apache/sqoop.git
synced 2025-05-20 19:00:48 +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:
parent
90ec25b2a8
commit
8c33cdd983
@ -25,6 +25,10 @@ public enum MConfigType {
|
||||
/** Unknown config type */
|
||||
OTHER,
|
||||
|
||||
@Deprecated
|
||||
// NOTE: only exists to support the connector data upgrade path
|
||||
CONNECTION,
|
||||
|
||||
/** link config type */
|
||||
LINK,
|
||||
|
||||
|
@ -1979,6 +1979,9 @@ public void loadDriverConfigs(List<MConfig> driverConfig,
|
||||
}
|
||||
driverConfig.add(mDriverConfig);
|
||||
break;
|
||||
case CONNECTION:
|
||||
// do nothing
|
||||
break;
|
||||
default:
|
||||
throw new SqoopException(CommonRepositoryError.COMMON_0004,
|
||||
"connector-" + fromConnectorId + ":" + configType);
|
||||
@ -2107,6 +2110,7 @@ public void loadConnectorConfigTypes(List<MConfig> linkConfig, List<MConfig> fro
|
||||
|
||||
MConfigType mConfigType = MConfigType.valueOf(configType);
|
||||
switch (mConfigType) {
|
||||
case CONNECTION:
|
||||
case LINK:
|
||||
if (linkConfig.size() != configIndex) {
|
||||
throw new SqoopException(CommonRepositoryError.COMMON_0007,
|
||||
|
Loading…
Reference in New Issue
Block a user