• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Error using Sqoop import

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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)
 
Greenhorn
Posts: 13
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
This parrot is no more. It has ceased to be. Now it's a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic