[ 
https://issues.apache.org/jira/browse/SQOOP-3470?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Anand Kothapeta updated SQOOP-3470:
-----------------------------------
    Description: 
 
 I am running scoop export from hdfs csv file to mysql table. I submit the 
following command 
{code:java}
sqoop export \
  --connect 'jdbc:mysql://servername:3306/MYDB' \
  --table MY_TABLE \
  --username someuser 
  --password somepass \
  --export-dir '/some/directory/path/hadoopfile.csv' \
  --input-fields-terminated-by ';' \
  --verbose
{code}
{{Also tried the following options}}


{code:java}
 --driver com.mysql.cj.jdbc.Driver \
 --update-mode allowinsert \
 --m 1{code}
 

{{But it hangs. Here is the output I see a session in the database but its just 
sleeping.}}

 
{code:java}
Warning: /usr/lib/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/lib/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
20/04/07 15:14:55 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
20/04/07 15:14:55 DEBUG tool.BaseSqoopTool: Enabled debug logging.
20/04/07 15:14:55 WARN tool.BaseSqoopTool: Setting your password on the 
command-line is insecure. Consider using -P instead.
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Loaded manager factory: 
org.apache.sqoop.manager.oracle.OraOopManagerFactory
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Loaded manager factory: 
com.cloudera.sqoop.manager.DefaultManagerFactory
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Trying ManagerFactory: 
org.apache.sqoop.manager.oracle.OraOopManagerFactory
20/04/07 15:14:56 DEBUG oracle.OraOopManagerFactory: Data Connector for Oracle 
and Hadoop can be called by Sqoop!
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Trying ManagerFactory: 
com.cloudera.sqoop.manager.DefaultManagerFactory
20/04/07 15:14:56 DEBUG manager.DefaultManagerFactory: Trying with scheme: 
jdbc:mysql:
20/04/07 15:14:56 INFO manager.MySQLManager: Preparing to use a MySQL streaming 
resultset.
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Instantiated ConnManager 
org.apache.sqoop.manager.MySQLManager@38c6f217
20/04/07 15:14:56 INFO tool.CodeGenTool: Beginning code generation
20/04/07 15:14:56 DEBUG manager.SqlManager: Execute getColumnInfoRawQuery : 
SELECT t.* FROM `MY_TABLE` AS t LIMIT 1
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class 
is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the 
SPI and manual loading of the driver class is generally unnecessary.
20/04/07 15:14:56 DEBUG manager.SqlManager: No connection paramenters 
specified. Using regular API for making connection.
{code}
 

  was:
 
I am running scoop export from hdfs csv file to mysql table. I submit the 
following command 
{code:java}
sqoop export \
  --connect 'jdbc:mysql://servername:3306/MYDB' \
  --table MY_TABLE \
  --username someuser 
  --password somepass \
  --export-dir '/some/directory/path/hadoopfile.csv' \
  --input-fields-terminated-by ';' \
  --verbose
{code}
{{{{Also tried the following options}}}}
{{ }}
{code:java}

{code}
{{--driver com.mysql.cj.jdbc.Driver \
--update-mode allowinsert \
--m 1 \}}{{}}
 

{{But it hangs. Here is the output I see a session in the database but its just 
sleeping.}}

 
{code:java}
Warning: /usr/lib/sqoop/../hbase does not exist! HBase imports will fail.
Please set $HBASE_HOME to the root of your HBase installation.
Warning: /usr/lib/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
Please set $HCAT_HOME to the root of your HCatalog installation.
Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will fail.
Please set $ACCUMULO_HOME to the root of your Accumulo installation.
20/04/07 15:14:55 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
20/04/07 15:14:55 DEBUG tool.BaseSqoopTool: Enabled debug logging.
20/04/07 15:14:55 WARN tool.BaseSqoopTool: Setting your password on the 
command-line is insecure. Consider using -P instead.
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Loaded manager factory: 
org.apache.sqoop.manager.oracle.OraOopManagerFactory
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Loaded manager factory: 
com.cloudera.sqoop.manager.DefaultManagerFactory
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Trying ManagerFactory: 
org.apache.sqoop.manager.oracle.OraOopManagerFactory
20/04/07 15:14:56 DEBUG oracle.OraOopManagerFactory: Data Connector for Oracle 
and Hadoop can be called by Sqoop!
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Trying ManagerFactory: 
com.cloudera.sqoop.manager.DefaultManagerFactory
20/04/07 15:14:56 DEBUG manager.DefaultManagerFactory: Trying with scheme: 
jdbc:mysql:
20/04/07 15:14:56 INFO manager.MySQLManager: Preparing to use a MySQL streaming 
resultset.
20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Instantiated ConnManager 
org.apache.sqoop.manager.MySQLManager@38c6f217
20/04/07 15:14:56 INFO tool.CodeGenTool: Beginning code generation
20/04/07 15:14:56 DEBUG manager.SqlManager: Execute getColumnInfoRawQuery : 
SELECT t.* FROM `MY_TABLE` AS t LIMIT 1
Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class 
is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the 
SPI and manual loading of the driver class is generally unnecessary.
20/04/07 15:14:56 DEBUG manager.SqlManager: No connection paramenters 
specified. Using regular API for making connection.
{code}
 


> sqoop export to mysql hangs
> ---------------------------
>
>                 Key: SQOOP-3470
>                 URL: https://issues.apache.org/jira/browse/SQOOP-3470
>             Project: Sqoop
>          Issue Type: Bug
>          Components: connectors/mysql
>    Affects Versions: 1.4.7
>            Reporter: Anand Kothapeta
>            Priority: Major
>
>  
>  I am running scoop export from hdfs csv file to mysql table. I submit the 
> following command 
> {code:java}
> sqoop export \
>   --connect 'jdbc:mysql://servername:3306/MYDB' \
>   --table MY_TABLE \
>   --username someuser 
>   --password somepass \
>   --export-dir '/some/directory/path/hadoopfile.csv' \
>   --input-fields-terminated-by ';' \
>   --verbose
> {code}
> {{Also tried the following options}}
> {code:java}
>  --driver com.mysql.cj.jdbc.Driver \
>  --update-mode allowinsert \
>  --m 1{code}
>  
> {{But it hangs. Here is the output I see a session in the database but its 
> just sleeping.}}
>  
> {code:java}
> Warning: /usr/lib/sqoop/../hbase does not exist! HBase imports will fail.
> Please set $HBASE_HOME to the root of your HBase installation.
> Warning: /usr/lib/sqoop/../hcatalog does not exist! HCatalog jobs will fail.
> Please set $HCAT_HOME to the root of your HCatalog installation.
> Warning: /usr/lib/sqoop/../accumulo does not exist! Accumulo imports will 
> fail.
> Please set $ACCUMULO_HOME to the root of your Accumulo installation.
> 20/04/07 15:14:55 INFO sqoop.Sqoop: Running Sqoop version: 1.4.7
> 20/04/07 15:14:55 DEBUG tool.BaseSqoopTool: Enabled debug logging.
> 20/04/07 15:14:55 WARN tool.BaseSqoopTool: Setting your password on the 
> command-line is insecure. Consider using -P instead.
> 20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Loaded manager factory: 
> org.apache.sqoop.manager.oracle.OraOopManagerFactory
> 20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Loaded manager factory: 
> com.cloudera.sqoop.manager.DefaultManagerFactory
> 20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Trying ManagerFactory: 
> org.apache.sqoop.manager.oracle.OraOopManagerFactory
> 20/04/07 15:14:56 DEBUG oracle.OraOopManagerFactory: Data Connector for 
> Oracle and Hadoop can be called by Sqoop!
> 20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Trying ManagerFactory: 
> com.cloudera.sqoop.manager.DefaultManagerFactory
> 20/04/07 15:14:56 DEBUG manager.DefaultManagerFactory: Trying with scheme: 
> jdbc:mysql:
> 20/04/07 15:14:56 INFO manager.MySQLManager: Preparing to use a MySQL 
> streaming resultset.
> 20/04/07 15:14:56 DEBUG sqoop.ConnFactory: Instantiated ConnManager 
> org.apache.sqoop.manager.MySQLManager@38c6f217
> 20/04/07 15:14:56 INFO tool.CodeGenTool: Beginning code generation
> 20/04/07 15:14:56 DEBUG manager.SqlManager: Execute getColumnInfoRawQuery : 
> SELECT t.* FROM `MY_TABLE` AS t LIMIT 1
> Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver 
> class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered 
> via the SPI and manual loading of the driver class is generally unnecessary.
> 20/04/07 15:14:56 DEBUG manager.SqlManager: No connection paramenters 
> specified. Using regular API for making connection.
> {code}
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to