You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sqoop.apache.org by hs...@apache.org on 2013/11/06 19:37:36 UTC
git commit: SQOOP-1228. Method Configuration#unset is not available
on Hadoop < 1.2.0
Updated Branches:
refs/heads/trunk 71638a355 -> 07cc3b3fa
SQOOP-1228. Method Configuration#unset is not available on Hadoop < 1.2.0
(Jarek Jarcec Cecho via Hari Shreedharan)
Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/07cc3b3f
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/07cc3b3f
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/07cc3b3f
Branch: refs/heads/trunk
Commit: 07cc3b3fad2b0ce67f22bbb18673a8d1f1a35636
Parents: 71638a3
Author: Hari Shreedharan <hs...@cloudera.com>
Authored: Wed Nov 6 10:36:43 2013 -0800
Committer: Hari Shreedharan <hs...@cloudera.com>
Committed: Wed Nov 6 10:36:43 2013 -0800
----------------------------------------------------------------------
.../apache/sqoop/util/password/CryptoFileLoader.java | 12 ++++++++----
1 file changed, 8 insertions(+), 4 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/sqoop/blob/07cc3b3f/src/java/org/apache/sqoop/util/password/CryptoFileLoader.java
----------------------------------------------------------------------
diff --git a/src/java/org/apache/sqoop/util/password/CryptoFileLoader.java b/src/java/org/apache/sqoop/util/password/CryptoFileLoader.java
index 54d2cf5..7241aa5 100644
--- a/src/java/org/apache/sqoop/util/password/CryptoFileLoader.java
+++ b/src/java/org/apache/sqoop/util/password/CryptoFileLoader.java
@@ -156,9 +156,13 @@ public class CryptoFileLoader extends FilePasswordLoader {
@Override
public void cleanUpConfiguration(Configuration configuration) {
- configuration.unset(PROPERTY_CRYPTO_PASSPHRASE);
- configuration.unset(PROPERTY_CRYPTO_SALT);
- configuration.unset(PROPERTY_CRYPTO_KEY_LEN);
- configuration.unset(PROPERTY_CRYPTO_ITERATIONS);
+ // Usage of Configuration#unset would be much better here, sadly
+ // this particular API is not available in Hadoop 0.20 and < 1.2.0
+ // that we are still supporting. Hence we are overriding the configs
+ // 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);
}
}