Review Board 1.7.22


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

Review Request #8610 - Created Dec. 14, 2012 and submitted

Cheolsoo Park
SQOOP-779
Reviewers
Sqoop
sqoop-sqoop2
Please see https://issues.apache.org/jira/browse/SQOOP-779 

 
submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java
Revision e0d6f39 New Change
[20] 136 lines
[+20] [+] public boolean submit(SubmissionRequest generalRequest) {
137
    // Serialize job type as it will be needed by underlying execution engine
137
    // Serialize job type as it will be needed by underlying execution engine
138
    configuration.set(JobConstants.JOB_TYPE, request.getJobType().name());
138
    configuration.set(JobConstants.JOB_TYPE, request.getJobType().name());
139

    
   
139

   
140
    // Serialize framework context into job configuration
140
    // Serialize framework context into job configuration
141
    for(Map.Entry<String, String> entry: request.getFrameworkContext()) {
141
    for(Map.Entry<String, String> entry: request.getFrameworkContext()) {

    
   
142
      if (entry.getValue() == null) {

    
   
143
          continue;

    
   
144
      }
142
      configuration.set(entry.getKey(), entry.getValue());
145
      configuration.set(entry.getKey(), entry.getValue());
143
    }
146
    }
144

    
   
147

   
145
    // Serialize connector context as a sub namespace
148
    // Serialize connector context as a sub namespace
146
    for(Map.Entry<String, String> entry :request.getConnectorContext()) {
149
    for(Map.Entry<String, String> entry :request.getConnectorContext()) {

    
   
150
      if (entry.getValue() == null) {

    
   
151
          continue;

    
   
152
      }
147
      configuration.set(
153
      configuration.set(
148
        JobConstants.PREFIX_CONNECTOR_CONTEXT + entry.getKey(),
154
        JobConstants.PREFIX_CONNECTOR_CONTEXT + entry.getKey(),
149
        entry.getValue());
155
        entry.getValue());
150
    }
156
    }
151

    
   
157

   
[+20] [20] 196 lines
  1. submission/mapreduce/src/main/java/org/apache/sqoop/submission/mapreduce/MapreduceSubmissionEngine.java: Loading...