sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject git commit: SQOOP-779: Sqoop2: NPE when JobConnectorContext has a null value
Date Sat, 15 Dec 2012 19:45:19 GMT
Updated Branches:
  refs/heads/sqoop2 ab5ab279a -> 43b07c1c6


SQOOP-779: Sqoop2: NPE when JobConnectorContext has a null value

(Cheolsoo Park via Jarek Jarcec Cecho)


Project: http://git-wip-us.apache.org/repos/asf/sqoop/repo
Commit: http://git-wip-us.apache.org/repos/asf/sqoop/commit/43b07c1c
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/43b07c1c
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/43b07c1c

Branch: refs/heads/sqoop2
Commit: 43b07c1c67e3d5de3321612c9db5bff71b66c8f9
Parents: ab5ab27
Author: Jarek Jarcec Cecho <jarcec@apache.org>
Authored: Sat Dec 15 11:44:29 2012 -0800
Committer: Jarek Jarcec Cecho <jarcec@apache.org>
Committed: Sat Dec 15 11:44:29 2012 -0800

----------------------------------------------------------------------
 .../mapreduce/MapreduceSubmissionEngine.java       |    8 ++++++++
 1 files changed, 8 insertions(+), 0 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/sqoop/blob/43b07c1c/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
----------------------------------------------------------------------
diff --git a/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
b/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
index e0d6f39..5c57758 100644
--- a/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
+++ b/submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
@@ -139,11 +139,19 @@ public class MapreduceSubmissionEngine extends SubmissionEngine {
 
     // Serialize framework context into job configuration
     for(Map.Entry<String, String> entry: request.getFrameworkContext()) {
+      if (entry.getValue() == null) {
+        LOG.warn("Ignoring null framework context value for key " + entry.getKey());
+        continue;
+      }
       configuration.set(entry.getKey(), entry.getValue());
     }
 
     // Serialize connector context as a sub namespace
     for(Map.Entry<String, String> entry :request.getConnectorContext()) {
+      if (entry.getValue() == null) {
+        LOG.warn("Ignoring null connector context value for key " + entry.getKey());
+        continue;
+      }
       configuration.set(
         JobConstants.PREFIX_CONNECTOR_CONTEXT + entry.getKey(),
         entry.getValue());


Mime
View raw message