In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/01 Report--
What this article shares with you is about how to solve the errors that occurred when using Sqoop tools to send mysql tables to Hive import. The editor thinks it is very practical, so I share it with you to learn. I hope you can get something after reading this article.
Statement executed:
Sqoop import-connect jdbc:mysql://master:3306/company-username root-password Omputer123?-table employee-delete-target-dir-num-mappers 1-hive-import-fields-terminated-by "\ t"-hive-overwrite-hive-table emp_hive
The following error occurred:
18-05-29 05:50:55 ERROR hive.HiveConfig: Could not load org.apache.hadoop.hive.conf.HiveConf. Make sure HIVE_CONF_DIR is set correctly.
18-05-29 05:50:55 ERROR tool.ImportTool: Import failed: java.io.IOException: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf
At org.apache.sqoop.hive.HiveConfig.getHiveConf (HiveConfig.java:50)
At org.apache.sqoop.hive.HiveImport.getHiveArgs (HiveImport.java:392)
At org.apache.sqoop.hive.HiveImport.executeExternalHiveScript (HiveImport.java:379)
At org.apache.sqoop.hive.HiveImport.executeScript (HiveImport.java:337)
At org.apache.sqoop.hive.HiveImport.importTable (HiveImport.java:241)
At org.apache.sqoop.tool.ImportTool.importTable (ImportTool.java:537)
At org.apache.sqoop.tool.ImportTool.run (ImportTool.java:628)
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)
Caused by: java.lang.ClassNotFoundException: org.apache.hadoop.hive.conf.HiveConf
At java.net.URLClassLoader.findClass (URLClassLoader.java:381)
At java.lang.ClassLoader.loadClass (ClassLoader.java:424)
At sun.misc.Launcher$AppClassLoader.loadClass (Launcher.java:331)
At java.lang.ClassLoader.loadClass (ClassLoader.java:357)
At java.lang.Class.forName0 (Native Method)
At java.lang.Class.forName (Class.java:264)
At org.apache.sqoop.hive.HiveConfig.getHiveConf (HiveConfig.java:44)
... 12 more
Solution: execute under the $SQOOP_HOME/lib directory:
Ln-s / usr/local/hive2.2/lib/hive-exec-2.1.1.jar hive-exec-2.1.1.jar
The above is how to solve the error when using the Sqoop tool to send the mysql table to Hive import. The editor believes that there are some knowledge points that we may see or use in our daily work. I hope you can learn more from this article. For more details, please follow the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.