Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Error using Sqoop import

 
Rob Marx
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I wonder if you can help me. I am a newbie to Hadoop.
I am running Sqoop import on a hadoop image of BigTop on Centos6.

I think I have everything set up correctly and I have run some introductory tutorials, however, I am now wanting to import a mySQL database table into my Hadoop instance.

Here is the command that I am using.

sqoop import --connect jdbc:mysql://192.168.1.15:3306/world --table city --username root --password <myrootpassword>


The error that I get back is:

sqoop home directory: /usr/lib/sqoop...
Exception in thread "main" java.io.FileNotFoundException: /var/log/sqoop/import (No such file or directory)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:146)
at java.io.FileReader.<init>(FileReader.java:72)
at org.apache.sqoop.client.shell.SqoopShell.interpretFileContent(SqoopShell.java:146)
at org.apache.sqoop.client.shell.SqoopShell.main(SqoopShell.java:134)
 
Jp bordi
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator



try to create each folder hierarchy with commande line shell below, sqoop check some requirement at startup, which sqoop version is it ? sqoop 1 or sqoop 2 ?

mkdir /var/log/sqoop/import

possible to do before if sqoop folder doesnt exist
mkdir /var/log/sqoop
mkdir /var/log/sqoop/import



relaunch the job
 
abhi k tripathi
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Rob,

Define the Sqoop_home in .bashrc file and it will resolve the issue.

export SQOOP_HOME=/var/log/sqoop
export PATH=$PATH:$SQOOP_HOME/bin

Please use the following command again:
sqoop import --connect jdbc:mysql://192.168.1.15:3306/world --username root --P --table city --m 1
or
sqoop import --connect jdbc:mysql://localhost/world --username root --P --table city --m 1
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic