Home | About | Sematext search-lucene.com search-hadoop.com
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB
 Search Hadoop and all its subprojects:

Switch to Threaded View
Sqoop >> mail # user >> import msql to hive


Copy link to this message
-
Re: import msql to hive
The above error usually gets thrown if you are unable to access the MySQL
server while you are trying to import. Are you certain that the MySQL
server is accessible from the machine in which you are importing.

On Mon, Jul 16, 2012 at 5:51 PM, prabhu k <[EMAIL PROTECTED]> wrote:

> Hi Users list,
>
> While  i am trying to import mysql db table to hive, getting following
> output :
>
> command used:
>
> bin/sqoop import --connect jdbc:mysql://10.5.114.101:54310/books--verbose -m 1 --username root --hive-overwrite --direct --table authors
> --hive-import --create-hive-table --hive-table authors
> --fields-terminated-by '\t' --lines-terminated-by '\n' --append
>
> Error:
>
> sqoop-1.4.1-incubating__hadoop-0.20# bin/sqoop import --connect
> jdbc:mysql://10.5.114.101:54310/books --verbose -m 1 --username root
> --hive-overwrite --direct --table authors --hive-import --create-hive-table
> --hive-table authors --fields-terminated-by '\t' --lines-terminated-by '\n'
> --append
> Warning: /usr/lib/hbase does not exist! HBase imports will fail.
> Please set $HBASE_HOME to the root of your HBase installation.
> Warning: $HADOOP_HOME is deprecated.
> 12/07/16 17:22:30 INFO manager.MySQLManager: Preparing to use a MySQL
> streaming resultset.
> 12/07/16 17:22:30 INFO tool.CodeGenTool: Beginning code generation
> 12/07/16 17:22:30 ERROR manager.SqlManager: Error executing statement:
> com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
> link failure
> The last packet sent successfully to the server was 0 milliseconds ago.
> The driver has not received any packets from the server.
> com.mysql.jdbc.exceptions.jdbc4.CommunicationsException: Communications
> link failure
> The last packet sent successfully to the server was 0 milliseconds ago.
> The driver has not received any packets from the server.
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>         at
> com.mysql.jdbc.SQLError.createCommunicationsException(SQLError.java:1116)
>         at com.mysql.jdbc.MysqlIO.<init>(MysqlIO.java:348)
>         at
> com.mysql.jdbc.ConnectionImpl.coreConnect(ConnectionImpl.java:2391)
>         at
> com.mysql.jdbc.ConnectionImpl.connectOneTryOnly(ConnectionImpl.java:2428)
>         at
> com.mysql.jdbc.ConnectionImpl.createNewIO(ConnectionImpl.java:2213)
>         at com.mysql.jdbc.ConnectionImpl.<init>(ConnectionImpl.java:797)
>         at com.mysql.jdbc.JDBC4Connection.<init>(JDBC4Connection.java:47)
>         at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> Method)
>         at
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
>         at
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
>         at java.lang.reflect.Constructor.newInstance(Constructor.java:513)
>         at com.mysql.jdbc.Util.handleNewInstance(Util.java:411)
>         at
> com.mysql.jdbc.ConnectionImpl.getInstance(ConnectionImpl.java:389)
>         at
> com.mysql.jdbc.NonRegisteringDriver.connect(NonRegisteringDriver.java:305)
>         at java.sql.DriverManager.getConnection(DriverManager.java:582)
>         at java.sql.DriverManager.getConnection(DriverManager.java:185)
>         at
> org.apache.sqoop.manager.SqlManager.makeConnection(SqlManager.java:686)
>         at
> org.apache.sqoop.manager.GenericJdbcManager.getConnection(GenericJdbcManager.java:52)
>         at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:473)
>         at org.apache.sqoop.manager.SqlManager.execute(SqlManager.java:496)
>         at
> org.apache.sqoop.manager.SqlManager.getColumnTypesForRawQuery(SqlManager.java:194)
NEW: Monitor These Apps!
elasticsearch, apache solr, apache hbase, hadoop, redis, casssandra, amazon cloudwatch, mysql, memcached, apache kafka, apache zookeeper, apache storm, ubuntu, centOS, red hat, debian, puppet labs, java, senseiDB