mirror of
https://github.com/apache/sqoop.git
synced 2025-05-03 00:10:26 +08:00
SQOOP-1228. Method Configuration#unset is not available on Hadoop < 1.2.0
(Jarek Jarcec Cecho via Hari Shreedharan)
This commit is contained in:
parent
71638a355a
commit
07cc3b3fad
@ -156,9 +156,13 @@ public String loadPassword(String p, Configuration configuration) throws IOExcep
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void cleanUpConfiguration(Configuration configuration) {
|
public void cleanUpConfiguration(Configuration configuration) {
|
||||||
configuration.unset(PROPERTY_CRYPTO_PASSPHRASE);
|
// Usage of Configuration#unset would be much better here, sadly
|
||||||
configuration.unset(PROPERTY_CRYPTO_SALT);
|
// this particular API is not available in Hadoop 0.20 and < 1.2.0
|
||||||
configuration.unset(PROPERTY_CRYPTO_KEY_LEN);
|
// that we are still supporting. Hence we are overriding the configs
|
||||||
configuration.unset(PROPERTY_CRYPTO_ITERATIONS);
|
// with default values.
|
||||||
|
configuration.set(PROPERTY_CRYPTO_PASSPHRASE, "REMOVED");
|
||||||
|
configuration.set(PROPERTY_CRYPTO_SALT, DEFAULT_SALT);
|
||||||
|
configuration.setInt(PROPERTY_CRYPTO_KEY_LEN, DEFAULT_KEY_LEN);
|
||||||
|
configuration.setInt(PROPERTY_CRYPTO_ITERATIONS, DEFAULT_ITERATIONS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user