当前位置:   article > 正文

使用sqoop将mysql数据导入hbase报错_sqoop导入数据到hbase报错无权限

sqoop导入数据到hbase报错无权限
  1. Exception in thread "main" java.lang.NoClassDefFoundError: org/json/JSONObject
  2. at org.apache.sqoop.util.SqoopJsonUtil.getJsonStringforMap(SqoopJsonUtil.java:43)
  3. at org.apache.sqoop.SqoopOptions.writeProperties(SqoopOptions.java:785)
  4. at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.createInternal(HsqldbJobStorage.java:399)
  5. at org.apache.sqoop.metastore.hsqldb.HsqldbJobStorage.create(HsqldbJobStorage.java:379)
  6. at org.apache.sqoop.tool.JobTool.createJob(JobTool.java:181)
  7. at org.apache.sqoop.tool.JobTool.run(JobTool.java:294)
  8. at org.apache.sqoop.Sqoop.run(Sqoop.java:147)
  9. at org.apache.hadoop.util.ToolRunner.run(ToolRunner.java:70)
  10. at org.apache.sqoop.Sqoop.runSqoop(Sqoop.java:183)
  11. at org.apache.sqoop.Sqoop.runTool(Sqoop.java:234)
  12. at org.apache.sqoop.Sqoop.runTool(Sqoop.java:243)
  13. at org.apache.sqoop.Sqoop.main(Sqoop.java:252)
  14. Caused by: java.lang.ClassNotFoundException: org.json.JSONObject
  15. at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
  16. at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
  17. at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:338)
  18. at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
  19. ... 12 more

这是因为sqoop缺少java-json.jar包

点击下载

 http://www.java2s.com/Code/Jar/j/Downloadjavajsonjar.htm

上传linux

unzip java.json.jar.zip

将java-json.jar放在sqoop的目录下的lib中

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/Gausst松鼠会/article/detail/724290
推荐阅读
相关标签
  

闽ICP备14008679号