I got this error There are 0 datanode(s) running and no node(s) are excluded in this operation

55 Views Asked by At

Do i need to install hive in order to use sqoop on my machine? while i try to import the data from mysql to hadoop it throws error like this:

bhandarisamir@Lomass-MacBook-Pro ~ % sqoop import \
  --connect jdbc:mysql://lord-MacBook-Pro.local:3306/employees \
  --username root \
  --password password \
  --table employees \
  --target-dir /user/hadoop/employees

23/11/16 23:41:06 ERROR tool.ImportTool: Encountered IOException running import job: org.apache.hadoop.ipc.RemoteException(java.io.IOException): File /tmp/hadoop-yarn/staging/bhandari/.staging/job_1700188909100_0001/libjars/mysql-connector-java-5.1.48.jar could only be replicated to 0 nodes instead of minReplication (=1). There are 0 datanode(s) running and no node(s) are excluded in this operation.

I expected the data from mysql to import here http://localhost:50070/explorer.html#/. But it was unsuccessful .

1

There are 1 best solutions below

0
OneCricketeer On

Yes, sqoop requires Hive, but your error says HDFS is not running, so Hive won't work without a healthy HDFS cluster

You need to look at the namenode and datanode logs for connection issues before running any sqoop commands

Note that sqoop itself is a retired Apache project. SparkSQL is often used query jdbc tables instead