0
votes

I am trying to import a table from MySql to HDFS. Below is the query which I am trying to run:

sqoop import --connect jdbc:mysql://localhost:3306/demodb --table Categories --username root --target-dir /user/msingh/demodb -P

I am getting error: Exception message: '/tmp/hadoop-Martand' is not recognized as an internal or external command,

Installation is fine. I verified with the following command:

sqoop list-databases --connect jdbc:mysql://localhost/ --username root -P

it is returning the list of databases available.

Any idea what is the mistake? Screenshot: Exception-Screenshot

1

1 Answers

0
votes

I found the issue, So answering my own question.

I think this is happening because of "space" in your user profile folder C:/Users/{foldername}. Hadoop does not support "space" in the folder name. So when you execute the Hadoop job, it creates some folders during backend jobs, which causes the issue.

So I changed the user folder name. you can follow the below link to change the folder name:

https://superuser.com/questions/890812/how-to-rename-the-user-folder-in-windows-10#:~:text=Go%20to%20the%20C%3A%5C,to%20the%20new%20path%20name.

after that, My issue got resolved.