sqoop-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jar...@apache.org
Subject [4/8] git commit: SQOOP-779: Sqoop2: NPE when JobConnectorContext has a null value
Date Sun, 16 Dec 2012 07:16:48 GMT
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/89cf0c97
Tree: http://git-wip-us.apache.org/repos/asf/sqoop/tree/89cf0c97
Diff: http://git-wip-us.apache.org/repos/asf/sqoop/diff/89cf0c97

Branch: refs/heads/branch-1.99.1
Commit: 89cf0c97f32eeebf2ea9443b65912095b744c6af
Parents: 2f47089
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 23:08:37 2012 -0800

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


http://git-wip-us.apache.org/repos/asf/sqoop/blob/89cf0c97/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