Reputation: 6854
I am basically a mysql guy and new in hadoop and trying to import one mysql table on my hadoop system by sqoop and using below command but getting error. I search on net but not getting any possible solution.
I will be very thankful for your support.
[hduser@localhost ~]$ sqoop-import --connect jdbc:mysql://192.168.12.172:3306/test --username root -P --table users_log
Error: 15/02/25 16:26:40 ERROR tool.ImportTool: Encountered IOException running import job: java.io.FileNotFoundException: File does not exist: hdfs://localhost:9000/home/hduser/sqoop/lib/hsqldb-1.8.0.10.jar
Even This file exist on same path, details are below-
[hduser@localhost ~]$ ls -lh /home/hduser/sqoop/lib/
total 5.1M
-rwxr-xr-x 1 hduser hadoop 220K Aug 1 2014 ant-contrib-1.0b3.jar
-rwxr-xr-x 1 hduser hadoop 36K Aug 1 2014 ant-eclipse-1.0-jvm1.2.jar
-rwxr-xr-x 1 hduser hadoop 392K Aug 1 2014 avro-1.7.5.jar
-rwxr-xr-x 1 hduser hadoop 167K Aug 1 2014 avro-mapred-1.7.5-hadoop2.jar
-rwxr-xr-x 1 hduser hadoop 236K Aug 1 2014 commons-compress-1.4.1.jar
-rwxr-xr-x 1 hduser hadoop 107K Aug 1 2014 commons-io-1.4.jar
-rwxr-xr-x 1 hduser hadoop 691K Aug 1 2014 hsqldb-1.8.0.10.jar
-rwxr-xr-x 1 hduser hadoop 227K Aug 1 2014 jackson-core-asl-1.9.13.jar
-rwxr-xr-x 1 hduser hadoop 763K Aug 1 2014 jackson-mapper-asl-1.9.13.jar
-rwxr-xr-x 1 hduser hadoop 932K Mar 11 2014 mysql-connector-java-5.1.30-bin.jar
-rwxr-xr-x 1 hduser hadoop 29K Aug 1 2014 paranamer-2.3.jar
-rwxr-xr-x 1 hduser hadoop 1.2M Aug 1 2014 snappy-java-1.0.5.jar
-rwxr-xr-x 1 hduser hadoop 93K Aug 1 2014 xz-1.0.jar
Upvotes: 1
Views: 10616
Reputation: 1
Please execute below commands which will resolve your problem. It will copy your files in HDFS system.
hdfs dfs -copyFromLocal /opt/hadoop/sqoop-1.4.6 hdfs://localhost:9000/opt/hadoop/sqoop-1.4.6
hdfs dfs -copyFromLocal /opt/hadoop/sqoop-1.4.6/lib hdfs://localhost:9000/opt/hadoop/sqoop-1.4.6/lib
Note : please treat below curly braces inline section as one line
{hdfs dfs -copyFromLocal /opt/hadoop/sqoop-1.4.6/sqoop-1.4.6.jar hdfs://localhost:9000/opt/hadoop/sqoop-1.4.6/sqoop-1.4.6.jar}
Similarly copy any file which is not able to get by HDFS system.
Note : In above command /opt/hadoop/sqoop-1.4.6 is my system sqoop installation location
Thanks, Iqubal Mustafa Kaki
Upvotes: 0
Reputation: 751
hdfs://localhost:9000/ is hadoop hdfs address. you can change property in your app or upload your jar on hdfs.
You display ls command of your linux file system but hdfs://localhost:9000/ is addres of hadoop hdfs file system.
Upvotes: 1