Uploaded image for project: 'Sqoop (Retired)'
  1. Sqoop (Retired)
  2. SQOOP-779

Sqoop2: NPE when JobConnectorContext has a null value

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.99.1
    • 1.99.1
    • None
    • None

    Description

      When ConnectorContext has a null value, the following code throws NPE:

      MapReduceSubmissionEngine.java
          // Serialize connector context as a sub namespace
          for(Map.Entry<String, String> entry :request.getConnectorContext()) {
            configuration.set(
              JobConstants.PREFIX_CONNECTOR_CONTEXT + entry.getKey(),
              entry.getValue());
          }
      

      The call stack looks like this:

      Stack trace:
      	 at  java.util.Hashtable (Hashtable.java:394)  
      	 at  java.util.Properties (Properties.java:143)  
      	 at  org.apache.hadoop.conf.Configuration (Configuration.java:784)  
      	 at  org.apache.hadoop.conf.Configuration (Configuration.java:767)  
      	 at  org.apache.sqoop.submission.mapreduce.MapreduceSubmissionEngine (MapreduceSubmissionEngine.java:147)  
      	 at  org.apache.sqoop.framework.FrameworkManager (FrameworkManager.java:424)  
      	 at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:112)  
      	 at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:98)  
      	 at  org.apache.sqoop.handler.SubmissionRequestHandler (SubmissionRequestHandler.java:68)  
      	 at  org.apache.sqoop.server.v1.SubmissionServlet (SubmissionServlet.java:44)  
      	 at  org.apache.sqoop.server.SqoopProtocolServlet (SqoopProtocolServlet.java:63)  
      	 at  javax.servlet.http.HttpServlet (HttpServlet.java:637)  
      	 at  javax.servlet.http.HttpServlet (HttpServlet.java:717)  
      	 at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:290)  
      	 at  org.apache.catalina.core.ApplicationFilterChain (ApplicationFilterChain.java:206)  
      	 at  org.apache.catalina.core.StandardWrapperValve (StandardWrapperValve.java:233)  
      	 at  org.apache.catalina.core.StandardContextValve (StandardContextValve.java:191)  
      	 at  org.apache.catalina.core.StandardHostValve (StandardHostValve.java:127)  
      	 at  org.apache.catalina.valves.ErrorReportValve (ErrorReportValve.java:103)  
      	 at  org.apache.catalina.core.StandardEngineValve (StandardEngineValve.java:109)  
      	 at  org.apache.catalina.connector.CoyoteAdapter (CoyoteAdapter.java:293)  
      	 at  org.apache.coyote.http11.Http11Processor (Http11Processor.java:861)  
      	 at  org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler (Http11Protocol.java:606)  
      	 at  org.apache.tomcat.util.net.JIoEndpoint$Worker (JIoEndpoint.java:489)  
      	 at  java.lang.Thread (Thread.java:662)
      

      Attachments

        1. SQOOP-779.patch
          1 kB
          Cheolsoo Park

        Issue Links

          Activity

            People

              cheolsoo Cheolsoo Park
              cheolsoo Cheolsoo Park
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: