JEFA
JEFA

Reputation: 151

Cloudera Command: hdfs dfs -put testfile.txt Failure

I use a MAC OS Yosemite with a cloudera-quickstart-vm-5.4.2-0-virtualbox. I would like to put a "testfile.txt" in the HDFS. When I use the command "hdfs dfs -put testfile.txt" in the Terminal I have the Exception:

Screenshot of the exception:

what should I do?

Upvotes: 0

Views: 1510

Answers (1)

Vinkal
Vinkal

Reputation: 2984

All the basic Hadoop services should be running when you start the Cloudera VM. Port 8020 is for the hadoop-hdfs-namenode service. These services must have failed and just needs to be restarted.

To check the status of a service:

service <service-name> status

To restart a service:

service <service-name> restart

To restart, hadoop-hdfs-namenode service

service hadoop-hdfs-namenode restart

if you get an Error - "root user required", when restarting the service, run with sudo as shwon below:

sudo service hadoop-hdfs-namenode restart

if hadoop-hdfs-datanode service is also not running,

service hadoop-hdfs-namenode restart

Alternatively, You can also start/stop/restart the service by login in to Cloudera Manager from Firefox in Cloudera VM.

Upvotes: 1

Related Questions