[sqoop1 error] Got exception running Sqoop java.lang.NullPointerException at org 博客分类: linuxhadoophivesqoop
程序员文章站
2024-03-15 10:13:47
...
[sqoop1 error] Got exception running Sqoop java.lang.NullPointerException at org
问题:
[zkkafka@yanfabu2-35 tmp]$ sqoop job --create sqoop_job_device -- import --connect jdbc:mysql://10.156.50.36:3306/mqh \ > --username root \ > --password root \ > --query "select deviceid ,appid,register_time from device where \$CONDITIONS" \ > --hive-import \ > --hive-database test \ > --hive-table device \ > --split-by deviceid \ > --fields-terminated-by '\01' \ > --lines-terminated-by '\t' \ > --target-dir /home/zkkafka/hive/tmp/device \ > --hive-delims-replacement ' ' \ > --incremental append \ > --check-column deviceid \ > --last-value 6; Warning: /home/zkkafka/sqoop/../hcatalog does not exist! HCatalog jobs will fail. Please set $HCAT_HOME to the root of your HCatalog installation. Warning: /home/zkkafka/sqoop/../accumulo does not exist! Accumulo imports will fail. Please set $ACCUMULO_HOME to the root of your Accumulo installation. 19/05/29 14:52:46 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7 19/05/29 14:52:46 WARN tool.BaseSqoopTool: Setting your password on the command-line is insecure. Consider using -P instead. 19/05/29 14:52:46 ERROR sqoop.Sqoop: Got exception running Sqoop: java.lang.NullPointerException java.lang.NullPointerException at org.json.JSONObject.<init>(JSONObject.java:144) at org.apache.sqoop.util.SqoopJsonUtil.getJsonStringforMap(SqoopJsonUtil.java:43) at org.apache.sqoop.SqoopOptions.writeProperties(SqoopOptions.java:785) at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.createInternal(HsqldbJobStorage.java:399) at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.create(HsqldbJobStorage.java:379) at org.apache.sqoop.tool.JobTool.createJob(JobTool.java:181) at org.apache.sqoop.tool.JobTool.run(JobTool.java:294) at org.apache.sqoop.Sqoop.run(Sqoop.java:147) at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70) at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234) at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243) at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
解决方法:
解决方法: export HCAT_HOME=/home/zkkafka/hive/tmp/HiveJobsLog 下载java-json.jar,java-json-schema.jar包: http://www.java2s.com/Code/Jar/j/Downloadjavajsonjar.htm scp java-json.jar zkkafka@10.156.50.37:/home/zkkafka/sqoop/lib/ http://www.java2s.com/Code/Jar/j/Downloadjavajsonschemajar.htm scp java-json-schema.jar zkkafka@10.156.50.36:/home/zkkafka/sqoop/lib/ scp json-20160212.jar zkkafka@10.156.50.37:/home/zkkafka/sqoop/lib/
捐助开发者
在兴趣的驱动下,写一个免费
的东西,有欣喜,也还有汗水,希望你喜欢我的作品,同时也能支持一下。 当然,有钱捧个钱场(支持支付宝和微信 以及扣扣群),没钱捧个人场,谢谢各位。
个人主页:http://knight-black-bob.iteye.com/
谢谢您的赞助,我会做的更好!