Sqoop importing MySQL data sheet to hive error
[[Email protected]172- +-1-221lib]# sqoop Import--connect jdbc:mysql://54.223.175.12:3308/gxt3--username guesttest--password guesttest--table ecomaccessv3-m 1--hive-importWarning:/opt/cloudera/parcels/cdh-5.10.0-1. Cdh5.10.0. P0. A/bin/. /lib/sqoop/. /accumulo does not exist!Accumulo imports would fail. pleaseSet$ACCUMULO _home to the root of your Accumulo installation. -/ ./ - -: the: +INFO Sqoop. Sqoop:running Sqoop Version:1.4.6-cdh5.10.0 -/ ./ - -: the: +WARN tool. Basesqooptool:setting your password on the command-line isInsecure. Considerusing-P instead. -/ ./ - -: the: +INFO tool. Basesqooptool:using hive-specific Delimiters forOutput. You canOverride -/ ./ - -: the: +INFO tool. Basesqooptool:delimiters with--fields-terminated-by, etc. -/ ./ - -: the: +INFO Manager. Mysqlmanager:preparing to use a MySQL streaming resultset. -/ ./ - -: the: +INFO tool. Codegentool:beginning code Generation -/ ./ - -: the: +ERROR Manager. Sqlmanager:error Executing statement:com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link Failurethe last packet sent successfully to the server was0Milliseconds ago. The driver has no received any packets fromThe server.com.mysql.jdbc.exceptions.jdbc4.CommunicationsException:Communications link failurethe last Packet Sent successfully to the server was0Milliseconds ago. The driver has no received any packets fromThe server. At Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at Sun.reflect.NativeConstructorAccessorI Mpl.newinstance (Nativeconstructoraccessorimpl.java: $) at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (Delegatingconstructoraccessorimpl.java: $) at Java.lang.reflect.Constructor.newInstance (Constructor.java:526) at Com.mysql.jdbc.Util.handleNewInstance (Util.java:408) at Com.mysql.jdbc.SQLError.createCommunicationsException (Sqlerror.java:1137) at Com.mysql.jdbc.MysqlIO.<init> (Mysqlio.java:355) at Com.mysql.jdbc.ConnectionImpl.coreConnect (Connectionimpl.java:2490) at Com.mysql.jdbc.ConnectionImpl.connectOneTryOnly (Connectionimpl.java:2527) at Com.mysql.jdbc.ConnectionImpl.createNewIO (Connectionimpl.java:2309) at Com.mysql.jdbc.ConnectionImpl.<init> (Connectionimpl.java:834) at com.mysql.jdbc.JDBC4Connection.<init> (Jdbc4connection.java: $) at Sun.reflect.NativeConstructorAccessorImpl.newInstance0 (Native Method) at Sun.reflect.NativeConstruc Toraccessorimpl.newinstance (Nativeconstructoraccessorimpl.java: $) at Sun.reflect.DelegatingConstructorAccessorImpl.newInstance (Delegatingconstructoraccessorimpl.java: $) at Java.lang.reflect.Constructor.newInstance (Constructor.java:526) at Com.mysql.jdbc.Util.handleNewInstance (Util.java:408) at Com.mysql.jdbc.ConnectionImpl.getInstance (Connectionimpl.java:419) at Com.mysql.jdbc.NonRegisteringDriver.connect (Nonregisteringdriver.java:344) at Java.sql.DriverManager.getConnection (Drivermanager.java:571) at Java.sql.DriverManager.getConnection (Drivermanager.java:215) at Org.apache.sqoop.manager.SqlManager.makeConnection (Sqlmanager.java:904) at Org.apache.sqoop.manager.GenericJdbcManager.getConnection (Genericjdbcmanager.java: the) at Org.apache.sqoop.manager.SqlManager.execute (Sqlmanager.java:763) at Org.apache.sqoop.manager.SqlManager.execute (Sqlmanager.java:786) at Org.apache.sqoop.manager.SqlManager.getColumnInfoForRawQuery (Sqlmanager.java:289) at Org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery (Sqlmanager.java:260) at Org.apache.sqoop.manager.SqlManager.getColumnTypes (Sqlmanager.java:246) at Org.apache.sqoop.manager.ConnManager.getColumnTypes (Connmanager.java:327) at Org.apache.sqoop.orm.ClassWriter.getColumnTypes (Classwriter.java:1858) at Org.apache.sqoop.orm.ClassWriter.generate (Classwriter.java:1658) at Org.apache.sqoop.tool.CodeGenTool.generateORM (Codegentool.java:107) at org.apache.sqoop.tool.ImportTool.importTable (Importtool.java:488) at Org.apache.sqoop.tool.ImportTool.run (Importtool.java:615) at Org.apache.sqoop.Sqoop.run (Sqoop.java:143) at Org.apache.hadoop.util.ToolRunner.run (Toolrunner.java: -) at Org.apache.sqoop.Sqoop.runSqoop (Sqoop.java:179) at Org.apache.sqoop.Sqoop.runTool (Sqoop.java:218) at Org.apache.sqoop.Sqoop.runTool (Sqoop.java:227) at Org.apache.sqoop.Sqoop.main (Sqoop.java:236) caused By:java.net.ConnectException:Connection refused at Java.net.PlainSocketImpl.socketConnect (Native Meth OD) at Java.net.AbstractPlainSocketImpl.doConnect (Abstractplainsocketimpl.java:339) at Java.net.AbstractPlainSocketImpl.connectToAddress (Abstractplainsocketimpl.java: $) at Java.net.AbstractPlainSocketImpl.connect (Abstractplainsocketimpl.java:182) at Java.net.SocksSocketImpl.connect (Sockssocketimpl.java:392) at Java.net.Socket.connect (Socket.java:579) at Java.net.Socket.connect (Socket.java:528) at Java.net.Socket.<init> (Socket.java:425) at Java.net.Socket.<init> (Socket.java:241) at Com.mysql.jdbc.StandardSocketFactory.connect (Standardsocketfactory.java:258) at Com.mysql.jdbc.MysqlIO.<init> (Mysqlio.java:305) ... - More -/ ./ - -: the: +ERROR tool. importtool:encountered IOException Running Import job:java.io.IOException:No columns to generate forClasswriter at Org.apache.sqoop.orm.ClassWriter.generate (Classwriter.java:1664) at Org.apache.sqoop.tool.CodeGenTool.generateORM (Codegentool.java:107) at org.apache.sqoop.tool.ImportTool.importTable (Importtool.java:488) at Org.apache.sqoop.tool.ImportTool.run (Importtool.java:615) at Org.apache.sqoop.Sqoop.run (Sqoop.java:143) at Org.apache.hadoop.util.ToolRunner.run (Toolrunner.java: -) at Org.apache.sqoop.Sqoop.runSqoop (Sqoop.java:179) at Org.apache.sqoop.Sqoop.runTool (Sqoop.java:218) at Org.apache.sqoop.Sqoop.runTool (Sqoop.java:227) at Org.apache.sqoop.Sqoop.main (Sqoop.java:236)
Online said is the MySQL driver package problem, need to replace the driver package: "The original jar package is Mysql-connector-java-5.1.17.jar, replaced with Mysql-connector-java-5.1.32-bin.jar, you can use the "------Do not test
cd/opt/cloudera/parcels/cdh-5.10. 0-1. Cdh5. 10.0. P0. /lib/sqoop/lib//home/zc.lee/mysql-connector-java-5.1. -bin.jar./mysql-connector-java.jar
The operation still failed to run the Mr Task, and the error was consistent with the last time.
Sqoop-sqoop importing MySQL data sheets to hive error (unresolved)