AnsweredAssumed Answered

NullPonterException running sqoop

Question asked by terrys on May 2, 2013
Latest reply on May 3, 2013 by dave_kincaid
On the latest version of sqoop (1.4.2) and MapR (2.1.2), we are receiving a NullPointerException when trying to show or execute saved jobs.  Digging further, it appears numerous config options are being added to the metastore.db.script file with null values.

I also came across this thread yesterday (http://answers.mapr.com/questions/6345/accumulo-on-mapr-bad-config), which seems to imply that MapR 2.1.x introduced a change which may be causing sqoop to read default values incorrectly and storing them in the metastore?  Note I tried previous versions of MapR, and was finally able to build a working setup using 2.0.0, which further validates my theory above.

Is there a change I need to make to allow sqoop to function properly again?

Here is some output to help troubleshoot.

        [mapr@aws-maprdev1 ~]$ sqoop job --show transaction-import
    Warning: /opt/mapr/hbase/hbase-0.92.2-mapr does not exist! HBase imports will fail.
    Please set $HBASE_HOME to the root of your HBase installation.
    13/05/03 13:14:17 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException
    java.lang.NullPointerException
            at java.util.Hashtable.put(Hashtable.java:542)
            at java.util.Properties.setProperty(Properties.java:161)
            at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.getV0Properties(HsqldbJobStorage.java:776)
            at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.read(HsqldbJobStorage.java:264)
            at org.apache.sqoop.tool.JobTool.showJob(JobTool.java:232)
            at org.apache.sqoop.tool.JobTool.run(JobTool.java:287)
            at org.apache.sqoop.Sqoop.run(Sqoop.java:145)
            at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:65)
            at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:181)
            at org.apache.sqoop.Sqoop.runTool(Sqoop.java:220)
            at org.apache.sqoop.Sqoop.runTool(Sqoop.java:229)
            at org.apache.sqoop.Sqoop.main(Sqoop.java:238)
            at com.cloudera.sqoop.Sqoop.main(Sqoop.java:57)

Some of then entries in metastore.db.script that I'm questioning:

        INSERT INTO SQOOP_SESSIONS VALUES('transaction-import','fs.s3.sleepTimeSeconds',NULL,'config')
        INSERT INTO SQOOP_SESSIONS VALUES('transaction-import','mapred.task.tracker.report.address',NULL,'config')

Outcomes